box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
I need to use this reference more!
https://www.w3schools.com/cssref/css_selectors.asp
Example here.
[class*=“button-“] {
/* Base button styles */
user-select: none;
}
button-blue {
background: blue;
color:white;
}
This prevents you from having to write class="button button-blue"
and allows instead for just class="button-blue"
. Nifty!
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
https://davidwalsh.name/css-variables-javascript
Remember to put your font imports above the :root{} rule!
:root {
--main-bg-color: #7b0025;
}
.myClass {
background: var(--main-bg-color);
}
getComputedStyle(document.documentElement).getPropertyValue('--main-bg-color');
document.documentElement.style.setProperty('--main-bg-color', '#7b0025');
Internet Explorer doesn't understand these, so it may be worth replacing your #fff8
's and ffffff80
's with rgba(255, 255, 255, 0.5)
's.
Do a regex search for: #[0-9A-Fa-f]{4}[; ]|#[0-9A-Fa-f]{8}[; ]