# CSS misc.
# Browser Compatibility
cross-browser-compatibility:
- normalize.css (opens new window)
- caniuse.com/ (opens new window)
- autoprefixer (opens new window)
- MDN Browser Compatibility Report 2020
# Static site generators etc
Jekyll
# ::before / ::after
# DefaultCSS & Reset
simple reset:
box-sizing: border-box; margin: 0; padding: 0; /* evtl: margin: 0; for body */
# CSS Variables
declare in:
:root {
--base: #ffc600;
--spacing: 10px;
--blur: 10px
}
use it:
img {
padding: var(--spacing);
}
# BEM Naming Convention
block__element--modifier
The block is the larger section that you want to display, e.g. a form. The element is an element of it, e.g. a button. The modifier specifies a variant of this element, e.g. a highlighted button. It is optional. In the HTML, this would look like this:
<button class=”form__button--highlighted”>Submit</button>
in CSS:
.form__button--highlighted {
...
}
- More Info: getbem.com (opens new window)
- BEM 101 - css-tricks.com (opens new window)
- getting-your-head-round-bem-syntax - csswizardry.com (opens new window)
# Minify / Unminify
- CSS Minifier (opens new window)
- unminify.com (opens new window)
- https://minifier.org/