title.sass 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @import "../utilities/mixins"
  2. $title-color: $text-strong !default
  3. $title-family: false !default
  4. $title-size: $size-3 !default
  5. $title-weight: $weight-semibold !default
  6. $title-line-height: 1.125 !default
  7. $title-strong-color: inherit !default
  8. $title-strong-weight: inherit !default
  9. $title-sub-size: 0.75em !default
  10. $title-sup-size: 0.75em !default
  11. $subtitle-color: $text !default
  12. $subtitle-family: false !default
  13. $subtitle-size: $size-5 !default
  14. $subtitle-weight: $weight-normal !default
  15. $subtitle-line-height: 1.25 !default
  16. $subtitle-strong-color: $text-strong !default
  17. $subtitle-strong-weight: $weight-semibold !default
  18. $subtitle-negative-margin: -1.25rem !default
  19. .title,
  20. .subtitle
  21. @extend %block
  22. word-break: break-word
  23. em,
  24. span
  25. font-weight: inherit
  26. sub
  27. font-size: $title-sub-size
  28. sup
  29. font-size: $title-sup-size
  30. .tag
  31. vertical-align: middle
  32. .title
  33. color: $title-color
  34. @if $title-family
  35. font-family: $title-family
  36. font-size: $title-size
  37. font-weight: $title-weight
  38. line-height: $title-line-height
  39. strong
  40. color: $title-strong-color
  41. font-weight: $title-strong-weight
  42. & + .highlight
  43. margin-top: -0.75rem
  44. &:not(.is-spaced) + .subtitle
  45. margin-top: $subtitle-negative-margin
  46. // Sizes
  47. @each $size in $sizes
  48. $i: index($sizes, $size)
  49. &.is-#{$i}
  50. font-size: $size
  51. .subtitle
  52. color: $subtitle-color
  53. @if $subtitle-family
  54. font-family: $subtitle-family
  55. font-size: $subtitle-size
  56. font-weight: $subtitle-weight
  57. line-height: $subtitle-line-height
  58. strong
  59. color: $subtitle-strong-color
  60. font-weight: $subtitle-strong-weight
  61. &:not(.is-spaced) + .title
  62. margin-top: $subtitle-negative-margin
  63. // Sizes
  64. @each $size in $sizes
  65. $i: index($sizes, $size)
  66. &.is-#{$i}
  67. font-size: $size