typography.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. @import "./variables.scss";
  2. $module: #{$prefix}-typography;
  3. .#{$module} {
  4. color: $color-typography_default-text-default;
  5. @include font-size-regular;
  6. &.#{$module}-secondary {
  7. color: $color-typography_secondary-text-default;
  8. }
  9. &.#{$module}-tertiary {
  10. color: $color-typography_tertiary-text-default;
  11. }
  12. &.#{$module}-quaternary {
  13. color: $color-typography_quaternary-text-default;
  14. }
  15. &.#{$module}-warning {
  16. color: $color-typography_warning-text-default;
  17. }
  18. &.#{$module}-success {
  19. color: $color-typography_success-text-default;
  20. }
  21. &.#{$module}-danger {
  22. color: $color-typography_danger-text-default;
  23. }
  24. &.#{$module}-link {
  25. color: $color-typography_link-text-default;
  26. font-weight: $font-typography_link-fontWeight;
  27. }
  28. &.#{$module}-disabled {
  29. color: $color-typography_disabled-text-default;
  30. cursor: not-allowed;
  31. user-select: none;
  32. &.#{$module}-link {
  33. color: $color-typography_link-text-disabled;
  34. }
  35. }
  36. &-icon {
  37. // display: inline-flex;
  38. margin-right: $spacing-typography_iconPrefix-marginRight;
  39. vertical-align: middle;
  40. color: inherit;
  41. }
  42. &-small {
  43. @include font-size-small;
  44. }
  45. code {
  46. border: $width-typography_code-border solid $color-typography_code-border-default;
  47. border-radius: $radius-typography_code;
  48. color: $color-typography_code-text-default;
  49. background-color: $color-typography_code-bg-default;
  50. padding: $spacing-super-tight $spacing-extra-tight;
  51. }
  52. mark {
  53. background-color: $color-typography_mark-bg-default;
  54. }
  55. u {
  56. text-decoration: underline;
  57. text-decoration-skip-ink: auto;
  58. }
  59. del {
  60. text-decoration: line-through;
  61. }
  62. strong {
  63. font-weight: $font-typography_strong-fontWeight;
  64. }
  65. a {
  66. display: inline;
  67. color: $color-typography_link-text-default;
  68. cursor: pointer;
  69. text-decoration: none;
  70. &:visited {
  71. color: $color-typography_link-text-visited;
  72. }
  73. &:hover {
  74. color: $color-typography_link-text-hover;
  75. }
  76. &:active {
  77. color: $color-typography_link-text-active;
  78. }
  79. .#{$module}-link-underline:hover {
  80. border-bottom: $width-typography_link-border solid $color-typography_link-text-hover;
  81. margin-bottom: -$width-typography_link-border;
  82. }
  83. .#{$module}-link-underline:active {
  84. border-bottom: $width-typography_link-border solid $color-typography_link-text-active;
  85. margin-bottom: -$width-typography_link-border;
  86. }
  87. }
  88. // ============ Ellipsis ============
  89. // &-ellipsis {
  90. // display: block;
  91. // }
  92. &-ellipsis-single-line {
  93. // display: block;
  94. overflow: hidden;
  95. }
  96. &-ellipsis-multiple-line {
  97. display: -webkit-box;
  98. -webkit-box-orient: vertical;
  99. overflow: hidden;
  100. }
  101. &-ellipsis-overflow-ellipsis {
  102. display: block;
  103. white-space: nowrap;
  104. text-overflow: ellipsis;
  105. }
  106. &-ellipsis-expand {
  107. display: inline;
  108. margin-left: $spacing-typography_expandText-marginLeft;
  109. }
  110. // ============ Copyable ============
  111. &-action-copy {
  112. display: inline-flex;
  113. vertical-align: middle;
  114. padding: $spacing-typography_copyIcon-padding;
  115. margin-left: $spacing-typography_copyIcon-marginLeft;
  116. }
  117. a.#{$module}-action-copy-icon {
  118. display: inline-flex;
  119. }
  120. &-action-copied {
  121. display: inline-flex;
  122. padding: $spacing-typography_copyIcon-padding;
  123. margin-left: $spacing-typography_copyIcon-marginLeft;
  124. color: $color-typography_copied-text-success;
  125. .#{$prefix}-icon {
  126. vertical-align: middle;
  127. color: $color-typography_copied-icon-success;
  128. }
  129. }
  130. &-paragraph {
  131. margin: $spacing-typography_title_paragraph-margin;
  132. }
  133. }
  134. // ============ Title ============
  135. h1.#{$module},
  136. .#{$module}-h1.#{$module} {
  137. @include font-size-header-1;
  138. font-weight: $font-typography_title-fontWeight;
  139. margin: $spacing-typography_title_h1-margin;
  140. }
  141. h2.#{$module},
  142. .#{$module}-h2.#{$module} {
  143. @include font-size-header-2;
  144. font-weight: $font-typography_title-fontWeight;
  145. margin: $spacing-typography_title_h2-margin;
  146. }
  147. h3.#{$module},
  148. .#{$module}-h3.#{$module} {
  149. @include font-size-header-3;
  150. font-weight: $font-typography_title-fontWeight;
  151. margin: $spacing-typography_title_h3-margin;
  152. }
  153. h4.#{$module},
  154. .#{$module}-h4.#{$module} {
  155. @include font-size-header-4;
  156. font-weight: $font-typography_title-fontWeight;
  157. margin: $spacing-typography_title_h4-margin;
  158. }
  159. h5.#{$module},
  160. .#{$module}-h5.#{$module} {
  161. @include font-size-header-5;
  162. font-weight: $font-typography_title-fontWeight;
  163. margin: $spacing-typography_title_h5-margin;
  164. }
  165. h6.#{$module},
  166. .#{$module}-h6.#{$module} {
  167. @include font-size-header-6;
  168. font-weight: $font-typography_title-fontWeight;
  169. margin: $spacing-typography_title_h6-margin;
  170. }
  171. // ============ Paragraph ============
  172. p.#{$module}-extended,
  173. .#{$module}-paragraph.#{$module}-extended {
  174. line-height: $font-typography_paragraph_extended-lineHeight;
  175. }
  176. @import "./rtl.scss";