Guest User

Untitled

a guest
Jan 16th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. // ----
  2. // Sass (v3.3.9)
  3. // Compass (v1.0.0.alpha.20)
  4. // Scut (v0.10.4)
  5. // ----
  6.  
  7. @import "scut";
  8.  
  9. @mixin typeset( $type: body-copy ) {
  10. $types: (
  11. primary-heading: ( font-size: 48px, font-weight: 800 ),
  12. secondary-heading: ( font-size: 16px, font-weight: 700, line-height: 22px ),
  13. body-copy: ( font-size: 16px, line-height: 24px ),
  14. );
  15.  
  16. $type: map-get($types, $type);
  17. font-size: scut-em(map-get($type, font-size));
  18. @if map-has-key($type, font-weight) {
  19. font-weight: map-get($type, font-weight);
  20. }
  21. @if map-has-key($type, line-height) {
  22. line-height: scut-em(map-get($type, line-height), map-get($type, font-size));
  23. }
  24. }
  25.  
  26. h1 {
  27. @include typeset(primary-heading);
  28. }
  29.  
  30. h2 {
  31. @include typeset(secondary-heading);
  32. }
  33.  
  34. p {
  35. @include typeset(body-copy);
  36. }
  37.  
  38. // _hero.scss
  39. .Hero {
  40. .Hero-heading {
  41. @include typeset(secondary-heading);
  42. }
  43. }
Add Comment
Please, Sign In to add comment