From 411bdcc2818933423c70e445431c23578ea3e80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 18 Mar 2022 12:19:22 -0700 Subject: [PATCH] Put each region code on a separate line in status map CSS The separate lines will help to minimize the number of merge conflicts in PRs that add or remove shield definitions. --- doc-img/shield_map_us.svg | 34 +++++++++++++++++++++++++++++++++- doc-img/shield_map_world.svg | 19 ++++++++++++++++++- style/scripts/status_map.js | 2 +- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/doc-img/shield_map_us.svg b/doc-img/shield_map_us.svg index 1f8f7fb1e..c0c5a472c 100644 --- a/doc-img/shield_map_us.svg +++ b/doc-img/shield_map_us.svg @@ -14,7 +14,39 @@ .ca,.gu {fill:#FF0000} In this example, Kansas, Montana and Pennsylvania are colored blue, and California and Guam are colored red. Place this code in the empty space below. */ -.us, .az, .ca, .ct, .de, .ga, .hi, .ia, .id, .il, .in, .ks, .ky, .ma, .mi, .me, .mn, .ms, .mt, .nc, .nh, .nj, .nm, .ny, .oh, .or, .pa, .ri, .sc, .va, .vt, .wa, .wv { fill: #8250df; } +.us, +.az, +.ca, +.ct, +.de, +.ga, +.hi, +.ia, +.id, +.il, +.in, +.ks, +.ky, +.ma, +.mi, +.me, +.mn, +.ms, +.mt, +.nc, +.nh, +.nj, +.nm, +.ny, +.oh, +.or, +.pa, +.ri, +.sc, +.va, +.vt, +.wa, +.wv { fill: #8250df; } diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index 79fe4ad0a..ccd088d18 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -114,7 +114,24 @@ The lines may be combined if desired: .gh,.sg {fill:#0000FF; visibility:visible} See the end of this file for a list of available jurisdictions and their codes. */ -.ca, .us, .bd, .cn, .hk, .my, .np, .ph, .kr, .tw, .vn, .at, .cz, .it, .hu, .sk, .si, .nl { fill: #8250df; } +.ca, +.us, +.bd, +.cn, +.hk, +.my, +.np, +.ph, +.kr, +.tw, +.vn, +.at, +.cz, +.it, +.hu, +.sk, +.si, +.nl { fill: #8250df; } /* Color individual borders For example, to color the border between Angola and Namibia in green, add this line in the space below: diff --git a/style/scripts/status_map.js b/style/scripts/status_map.js index 29f8dc7c3..cb75c30b1 100644 --- a/style/scripts/status_map.js +++ b/style/scripts/status_map.js @@ -5,7 +5,7 @@ import * as ShieldDef from "../js/shield_defs.js"; function fillPaths(svg, codes) { let selectors = new Set(codes.map((code) => `.${code.toLowerCase()}`)); - return svg.replace(".supported", new Array(...selectors).join(", ")); + return svg.replace(".supported", new Array(...selectors).join(",\n")); } // Inject a map of each sprite ID to an absolute image URL instead of the usual sprite metadata.