July 2017
Intermediate to advanced
300 pages
5h 43m
English
NW.js releases quite frequently, basically updating with every new version of Chromium. That means we can safely use the latest CSS features. The one I'm most excited about is called Custom Properties (https://www.w3.org/TR/css-variables), which were formerly known as CSS variables.
Actually, variables are one of the main reasons CSS preprocessors exist. With NW.js, we can set variables natively in CSS, as follows:
--color-text: #8da3c5; --color-primary: #189ac4;
After that, we can use the variable instead of real values across all the modules in the document scope:
.post__title { color: var(--color-primary); } .post__content { color: var(--color-text); }
So if we decide now to change one of defined colors, we ...
Read now
Unlock full access