Using CSS Variable

11 Jan 2018

CSS variables contain values which can be reused throughout the whole document or scoped to a specific element. Scss preprocessor also has the feature of variables but they run only on compile time while CSS variables run in run time. Therefore, this allows us to update CSS styles in real time. Here is the example. By dragging the saturation bar or change the base color through the color picker, the guitar image styles change correspondingly.