1.

How to style label associated with the selected radio input and checked checkboxes?

Answer»

CSS variables enables DEVELOPERS to reuse the code, once the variable are defined and it can be reused effectively, which gives good CONTROL over stylesheet in TERMS of code readability, maintenance and bring consistency.

The variables which are declared in :root pseudo-class act as global CSS variables. 

We can DECLARE the variable via :root pseudo-class and reusing the variable using var followed by variable name in PARENTHESIS and assigning to CSS property.

The class .foo and .bar will have the text color in red, the declared variable
--color has been reused via var (--color) in both of these classes.

:root {   --color: red; }   .foo {   color: var(--color) }   .bar {   color: var(--color) }


Discussion

No Comment Found