_editor.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /**
  2. * Editor Post Title
  3. * - Needs a special styles
  4. */
  5. .editor-post-title__block .editor-post-title__input {
  6. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  7. @include font-family( map-deep-get($config-heading, "font", "family") );
  8. font-weight: #{map-deep-get($config-heading, "font", "weight")};
  9. font-size: (strip-unit(map-deep-get($config-heading, "font", "size", "h2")) + 0em);
  10. letter-spacing: #{map-deep-get($config-heading, "font", "letter-spacing", "h2")};
  11. line-height: #{map-deep-get($config-heading, "font", "line-height", "h2")};
  12. }
  13. // Gutenberg text color options
  14. .has-text-color {}
  15. .wp-block .has-primary-color,
  16. .has-primary-color {
  17. color: #{map-deep-get($config-global, "color", "primary", "default")};
  18. }
  19. .wp-block .has-secondary-color,
  20. .has-secondary-color {
  21. color: #{map-deep-get($config-global, "color", "secondary", "default")};
  22. }
  23. .wp-block .has-foreground-color,
  24. .has-foreground-color {
  25. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  26. }
  27. .wp-block .has-foreground-light-color,
  28. .has-foreground-light-color {
  29. color: #{map-deep-get($config-global, "color", "foreground", "light")};
  30. }
  31. .wp-block .has-foreground-dark-color,
  32. .has-foreground-dark-color {
  33. color: #{map-deep-get($config-global, "color", "foreground", "dark")};
  34. }
  35. .wp-block .has-background-light-color,
  36. .has-background-light-color {
  37. color: #{map-deep-get($config-global, "color", "background", "light")};
  38. }
  39. .wp-block .has-background-dark-color,
  40. .has-background-dark-color {
  41. color: #{map-deep-get($config-global, "color", "background", "dark")};
  42. }
  43. .wp-block .has-background-color,
  44. .has-background-color {
  45. color: #{map-deep-get($config-global, "color", "background", "default")};
  46. }
  47. // Gutenberg background-color options
  48. .has-background {
  49. p:not(.has-text-color),
  50. h1:not(.has-text-color),
  51. h2:not(.has-text-color),
  52. h3:not(.has-text-color),
  53. h4:not(.has-text-color),
  54. h5:not(.has-text-color),
  55. h6:not(.has-text-color) {
  56. color: currentColor;
  57. }
  58. }
  59. .has-primary-background-color,
  60. .has-primary-background-color.has-background-dim {
  61. background-color: #{map-deep-get($config-global, "color", "primary", "default")};
  62. color: #{map-deep-get($config-global, "color", "background", "default")};
  63. }
  64. .has-primary-background-color:not(.has-text-color),
  65. .has-primary-background-color.has-background-dim:not(.has-text-color) {
  66. color: #{map-deep-get($config-global, "color", "background", "default")};
  67. }
  68. .has-secondary-background-color,
  69. .has-secondary-background-color.has-background-dim {
  70. background-color: #{map-deep-get($config-global, "color", "secondary", "default")};
  71. }
  72. .has-secondary-background-color:not(.has-text-color),
  73. .has-secondary-background-color.has-background-dim:not(.has-text-color) {
  74. color: #{map-deep-get($config-global, "color", "background", "default")};
  75. }
  76. .has-background-dim,
  77. .has-foreground-background-color,
  78. .has-foreground-background-color.has-background-dim {
  79. background-color: #{map-deep-get($config-global, "color", "foreground", "default")};
  80. }
  81. .has-background-dim,
  82. .has-foreground-background-color,
  83. .has-foreground-background-color.has-background-dim {
  84. color: #{map-deep-get($config-global, "color", "background", "default")};
  85. }
  86. .has-foreground-light-background-color,
  87. .has-foreground-light-background-color.has-background-dim {
  88. background-color: #{map-deep-get($config-global, "color", "foreground", "light")};
  89. }
  90. .has-foreground-light-background-color:not(.has-text-color),
  91. .has-foreground-light-background-color.has-background-dim:not(.has-text-color) {
  92. color: #{map-deep-get($config-global, "color", "background", "default")};
  93. }
  94. .has-foreground-dark-background-color,
  95. .has-foreground-dark-background-color.has-background-dim {
  96. background-color: #{map-deep-get($config-global, "color", "foreground", "dark")};
  97. }
  98. .has-foreground-dark-background-color:not(.has-text-color),
  99. .has-foreground-dark-background-color.has-background-dim:not(.has-text-color) {
  100. color: #{map-deep-get($config-global, "color", "background", "default")};
  101. }
  102. .has-background-light-background-color,
  103. .has-background-light-background-color.has-background-dim {
  104. background-color: #{map-deep-get($config-global, "color", "background", "light")};
  105. }
  106. .has-background-light-background-color:not(.has-text-color),
  107. .has-background-light-background-color.has-background-dim:not(.has-text-color) {
  108. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  109. }
  110. .has-background-dark-background-color,
  111. .has-background-dark-background-color.has-background-dim {
  112. background-color: #{map-deep-get($config-global, "color", "background", "dark")};
  113. }
  114. .has-background-dark-background-color:not(.has-text-color),
  115. .has-background-dark-background-color.has-background-dim:not(.has-text-color) {
  116. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  117. }
  118. .has-background-background-color,
  119. .has-background-background-color.has-background-dim {
  120. background-color: #{map-deep-get($config-global, "color", "background", "default")};
  121. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  122. }
  123. .has-background-background-color:not(.has-text-color),
  124. .has-background-background-color.has-background-dim:not(.has-text-color) {
  125. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  126. }
  127. // Gutenberg Font-size utility classes
  128. .is-small-text,
  129. .has-small-font-size {
  130. font-size: (strip-unit(map-deep-get($config-global, "font", "size", "sm")) + 0em);
  131. }
  132. .is-regular-text,
  133. .has-regular-font-size,
  134. .has-normal-font-size,
  135. .has-medium-font-size {
  136. font-size: (strip-unit(map-deep-get($config-global, "font", "size", "md")) + 0em);
  137. }
  138. .is-large-text,
  139. .has-large-font-size {
  140. font-size: (strip-unit(map-deep-get($config-global, "font", "size", "lg")) + 0em);
  141. line-height: #{map-deep-get($config-global, "font", "line-height", "heading")};
  142. }
  143. .is-larger-text,
  144. .has-larger-font-size,
  145. .has-huge-font-size {
  146. font-size: (strip-unit(map-deep-get($config-global, "font", "size", "xl")) + 0em);
  147. line-height: #{map-deep-get($config-global, "font", "line-height", "heading")};
  148. }
  149. // Drop cap
  150. .has-drop-cap:not(:focus)::first-letter {
  151. @include font-family( map-deep-get($config-heading, "font", "family") );
  152. font-size: calc(2 * #{strip-unit(map-deep-get($config-heading, "font", "size", "h1")) + 0em});
  153. font-weight: #{map-deep-get($config-heading, "font", "weight")};
  154. }
  155. /**
  156. * Spacing Overrides
  157. */
  158. [data-block] {
  159. margin-top:#{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  160. margin-bottom: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  161. @include media(mobile) {
  162. margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
  163. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  164. }
  165. }
  166. @import "spacing-overrides";