Commit 176c5eb
reduce specificity of generated stylesheets to 0 (observablehq#1941)
* fix!: reduce specificity of generated stylesheets to 0
By reducing the specificity of selectors in the generated stylesheets to 0,
consumers of Plot can much more easily override these styles using their
own stylesheets while still enjoying the default styling of Plot.
* chore: generate new snapshots
Because the change in selector specificity affects every chart, all
snapshots will need regenerating. The rendered output should yield no
differences however.
* chore: add simple test case for style overrides
This test renders two categorical legends, one using default Plot styles and
the other using styles by setting the `className` option. The styles being
overridden have the same selector specificity as those set by Plot, would
it not be for the `:where()` selector resetting Plot's specificity to 0.
This is easily verified by reverting b2ff68e.
---------
Co-authored-by: Marcus Stade <[email protected]>1 parent 34124a6 commit 176c5eb
File tree
695 files changed
+3612
-3477
lines changed- src
- legends
- test
- output
- plots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
695 files changed
+3612
-3477
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
| 267 | + | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
Loading
Loading
Loading
Loading
Loading
Loading
Loading
0 commit comments