diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-11-08 02:21:01 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-11-08 02:35:56 +0300 |
commit | b7d0b7e345aad5cbb9932e2c64a5d2d081469719 (patch) | |
tree | d311383798126b2e17511f9d3ebd10f0153d78a3 /README.md |
initial
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..67451c9 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# dark_theme_impl_example + +This repository contains the backend part or the light/dark theme switch implementation example for websites using +sass/less compilers without using css3 variables and also without webpack or similar crap. + +The [stylesheet](htdocs/scss/app.scss) used for this example is very minimalistic and contains only few rules, but that's +only for demonstration purposes. This technique has been used in real project for years on very large and very complicated +set of stylesheets (hundreds of kilobytes when compiled and minimized) and proven to be reliable. + +Check out my [blog post](https://ch1p.io/dark-theme-scss-less-without-css3-variables/edit/) if you want to learn more. + +## Requirements + +- `sassc` compiler (in debian, the package is called `sassc`) for scss +- nodejs + +Clone repository: + +``` +git clone https://git.ch1p.io/dark_theme_impl_example.git +cd dark_theme_impl_example +``` + +Install dependencies: +``` +npm i +``` + +Build the scss example: +``` +make scss +``` + +Build the less example: +``` +make less +``` + +Check out results in `htdocs/dist-less` or `htdocs/dist-scss`. + +# License + +MIT
\ No newline at end of file |