Layout
This module contains various mixins for hacking layout and prefix-free using box-sizing.
File
lightingfly/modules/_layout.scss
Links
Clearfix hack: css-tricks.com
Centering in the Unknown: css-tricks.com
Specification for box-sizing property: developer.mozilla.org
Specification for calc function: w3.org
calc
Mixin for prefix-free calc function.
Mixin
@mixin calc($property, $calc, $fallback)
Arguments
$property:
[width, height, ...]
- css property$calc:
['100% - 50px']
- mathematic formula to calculate$fallback:
[250px, 10en, ...)]
- fallback value
Usage example
Demo
Element with calculated width, and with fallback.
calc(100% - 200px)
calc(100% - 100px)