style-child-theme-editor.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /**
  2. * These styles should be loaded by the Block Editor only
  3. */
  4. /**
  5. * Abstracts
  6. * - Mixins, variables and functions
  7. */
  8. @import "../../varia/sass/abstracts/imports";
  9. /**
  10. * Child Theme Name
  11. */
  12. @import "config-child-theme-deep";
  13. /**
  14. * Base
  15. * - Reset the browser
  16. */
  17. @import "../../varia/sass/base/editor";
  18. /**
  19. * Elements
  20. * - Styles for basic HTML elemants
  21. */
  22. @import "../../varia/sass/elements/editor";
  23. /**
  24. * Blocks
  25. * - These styles replace key Gutenberg Block styles for fonts, colors, and
  26. * spacing with CSS-variables overrides
  27. */
  28. @import "../../varia/sass/blocks/editor";
  29. /**
  30. * Extras
  31. */
  32. $color_background: #{map-deep-get($config-global, "color", "background", "default")};
  33. $color_background_light: #{map-deep-get($config-global, "color", "background", "light")};
  34. $color_foreground: #{map-deep-get($config-global, "color", "foreground", "default")};
  35. $color_primary: #{map-deep-get($config-global, "color", "primary", "default")};
  36. $color_secondary: #{map-deep-get($config-global, "color", "secondary", "default")};
  37. $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "hover")};
  38. $spacing_horizontal: #{map-deep-get($config-global, "spacing", "horizontal")};
  39. $spacing_vertical: #{map-deep-get($config-global, "spacing", "vertical")};
  40. $font_size_xs: #{map-deep-get($config-global, "font", "size", "xs")};
  41. $font_size_md: #{map-deep-get($config-global, "font", "size", "md")};
  42. $font_size_base: #{map-deep-get($config-global, "font", "size", "base")};
  43. $font_size_xl: #{map-deep-get($config-global, "font", "size", "xl")};
  44. $font_family_code: #{map-deep-get($config-global, "font", "family", "code")};
  45. $font_line_height_body: #{map-deep-get($config-global, "font", "line-height", "body")};
  46. $button_line_height: #{map-deep-get($config-button, "font", "line-height")};
  47. $button_font_weight: #{map-deep-get($config-button, "font", "weight")};
  48. $button_font_size: #{map-deep-get($config-button, "font", "size")};
  49. $button_spacing_vertical: #{map-deep-get($config-button, "padding", "vertical")};
  50. $button_spacing_horizontal: #{map-deep-get($config-button, "padding", "horizontal")};
  51. $button_color: #{map-deep-get($config-button, "color", "text")};
  52. $button_color_hover: #{map-deep-get($config-button, "color", "text-hover")};
  53. $button_background: #{map-deep-get($config-button, "color", "background")};
  54. $button_background_hover: #{map-deep-get($config-button, "color", "background-hover")};
  55. $font_size_widget_title: #{map-deep-get($config-heading, "font", "size", "h3")};
  56. /**
  57. * 1. General Styles
  58. */
  59. a {
  60. text-decoration: none;
  61. .wp-block-group &,
  62. .wp-block-cover &,
  63. .wp-block-cover-image &,
  64. .wp-block-media-text &,
  65. p:not(.site-title) & {
  66. text-decoration: underline;
  67. &.wp-block-button__link,
  68. &:hover {
  69. text-decoration: none;
  70. }
  71. }
  72. }
  73. .has-background {
  74. a {
  75. color: currentColor;
  76. }
  77. }
  78. .editor-post-title__block .editor-post-title__input {
  79. text-align: left;
  80. color: $color_primary;
  81. }
  82. h1,
  83. h2,
  84. h3,
  85. h4,
  86. h5,
  87. h6 {
  88. color: $color_primary;
  89. }
  90. /**
  91. * 2. Block Specific Styles
  92. */
  93. /**
  94. * 2.1. Column Block
  95. */
  96. .wp-block-columns {
  97. .wp-block-latest-posts {
  98. border-bottom: 1px solid $color_background_light;
  99. > li {
  100. border-top: 1px solid $color_background_light;
  101. margin: 0;
  102. padding-top: $spacing_horizontal;
  103. padding-bottom: $spacing_horizontal;
  104. > a {
  105. font-size: $font_size_base;
  106. font-weight: normal;
  107. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  108. line-height: $font_line_height_body;
  109. }
  110. > time {
  111. &.wp-block-latest-posts__post-date {
  112. font-size: $font_size_base;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. /**
  119. * 2.2. Quote Block
  120. */
  121. .wp-block-quote,
  122. .wp-block-quote[style*="text-align:center"],
  123. .wp-block-quote[style*="text-align:right"] {
  124. border: 1px solid $color_background_light;
  125. padding: $spacing_horizontal;
  126. p {
  127. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  128. font-size: $font_size_md;
  129. line-height: $font_line_height_body;
  130. }
  131. .wp-block-quote__citation {
  132. color: inherit;
  133. font-size: $font_size_md;
  134. }
  135. }
  136. /**
  137. * 2.3. File Block
  138. */
  139. .wp-block-file {
  140. div {
  141. &.wp-block-file__button {
  142. line-height: $button_line_height;
  143. cursor: pointer;
  144. font-weight: $button_font_weight;
  145. @include font-family( map-deep-get($config-button, "font", "family") );
  146. background-color: $button_background;
  147. font-size: $button_font_size;
  148. padding: $button_spacing_vertical $button_spacing_horizontal;
  149. text-transform: uppercase;
  150. display: inline-block;
  151. &:focus,
  152. &:hover {
  153. color: $button_color_hover;
  154. background-color: $button_background_hover;
  155. opacity: 1;
  156. }
  157. }
  158. }
  159. }
  160. /**
  161. * 2.4. Pre Block, Code Block and Verse Block
  162. */
  163. .wp-block-preformatted,
  164. .wp-block-verse {
  165. pre {
  166. font-family: $font_family_code;
  167. font-size: $font_size_base;
  168. }
  169. }
  170. .wp-block-code {
  171. .block-editor-plain-text {
  172. font-family: $font_family_code;
  173. font-size: $font_size_base;
  174. }
  175. }
  176. /**
  177. * 2.5. Button Block
  178. */
  179. .wp-block-button {
  180. div {
  181. &.wp-block-button__link {
  182. text-transform: uppercase;
  183. border: 0;
  184. border-radius: 5em;
  185. text-transform: uppercase;
  186. &.has-background {
  187. &:focus,
  188. &:hover,
  189. &:visited {
  190. opacity: .8;
  191. }
  192. }
  193. }
  194. }
  195. &.minimal {
  196. .wp-block-button__link {
  197. background: 0 0;
  198. border: 2px solid;
  199. }
  200. }
  201. }
  202. /**
  203. * 2.6. Search Block
  204. */
  205. .wp-block-search {
  206. .wp-block-search__button {
  207. text-transform: uppercase;
  208. line-height: $button_line_height;
  209. color: $button_color;
  210. cursor: pointer;
  211. font-weight: $button_font_weight;
  212. @include font-family( map-deep-get($config-button, "font", "family") );
  213. font-size: $button_font_size;
  214. background-color: $button_background;
  215. border-radius: 5em;
  216. border-width: 0;
  217. padding: $button_spacing_vertical $button_spacing_horizontal;
  218. display: inline-block;
  219. &:focus,
  220. &:hover,
  221. &:visited {
  222. color: $button_color_hover;
  223. background-color: $button_background_hover;
  224. opacity: 1;
  225. }
  226. border: none;
  227. box-shadow: none;
  228. }
  229. }