style-child-theme-editor.scss 6.8 KB

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