css set variable
/* "css variables" */
/* not for ie but good for Edge and other browser :D */
/*
By declaring a custom property on the :root pseudo-class
and using it where needed throughout the document
*/
:root {
--primary-bg: #8a2be2;
--btn-font-size: 18px;
--btn-padding: 10px 15px;
}
.btn-primary {
background-color: var(--primary);
font-size: var(--btn-font-size);
padding: var(--btn-padding);
color: #E2E2E2;
}:root {
--main-bg-color: coral;
}
#div1 {
background-color: var(--main-bg-color);
}
#div2 {
background-color: var(--main-bg-color);
}
Also in CSS:
- css calss
- css div vertical center
- css circle border
- grid-template-areas css
- css text justify
- css remove blue outline button
- boootstrap alerts
- css box model
- how to specify amout of letters in inputfield in css
- javascript modify css
- css smooth text shadow
- css grid mdn
- repeat autofill css grid minmax
- background color using css
- html static background
- input remove blue glow
- sapui5 css classes
- css click event jquery
- @media css
- how to change svg image color on hover using css
- prevent textarea resize css
- full page background image
- css before is not working
- center div vertically html css