You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default values are set on `:root`, so you can set them on `.grvsc-container`, `pre`, your own `wrapperClassName`, the class name matching the theme, or generally any selector more specific than `:root`.
298
+
The padding values are written with cascading fallbacks. As an example, let’s consider the top and bottom padding of `.grvsc-container`. Each is set to its own CSS variable, `--grvsc-padding-top` and `--grvsc-padding-bottom`, respectively. Neither of these is defined by default, so it uses the value of its fallback, which is another CSS variable, `--grvsc-padding-v`, with another fallback, `1rem`. Since `--grvsc-padding-v` is also not defined by default, both padding properties will evaluate to the final fallback, `1rem`.
299
+
300
+
So, if you want to adjust the vertical padding, you could add the following to your own CSS:
301
+
302
+
```css
303
+
:root {
304
+
--grvsc-padding-v: 20px; /* Adjust padding-top and padding-bottom */
305
+
}
306
+
```
307
+
308
+
If you want to adjust the padding-top or padding-bottom independently, you can use those variables:
309
+
310
+
```css
311
+
:root {
312
+
--grvsc-padding-top: 24px; /* Adjust padding-top by itself */
You need to pick your own background color, and optionally a left border width and color, for the highlighted lines. This can be done by setting CSS variables:
Copy file name to clipboardExpand all lines: test/integration/baselines/code-fence-meta.html
+7-21Lines changed: 7 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,15 @@
1
1
<preclass="grvsc-container test-wrapper default-dark" data-language="js" data-index="0"><codeclass="grvsc-code"><spanclass="grvsc-line grvsc-line-highlighted"><spanclass="mtk3">// should be highlighted</span></span></code></pre>
2
2
<preclass="grvsc-container test-wrapper js-test default-dark" data-language="js" data-index="1"><codeclass="grvsc-code"><spanclass="grvsc-line"><spanclass="mtk3">// should not be highlighted</span></span></code></pre>
0 commit comments