]> BookStack Code Mirror - bookstack/commitdiff
Exports: Fixed CSS file BOM mark breaking CSS variables in exports
authorDan Brown <redacted>
Mon, 5 May 2025 11:21:32 +0000 (12:21 +0100)
committerDan Brown <redacted>
Mon, 5 May 2025 11:21:32 +0000 (12:21 +0100)
Adds a dummy CSS rule to break as the first rule, instead of our
:root variables.
Fixes #5576

resources/sass/_vars.scss

index 26539656e7f59e97c68be7abf9afb3fbecc542a4..1a9590e730f5f08e38572ce5f5597a922c55b74c 100644 (file)
@@ -1,5 +1,12 @@
 // Variables
-///////////////
+// A range of SASS and plain CSS variables used in BookStack
+////////////////////////////////////////////////////////////
+
+// This is simply placed here at the top to prevent parsing/rendering issues
+// where built CSS files may have a starting BOM mark which can break the first css rule
+// when used inline, so this is here as a sacrifice in such scenarios instead of an important rule.
+// Related: https://github.com/sass/dart-sass/issues/472
+.dummy-style {color: red;}
 
 // Screen breakpoints
 $bp-xxxl: 1700px;
Morty Proxy This is a proxified and sanitized view of the page, visit original site.