From b7d0b7e345aad5cbb9932e2c64a5d2d081469719 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 8 Nov 2022 02:21:01 +0300 Subject: initial --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md (limited to 'README.md') 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 -- cgit v1.2.3