mirror of
https://github.com/kognise/water.css.git
synced 2025-08-11 15:45:15 +02:00
feat: add new build configurations
This commit is contained in:
9
src/builds/dark-legacy.scss
Executable file
9
src/builds/dark-legacy.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Dark-themed version for legacy browsers:
|
||||
* Loads the compiled, standalone version of the dark theme,
|
||||
* but overrides it with the compiled, standalone version of the light theme
|
||||
* if a system-wide theme preference is set on the user's device.
|
||||
*/
|
||||
|
||||
@import url('https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.min.css');
|
||||
@import url('https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/light.min.css') (prefers-color-scheme: light);
|
16
src/builds/dark.scss
Normal file
16
src/builds/dark.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Dark-themed version:
|
||||
* uses dark theme by default but switches to light theme
|
||||
* if a system-wide theme preference is set on the user's device.
|
||||
*
|
||||
* Variables will remain uncompiled so the theme can update dynamically
|
||||
* at runtime in the browser.
|
||||
*/
|
||||
|
||||
@import '../_variables/_variables-dark';
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
@import '../_variables/_variables-light';
|
||||
}
|
||||
|
||||
@import '../parts/core';
|
8
src/builds/dark.standalone.scss
Executable file
8
src/builds/dark.standalone.scss
Executable file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Standalone dark-themed version.
|
||||
* Includes dark variables and core, compiled at build time so the final output
|
||||
* will only include regular CSS, no variables.
|
||||
*/
|
||||
|
||||
@import '../_variables/variables-dark';
|
||||
@import '../parts/core';
|
9
src/builds/light-legacy.scss
Executable file
9
src/builds/light-legacy.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Light-themed version for legacy browsers:
|
||||
* Loads the compiled, standalone version of the light theme at runtime,
|
||||
* but overrides it with the compiled, standalone version of the dark theme
|
||||
* if a system-wide theme preference is set on the user's device.
|
||||
*/
|
||||
|
||||
@import url('https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/light.min.css');
|
||||
@import url('https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.min.css') (prefers-color-scheme: dark);
|
16
src/builds/light.scss
Normal file
16
src/builds/light.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Light-themed version:
|
||||
* uses light theme by default but switches to dark theme
|
||||
* if a system-wide theme preference is set on the user's device.
|
||||
*
|
||||
* Variables will remain uncompiled so the theme can update dynamically
|
||||
* at runtime in the browser.
|
||||
*/
|
||||
|
||||
@import '../_variables/variables-light';
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@import '../_variables/variables-dark';
|
||||
}
|
||||
|
||||
@import '../parts/core';
|
8
src/builds/light.standalone.scss
Executable file
8
src/builds/light.standalone.scss
Executable file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Standalone light-themed version.
|
||||
* Includes light variables and core, compiled at build time so the final output
|
||||
* will only include regular CSS, no variables.
|
||||
*/
|
||||
|
||||
@import '../_variables/variables-light';
|
||||
@import '../parts/core';
|
Reference in New Issue
Block a user