Small
People create amazing things within 4K.
Let's do the same.
Semantic-first
Stop doing this:
<div class="btn-group" role="group" ... >
<button type="button" class="button button-primary">
...
Start doing this
<menu>
<button>
...
Class-last
Only variantes and utilities are acceptable classes
CSS
- x No LESS/SASS preprocessor.
- x No NPM requirement for building.
- x No JS-dependant components.
- v Use pure vanilla CSS.
- v CSS variables.
Variables
<progress> spinner
People love @animation based spinners, but they consume 1 full core.
To be energy-efficent we'll use a goodol' GIF in our <progress> element:
form
<menu> groupping
menu button
menu radio
menu a
[data-tooltip]
This attribut will add a tooltip if you hover a specific element.
Since, hover does not exist on phone, you shoud also make your element focusable
good for explaination
Long version
<sup> badge
Badge are usefull to indicate changed state (counter, validity, ...):
My reportsnew
They play well with variantes:
[role=alert]
Can also be used as snackbar / notification.
Oopsie Woopsie !! You can't dissmiss me !
Oopsie Woopsie !! Don't dissmiss me :D
This play well with variantes
<section> cards
A card is paddingless/marginless so you can embed anything in it
you can even create a modal with it
It support header/footer
Layout
A typical web page is
header
img nav nav
...
footer
nav img nav
Use the main element to limit the max-width of an element.
If you want your full page to be
main
header
...
footer
header
main
article
footer
flex
.flew will give you a wide-spaced items