Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----
- // Sass (v3.3.9)
- // Compass (v1.0.0.alpha.20)
- // Scut (v0.10.4)
- // ----
- @import "scut";
- @mixin typeset( $type: body-copy ) {
- $types: (
- primary-heading: ( font-size: 48px, font-weight: 800 ),
- secondary-heading: ( font-size: 16px, font-weight: 700, line-height: 22px ),
- body-copy: ( font-size: 16px, line-height: 24px ),
- );
- $type: map-get($types, $type);
- font-size: scut-em(map-get($type, font-size));
- @if map-has-key($type, font-weight) {
- font-weight: map-get($type, font-weight);
- }
- @if map-has-key($type, line-height) {
- line-height: scut-em(map-get($type, line-height), map-get($type, font-size));
- }
- }
- h1 {
- @include typeset(primary-heading);
- }
- h2 {
- @include typeset(secondary-heading);
- }
- p {
- @include typeset(body-copy);
- }
- // _hero.scss
- .Hero {
- .Hero-heading {
- @include typeset(secondary-heading);
- }
- }
Add Comment
Please, Sign In to add comment