_classes.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //
  2. // Utilities
  3. //
  4. %border-box {
  5. -moz-box-sizing: border-box;
  6. box-sizing: border-box;
  7. }
  8. %user-select-none {
  9. -webkit-user-select: none;
  10. -moz-user-select: -moz-none;
  11. -ms-user-select: none;
  12. user-select: none;
  13. }
  14. %hide-text {
  15. white-space: nowrap;
  16. overflow: hidden;
  17. text-indent: 100%;
  18. @extend %user-select-none;
  19. }
  20. //
  21. // Boxes
  22. //
  23. %box {
  24. background: $boxBackground;
  25. border: 1px solid $boxBorder;
  26. border-radius: 3px;
  27. }
  28. %heading-box {
  29. color: $boxHeaderColor;
  30. background: $boxHeaderBackground;
  31. border: 1px solid $boxBorder;
  32. border-radius: 3px;
  33. }
  34. %block-heading {
  35. line-height: 1.25rem;
  36. margin: 2em 0 1em;
  37. padding: .5em .75em;
  38. font-size: 1rem;
  39. overflow: hidden;
  40. @extend %heading-box;
  41. }
  42. %pre-heading {
  43. margin: 0;
  44. padding: .375rem .625rem;
  45. font-size: inherit;
  46. font-weight: normal;
  47. line-height: 1.5;
  48. border-bottom-left-radius: 0;
  49. border-bottom-right-radius: 0;
  50. @extend %heading-box;
  51. + pre {
  52. border-top-left-radius: 0;
  53. border-top-right-radius: 0;
  54. border-top: 0;
  55. margin-top: 0;
  56. }
  57. }
  58. //
  59. // Notes
  60. //
  61. %note {
  62. margin: 1.5rem 0;
  63. padding: .5rem .875rem;
  64. background: $noteBackground;
  65. border: 1px solid $noteBorder;
  66. border-radius: 3px;
  67. }
  68. %label {
  69. margin: 0 1px;
  70. padding: 1px 4px 2px;
  71. background: $labelBackground;
  72. border-radius: 3px;
  73. }
  74. %block-label {
  75. display: block;
  76. line-height: 1.375rem;
  77. margin: 2em 0 1em;
  78. padding-left: .5em;
  79. padding-right: .5em;
  80. font-size: inherit;
  81. color: $boxHeaderColor;
  82. border: 1px solid $boxBorder;
  83. border-radius: 2px;
  84. @extend %label;
  85. }
  86. %label-yellow {
  87. background: $noteBackground;
  88. border-color: $noteBorder;
  89. }
  90. %note-green, %label-green {
  91. background: $noteGreenBackground;
  92. border-color: $noteGreenBorder;
  93. }
  94. %note-blue, %label-blue {
  95. background: $noteBlueBackground;
  96. border-color: $noteBlueBorder;
  97. }
  98. %note-orange, %label-orange {
  99. background: $noteOrangeBackground;
  100. border-color: $noteOrangeBorder;
  101. }
  102. %note-red, %label-red {
  103. background: $noteRedBackground;
  104. border-color: $noteRedBorder;
  105. }
  106. //
  107. // External links
  108. //
  109. %external-link {
  110. &:after {
  111. display: inline-block;
  112. width: .5rem;
  113. height: .4375rem;
  114. margin: .125rem 0 0 .0625rem;
  115. vertical-align: top;
  116. @if $style == 'dark' {
  117. @extend %icon, %icon-link-white;
  118. } @else {
  119. @extend %icon, %icon-link;
  120. }
  121. }
  122. }
  123. %internal-link:after { content: none !important; }