tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.12k stars 527 forks source link

Rule affects ways that it shouldn't #1906

Closed stevage closed 11 years ago

stevage commented 11 years ago

Came across this weird situation today that I can't describe much better than above. I have a rule:

#ways[highway="service"][zoom >= 12] {
    line-width: 0.5; 
    line-color: #d7d7d7;
  //[service="parking_aisle"] { opacity: 0.2; }
    [service="alley"][zoom >= 15] { line-dasharray: 6,3; }
    [zoom >= 14] { line-width: 0.5; line-color:#ccc; }
    [zoom >= 16] { line-width: 1; line-color: #aaa;}
    [cycleway="lane"],[cycleway="track"] { 
      line-color: @bikeline; 
      [zoom >= 14] { line-width:1.5; }
      [zoom >= 16] { line-width: 2;}
    }
}

When uncommenting the commented-out bit, this rule affects lots of apparently unrelated lines (maybe everything on #ways) get the 20% opacity style. Here are the relevant rules:

#ways[railway="rail"] {
  [zoom >= 15][bridge="yes"]::casing {
    bridge-gap/line-color: white;
    bridge-gap/line-width:6;
    bridge-edge/line-color: lighten(gray,20%);
    bridge-edge/line-width:5;
    bridge-inner/line-color: white;
    bridge-inner/line-width:4;
    case/line-color:#89e;
    case/line-width:2;
    dashes/line-color:#44e;
    dashes/line-width:0.5;
    dashes/line-dasharray:5,5;    
  }

  [zoom>=5] {
     line-color:#89e;
     line-width:2;
     dashes/line-color:#44e;
     dashes/line-width:0.5;
     dashes/line-dasharray:5,5;
  }  
}

(The rail bridges don't seem to be affected.)

#ways[zoom >= 12][highway="residential"],
#ways[zoom >= 12][highway="unclassified"] {
    line-width: 0.5; 
    line-color: #d7d7d7;
    [zoom >= 13] { line-width: 1; line-color:#ccc; }
    [zoom >= 15] { line-width: 2; line-color: #aaa;}
    [cycleway="lane"],[cycleway="track"] { 
      line-color: @bikeline; 
      [zoom >= 13] { line-width:2; }
      [zoom >= 15] { line-width: 3;}
    }

}

I've double checked that commenting/uncommenting that one single line definitely makes the difference.

tilemill-render-bug

springmeyer commented 11 years ago

Better off posting this to support.mapbox.com where this will get more eyes from cartographers. If a replicable bug is the cause then ultimately the carto issue tracker is where it will land.