1
0
mirror of https://github.com/jdan/98.css.git synced 2026-05-05 06:01:22 +09:00

Fix GroupBox border for Firefox

Firefox's new WebRender engine seems to have a bug with fieldsets styled
with inset box-shadows
(https://bugzilla.mozilla.org/show_bug.cgi?id=1496538).

As a workaround, use a tiny .SVG as a sliced border-image to draw the border.

Fixes #42.
This commit is contained in:
Dale Whinham
2021-08-06 14:41:38 +01:00
parent d3d4ac245b
commit 3d378f9e99
2 changed files with 5 additions and 3 deletions

4
icon/groupbox-border.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg width="5" height="5" viewBox="0 0 5 5" fill="grey" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H5V5H0V2H2V3H3V2H0" fill="white" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H4V4H0V1H1V3H3V1H0" fill="#808080" />
</svg>

After

Width:  |  Height:  |  Size: 279 B

View File

@@ -278,9 +278,7 @@ button:disabled,
}
fieldset {
border: none;
box-shadow: inset -1px -1px var(--button-highlight), inset -2px 1px var(--button-shadow),
inset 1px -2px var(--button-shadow), inset 2px 2px var(--button-highlight);
border-image: svg-load("./icon/groupbox-border.svg") 2;
padding: calc(2 * var(--border-width) + var(--element-spacing));
padding-block-start: var(--element-spacing);
margin: 0;