Булево условие Tilemill / CartoCSS
В TileMill / CartoCSS есть возможность иметь логическое "ИЛИ"? Я попробовал регулярное выражение, но безуспешно. Я хотел бы упростить этот CSS:
@ciPolyBackground: #F79320;
@ciPolyOpacity: 0.5;
#countries {
[ne_10m_adm = "BOL"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "BRA"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "BWA"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "CHN"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "COD"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "COL"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "ECU"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "FJI"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "GUY"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "IDN"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "KHM"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "LBR"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "MDG"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "MEX"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "NCL"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "PER"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "PHL"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "PNG"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "SUR"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "TLS"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "WSM"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
[ne_10m_adm = "ZAF"] { polygon-fill: @ciPolyBackground; polygon-opacity: @ciPolyOpacity; }
}
1 ответ
Решение
Вы можете объединить выражения, разделив их запятой:
[ne_10m_adm = "BOL"], [ne_10m_adm = "BRA"], [ne_10m_adm = "BWA"] { polygon-fill: #333; polygon-opacity: .6; }