Created
March 7, 2024 17:05
-
-
Save silouanwright/13c4549288cfd52007866574ccde8e47 to your computer and use it in GitHub Desktop.
Revisions
-
silouanwright created this gist
Mar 7, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ // Define SCSS variables with default values $header-color: purple; $font-size: 16px; // Create CSS custom properties with the same names and default values :root { --header-color: #{$header-color}; --font-size: #{$font-size}; } // Global class selector .brand-2024 { // Redefine CSS custom properties with desired values --header-color: red; --font-size: 18px; } // Use CSS custom properties in your styles h1 { color: var(--header-color); font-size: var(--font-size); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ <div class="brand-2024"> <h1>Hello Joe!</h1> </div > This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ :root { --header-color: purple; --font-size: 16px; } .brand-2024 { --header-color: red; --font-size: 18px; } h1 { color: var(--header-color); font-size: var(--font-size); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ { "sass": { "compiler": "dart-sass/1.32.12", "extensions": {}, "syntax": "SCSS", "outputStyle": "expanded" }, "autoprefixer": false }