_config-child-theme-deep.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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: 20px; // Set 16px/1em default on html
  12. $typescale-base: 1rem; // Set 1em default on body == $typescale-root;
  13. $typescale-ratio: 1.15; // 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": "\"Noto Sans\"\, -apple-system\, BlinkMacSystemFont\, \"Segoe UI\"\, \"Roboto\"\, \"Oxygen\"\, \"Ubuntu\"\, \"Cantarell\"\, \"Fira Sans\"\, \"Droid Sans\"\, \"Helvetica Neue\"\, sans-serif",
  21. "css-var": '--font-headings',
  22. ),
  23. "secondary": (
  24. "fallback": "\"Noto Sans\"\, -apple-system\, BlinkMacSystemFont\, \"Segoe UI\"\, \"Roboto\"\, \"Oxygen\"\, \"Ubuntu\"\, \"Cantarell\"\, \"Fira Sans\"\, \"Droid Sans\"\, \"Helvetica Neue\"\, sans-serif",
  25. "css-var": '--font-base',
  26. ),
  27. "code": "monospace, monospace",
  28. "ui": (
  29. "fallback": "\"Noto Sans\"\, -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.6,
  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.25 * $typescale-root),
  92. "md": (0.5 * $typescale-root),
  93. "lg": (0.75 * $typescale-root),
  94. "pill": (10 * $typescale-root),
  95. ),
  96. );
  97. $config-global: map-merge($color-variables, $config-global);
  98. /**
  99. * Elements
  100. */
  101. $config-elements: (
  102. "form": (
  103. // Colors
  104. "color": (
  105. "text": map-deep-get($config-global, "color", "black"),
  106. "border": map-deep-get($config-global, "color", "border", "default"),
  107. "border-focus": map-deep-get($config-global, "color", "primary", "hover"),
  108. ),
  109. // Fonts
  110. "font": (
  111. "family": (
  112. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  113. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  114. ),
  115. "line-height": map-deep-get($config-global, "font", "line-height", "md"),
  116. "size": map-deep-get($config-global, "font", "size", "md"),
  117. "weight": bold,
  118. ),
  119. // Borders
  120. "border": (
  121. "width": 1px,
  122. "radius": map-deep-get($config-global, "border-radius", "sm"),
  123. ),
  124. "padding": #{map-deep-get($config-global, "spacing", "unit")},
  125. ),
  126. );
  127. /**
  128. * Button
  129. */
  130. $config-button: (
  131. // Colors
  132. "color": (
  133. "text": map-deep-get($config-global, "color", "background", "default"),
  134. "text-hover": map-deep-get($config-global, "color", "background", "default"),
  135. "background": map-deep-get($config-global, "color", "primary", "default"),
  136. "background-hover": map-deep-get($config-global, "color", "primary", "hover"),
  137. ),
  138. // Fonts
  139. "font": (
  140. "family": (
  141. "fallback": map-deep-get($config-global, "font", "family", "ui", "fallback"),
  142. "css-var": map-deep-get($config-global, "font", "family", "ui", "css-var"),
  143. ),
  144. "size": map-deep-get($config-global, "font", "size", "base"),
  145. "weight": bold,
  146. "line-height": 1,
  147. ),
  148. // Borders
  149. "border-radius": map-deep-get($config-global, "border-radius", "sm"),
  150. "border-width": 2px,
  151. // Padding
  152. "padding": (
  153. "vertical": map-deep-get($config-global, "spacing", "unit"),
  154. "horizontal": #{1.5 * map-deep-get($config-global, "spacing", "unit")},
  155. ),
  156. );
  157. /**
  158. * Cover
  159. */
  160. $config-cover: (
  161. "height": #{15 * map-deep-get($config-global, "spacing", "vertical")},
  162. "color": (
  163. "foreground": #{map-deep-get($config-global, "color", "background", "default")},
  164. "background": #{map-deep-get($config-global, "color", "foreground", "default")},
  165. )
  166. );
  167. /**
  168. * Heading
  169. */
  170. $config-heading: (
  171. // Fonts & Typography
  172. "font": (
  173. // Family
  174. "family": (
  175. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  176. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  177. ),
  178. // Size
  179. "size": (
  180. "h6": map-deep-get($config-global, "font", "size", "md"),
  181. "h5": map-deep-get($config-global, "font", "size", "lg"),
  182. "h4": map-deep-get($config-global, "font", "size", "xl"),
  183. "h3": map-deep-get($config-global, "font", "size", "xxl"),
  184. "h2": map-deep-get($config-global, "font", "size", "xxxl"),
  185. "h1": map-deep-get($config-global, "font", "size", "xxxxl"),
  186. ),
  187. // Letter spacing
  188. "line-height": (
  189. "h6": map-deep-get($config-global, "font", "line-height", "heading"),
  190. "h5": map-deep-get($config-global, "font", "line-height", "heading"),
  191. "h4": map-deep-get($config-global, "font", "line-height", "heading"),
  192. "h3": map-deep-get($config-global, "font", "line-height", "heading"),
  193. "h2": map-deep-get($config-global, "font", "line-height", "heading"),
  194. "h1": map-deep-get($config-global, "font", "line-height", "heading"),
  195. ),
  196. // Letter spacing
  197. "letter-spacing": (
  198. "h6": map-deep-get($config-global, "font", "letter-spacing", "sm"),
  199. "h5": map-deep-get($config-global, "font", "letter-spacing", "md"),
  200. "h4": map-deep-get($config-global, "font", "letter-spacing", "lg"),
  201. "h3": map-deep-get($config-global, "font", "letter-spacing", "xl"),
  202. "h2": map-deep-get($config-global, "font", "letter-spacing", "xxl"),
  203. "h1": map-deep-get($config-global, "font", "letter-spacing", "xxxl"),
  204. ),
  205. // Font Weight
  206. "weight": bold,
  207. ),
  208. );
  209. /**
  210. * List
  211. */
  212. $config-list: (
  213. // Fonts
  214. "font": (
  215. "family": (
  216. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  217. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  218. ),
  219. ),
  220. );
  221. /**
  222. * Pullquote
  223. */
  224. $config-pullquote: (
  225. // Font
  226. "font": (
  227. "family": (
  228. "fallback": map-deep-get($config-heading, "font", "family", "fallback"),
  229. "css-var": map-deep-get($config-heading, "font", "family", "css-var"),
  230. ),
  231. ),
  232. // Border
  233. "color": (
  234. "border": #{map-deep-get($config-global, "color", "border", "default")},
  235. "background": #{map-deep-get($config-global, "color", "primary", "default")},
  236. ),
  237. // Border
  238. "border": (
  239. "width": #{0.25 * $baseline-unit},
  240. ),
  241. );
  242. /**
  243. * Quote
  244. */
  245. $config-quote: (
  246. // Font
  247. "font": (
  248. "family": (
  249. "fallback": map-deep-get($config-heading, "font", "family", "fallback"),
  250. "css-var": map-deep-get($config-heading, "font", "family", "css-var"),
  251. ),
  252. ),
  253. );
  254. /**
  255. * Separator
  256. */
  257. $config-separator: (
  258. "height": #{0.125 * map-deep-get($config-global, "spacing", "unit")},
  259. "width": #{6 * map-deep-get($config-global, "spacing", "horizontal")},
  260. );
  261. /**
  262. * Header
  263. */
  264. $config-header: (
  265. "branding": (
  266. // Colors
  267. "color": (
  268. "text": map-deep-get($config-global, "color", "background", "default"),
  269. "link": map-deep-get($config-global, "color", "background", "default"),
  270. "link-hover": rgba(map-deep-get($config-global, "color", "background", "default"), 0.8),
  271. ),
  272. // Fonts & Typography
  273. "title": (
  274. // Fonts
  275. "font": (
  276. "family": (
  277. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  278. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  279. ),
  280. "size": map-deep-get($config-global, "font", "size", "xxl"),
  281. "weight": bold,
  282. "line-height": 1,
  283. ),
  284. ),
  285. // Fonts & Typography
  286. "description": (
  287. // Fonts
  288. "font": (
  289. "family": (
  290. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  291. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  292. ),
  293. "size": map-deep-get($config-global, "font", "size", "xs"),
  294. ),
  295. ),
  296. ),
  297. "main-nav": (
  298. // Colors
  299. "color": (
  300. "text": map-deep-get($config-global, "color", "background", "default"),
  301. "link": map-deep-get($config-global, "color", "background", "default"),
  302. "link-hover": rgba(map-deep-get($config-global, "color", "background", "default"), 0.8),
  303. ),
  304. // Fonts
  305. "font": (
  306. "family": (
  307. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  308. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  309. ),
  310. "size": map-deep-get($config-global, "font", "size", "base"),
  311. "weight": bold,
  312. "line-height": 1,
  313. ),
  314. "link-padding": (0.5 * map-deep-get($config-global, "spacing", "unit")),
  315. ),
  316. "social-nav": (
  317. // Colors
  318. "color": (
  319. "link": map-deep-get($config-global, "color", "background", "default"),
  320. "link-hover": rgba(map-deep-get($config-global, "color", "background", "default"), 0.8),
  321. ),
  322. "link-padding": (0.5 * map-deep-get($config-global, "spacing", "unit")),
  323. ),
  324. );
  325. /**
  326. * Footer
  327. */
  328. $config-footer: (
  329. // Colors
  330. "color": (
  331. "text": map-deep-get($config-global, "color", "foreground", "light"),
  332. "link": map-deep-get($config-global, "color", "foreground", "light"),
  333. "link-hover": map-deep-get($config-global, "color", "primary", "default"),
  334. ),
  335. // Fonts
  336. "font": (
  337. "family": (
  338. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  339. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  340. ),
  341. "size": map-deep-get($config-global, "font", "size", "xs"),
  342. "line-height": map-deep-get($config-global, "font", "line-height", "xs"),
  343. ),
  344. );