Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- position(
- - justification [left, h-center, right], // - could delimit optional, + could delimit required
- - alignment [top, v-center, bottom]
- ) {
- // map enum to expressions
- :: [left, top] flex-start
- :: [h-center, v-center] center
- :: [right, bottom] flex-end
- // no colons or semicolons
- display flex
- [justify-content justification] // [] delimits optional
- [align-items alignment]
- }
- left() { position(left) } // () distinguishes function from element
- h-center() { position(h-center) }
- right() { position(right) }
- top() { position(top) }
- v-center() { position(v-center) }
- bottom() { position(bottom) }
- center() {
- h-center // () unneeded if no arguments
- v-center
- }
- .h1 {
- headline
- center
- highlight
- }
- .h2 {
- headline
- center
- highlight--alternate // BEM identifiers!
- }
Add Comment
Please, Sign In to add comment