1
0
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:
Jonas Kuske
2019-05-06 00:27:17 +02:00
parent 550e4a72fc
commit be233afd74
6 changed files with 66 additions and 0 deletions

9
src/builds/dark-legacy.scss Executable file
View 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
View 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';

View 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
View 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
View 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';

View 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';