_config-child-theme-deep.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. /**
  2. * Redefine Sass map values for child theme output.
  3. * - See: style-child-theme.scss
  4. */
  5. @import "../../varia/sass/abstracts/color-variables";
  6. /**
  7. * Global
  8. */
  9. // Vertical Rhythm Multiplier
  10. $baseline-unit: 8px;
  11. $typescale-root: 18px; // Set 16px/1em default on html
  12. $typescale-base: 1rem; // Set 1em default on body == $typescale-root;
  13. $typescale-ratio: 1.2; // Run ratio math on 1em == $typescale-base * $typescale-root;
  14. $config-global: (
  15. /* Fonts */
  16. "font": (
  17. /* Font Family */
  18. "family": (
  19. "primary": (
  20. "fallback": "Lora, Baskerville, Georgia, Times, serif",
  21. "css-var": "--font-headings",
  22. ),
  23. "secondary": (
  24. "fallback": "Lora, Baskerville, Georgia, Times, serif",
  25. "css-var": "--font-base",
  26. ),
  27. "code": "monospace, monospace",
  28. "ui": (
  29. "fallback": "Raleway, -apple-system\, BlinkMacSystemFont\, \"Segoe UI\"\, \"Roboto\"\, \"Oxygen\"\, \"Ubuntu\"\, \"Cantarell\"\, \"Fira Sans\"\, \"Droid Sans\"\, \"Helvetica Neue\"\, sans-serif",
  30. "css-var": "--font-base",
  31. ),
  32. ),
  33. /* Font Size */
  34. "size": (
  35. "root": $typescale-root,
  36. "ratio": $typescale-ratio,
  37. "xs": ($typescale-base / $typescale-ratio / $typescale-ratio),
  38. "sm": ($typescale-base / $typescale-ratio),
  39. "base": $typescale-base,
  40. "md": ($typescale-base * $typescale-ratio),
  41. "lg": ($typescale-base * $typescale-ratio * $typescale-ratio),
  42. "xl": ($typescale-base * $typescale-ratio * $typescale-ratio * $typescale-ratio),
  43. "xxl": ($typescale-base * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio),
  44. "xxxl": ($typescale-base * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio),
  45. "xxxxl": ($typescale-base * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio * $typescale-ratio),
  46. ),
  47. /* Letter Spacing */
  48. "letter-spacing": (
  49. "base": normal,
  50. "xs": normal,
  51. "sm": normal,
  52. "md": normal,
  53. "lg": normal,
  54. "xl": normal,
  55. "xxl": normal,
  56. "xxxl": normal,
  57. ),
  58. /* Line Height */
  59. "line-height": (
  60. "base": strip-unit($typescale-base),
  61. "body": 1.78,
  62. "heading": 1.125,
  63. ),
  64. ),
  65. /* Spacing */
  66. "spacing": (
  67. "unit": (2 * $baseline-unit), // 16px
  68. "measure": unset, // Use ch units here. ie: 60ch = 60 character max-width
  69. "horizontal": (2 * $baseline-unit), // 16px
  70. "vertical": (4 * $baseline-unit), // 32px matches default spacing in the editor.
  71. ),
  72. /* Breakpoints */
  73. "breakpoint": (
  74. "sm": 560px,
  75. "md": 640px,
  76. "lg": 782px,
  77. "xl": 1024px,
  78. "xxl": 1280px,
  79. ),
  80. /* Elevation */
  81. "elevation": (
  82. "none": 0px 0px 0px 0px rgba( 0, 0, 0, 0 ),
  83. "2dp": 0px 0px 4px 2px rgba( 0, 0, 0, 0.2 ),
  84. "4dp": 0px 0px 8px 2px rgba( 0, 0, 0, 0.2 ),
  85. "6dp": 2px 2px 4px 2px rgba( 0, 0, 0, 0.2 ),
  86. "8dp": 2px 2px 8px 0px rgba( 0, 0, 0, 0.2 ),
  87. "10dp": 4px 4px 8px 0px rgba( 0, 0, 0, 0.2 ),
  88. ),
  89. /* Border radius */
  90. "border-radius": (
  91. "sm": (0.5 * $typescale-root),
  92. "md": (0.75 * $typescale-root),
  93. "lg": $typescale-root,
  94. "pill": (10 * $typescale-root),
  95. ),
  96. );
  97. $child-theme-colors: map-extend($color-variables, (
  98. "color": (
  99. "tertiary": (
  100. "default": "var(--wp--preset--color--tertiary)"
  101. )
  102. )
  103. ), true);
  104. $config-global: map-merge($child-theme-colors, $config-global);
  105. /**
  106. * Elements
  107. */
  108. $config-elements: (
  109. "form": (
  110. // Colors
  111. "color": (
  112. "text": map-deep-get($config-global, "color", "black"),
  113. "border": map-deep-get($config-global, "color", "border", "default"),
  114. "border-focus": map-deep-get($config-global, "color", "primary", "hover"),
  115. ),
  116. // Fonts
  117. "font": (
  118. "family": (
  119. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  120. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  121. ),
  122. "line-height": map-deep-get($config-global, "font", "line-height", "base"),
  123. "size": map-deep-get($config-global, "font", "size", "base"),
  124. "weight": normal,
  125. ),
  126. // Borders
  127. "border": (
  128. "width": 2px,
  129. "radius": 0,
  130. ),
  131. "padding": #{map-deep-get($config-global, "spacing", "unit")},
  132. ),
  133. );
  134. /**
  135. * Button
  136. */
  137. $config-button: (
  138. // Colors
  139. "color": (
  140. "text": map-deep-get($config-global, "color", "background", "default"),
  141. "text-hover": map-deep-get($config-global, "color", "background", "default"),
  142. "background": map-deep-get($config-global, "color", "primary", "default"),
  143. "background-hover": map-deep-get($config-global, "color", "primary", "hover"),
  144. ),
  145. // Fonts
  146. "font": (
  147. "family": (
  148. "fallback": map-deep-get($config-global, "font", "family", "ui", "fallback"),
  149. "css-var": map-deep-get($config-global, "font", "family", "ui", "css-var"),
  150. ),
  151. "size": map-deep-get($config-global, "font", "size", "sm"),
  152. "weight": bold,
  153. "line-height": 1,
  154. ),
  155. // Borders
  156. "border-radius": 0,
  157. "border-width": 2px,
  158. // Padding
  159. "padding": (
  160. "vertical": map-deep-get($config-global, "spacing", "unit"),
  161. "horizontal": #{1.25 * map-deep-get($config-global, "spacing", "unit")},
  162. ),
  163. );
  164. /**
  165. * Cover
  166. */
  167. $config-cover: (
  168. "height": 90vh,
  169. "color": (
  170. "foreground": #{map-deep-get($config-global, "color", "background", "default")},
  171. "background": #{map-deep-get($config-global, "color", "foreground", "default")},
  172. )
  173. );
  174. /**
  175. * Heading
  176. */
  177. $config-heading: (
  178. // Fonts & Typography
  179. "font": (
  180. // Family
  181. "family": (
  182. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  183. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  184. ),
  185. // Size
  186. "size": (
  187. "h6": map-deep-get($config-global, "font", "size", "md"),
  188. "h5": map-deep-get($config-global, "font", "size", "lg"),
  189. "h4": map-deep-get($config-global, "font", "size", "xl"),
  190. "h3": map-deep-get($config-global, "font", "size", "xxl"),
  191. "h2": map-deep-get($config-global, "font", "size", "xxxl"),
  192. "h1": map-deep-get($config-global, "font", "size", "xxxxl"),
  193. ),
  194. // Letter spacing
  195. "line-height": (
  196. "h6": map-deep-get($config-global, "font", "line-height", "heading"),
  197. "h5": map-deep-get($config-global, "font", "line-height", "heading"),
  198. "h4": map-deep-get($config-global, "font", "line-height", "heading"),
  199. "h3": map-deep-get($config-global, "font", "line-height", "heading"),
  200. "h2": map-deep-get($config-global, "font", "line-height", "heading"),
  201. "h1": map-deep-get($config-global, "font", "line-height", "heading"),
  202. ),
  203. // Letter spacing
  204. "letter-spacing": (
  205. "h6": map-deep-get($config-global, "font", "letter-spacing", "sm"),
  206. "h5": map-deep-get($config-global, "font", "letter-spacing", "md"),
  207. "h4": map-deep-get($config-global, "font", "letter-spacing", "lg"),
  208. "h3": map-deep-get($config-global, "font", "letter-spacing", "xl"),
  209. "h2": map-deep-get($config-global, "font", "letter-spacing", "xxl"),
  210. "h1": map-deep-get($config-global, "font", "letter-spacing", "xxxl"),
  211. ),
  212. // Font Weight
  213. "weight": bold,
  214. ),
  215. );
  216. /**
  217. * Pullquote
  218. */
  219. $config-pullquote: (
  220. // Font
  221. "font": (
  222. "family": (
  223. "fallback": map-deep-get($config-heading, "font", "family", "fallback"),
  224. "css-var": map-deep-get($config-heading, "font", "family", "css-var"),
  225. ),
  226. ),
  227. // Border
  228. "color": (
  229. "border": #{map-deep-get($config-global, "color", "border", "default")},
  230. "background": #{map-deep-get($config-global, "color", "primary", "default")},
  231. ),
  232. // Border
  233. "border": (
  234. "width": 2px,
  235. ),
  236. );
  237. /**
  238. * Quote
  239. */
  240. $config-quote: (
  241. // Font
  242. "font": (
  243. "family": (
  244. "fallback": map-deep-get($config-heading, "font", "family", "fallback"),
  245. "css-var": map-deep-get($config-heading, "font", "family", "css-var"),
  246. ),
  247. ),
  248. );
  249. /**
  250. * Separator
  251. */
  252. $config-separator: (
  253. "height": 2px,
  254. "width": #{6 * map-deep-get($config-global, "spacing", "horizontal")},
  255. );
  256. /**
  257. * Header
  258. */
  259. $config-header: (
  260. "branding": (
  261. // Colors
  262. "color": (
  263. "text": map-deep-get($config-global, "color", "background", "default"),
  264. "link": map-deep-get($config-global, "color", "background", "default"),
  265. "link-hover": map-deep-get($config-global, "color", "foreground", "light"),
  266. ),
  267. // Fonts & Typography
  268. "title": (
  269. // Fonts
  270. "font": (
  271. "family": (
  272. "fallback": map-deep-get($config-global, "font", "family", "ui", "fallback"),
  273. "css-var": map-deep-get($config-global, "font", "family", "ui", "css-var"),
  274. ),
  275. "size": map-deep-get($config-global, "font", "size", "sm"),
  276. "weight": bold,
  277. "line-height": 1,
  278. ),
  279. ),
  280. // Fonts & Typography
  281. "description": (
  282. // Fonts
  283. "font": (
  284. "family": (
  285. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  286. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  287. ),
  288. "size": map-deep-get($config-global, "font", "size", "sm"),
  289. ),
  290. ),
  291. ),
  292. "main-nav": (
  293. // Colors
  294. "color": (
  295. "text": map-deep-get($config-global, "color", "background", "default"),
  296. "link": map-deep-get($config-global, "color", "background", "default"),
  297. "link-hover": map-deep-get($config-global, "color", "foreground", "light"),
  298. ),
  299. // Fonts
  300. "font": (
  301. "family": (
  302. "fallback": map-deep-get($config-global, "font", "family", "ui", "fallback"),
  303. "css-var": map-deep-get($config-global, "font", "family", "ui", "css-var"),
  304. ),
  305. "size": map-deep-get($config-global, "font", "size", "sm"),
  306. "weight": bold,
  307. "line-height": 1,
  308. ),
  309. "link-padding": map-deep-get($config-global, "spacing", "unit"),
  310. ),
  311. "social-nav": (
  312. // Colors
  313. "color": (
  314. "link": map-deep-get($config-global, "color", "background", "default"),
  315. "link-hover": map-deep-get($config-global, "color", "foreground", "light"),
  316. ),
  317. "link-padding": #{0.5 * map-deep-get($config-global, "spacing", "unit")},
  318. ),
  319. );
  320. /**
  321. * Footer
  322. */
  323. $config-footer: (
  324. // Colors
  325. "color": (
  326. "text": map-deep-get($config-global, "color", "foreground", "light"),
  327. "link": map-deep-get($config-global, "color", "foreground", "light"),
  328. "link-hover": map-deep-get($config-global, "color", "foreground", "dark"),
  329. ),
  330. // Fonts
  331. "font": (
  332. "family": (
  333. "fallback": map-deep-get($config-global, "font", "family", "ui", "fallback"),
  334. "css-var": map-deep-get($config-global, "font", "family", "ui", "css-var"),
  335. ),
  336. "size": map-deep-get($config-global, "font", "size", "sm"),
  337. "line-height": map-deep-get($config-global, "font", "line-height", "sm"),
  338. ),
  339. );