_config-child-theme-deep.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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": "\"PT Serif\"\, Times, sans-serif",
  21. "css-var": '--font-headings',
  22. ),
  23. "secondary": (
  24. "fallback": "\"PT Sans\"\, Arial\, sans-serif",
  25. "css-var": '--font-base',
  26. ),
  27. "code": "\"Courier 10 Pitch\"\, Courier\, monospace",
  28. "ui": (
  29. "fallback": "-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": 4px,
  92. "md": 8px,
  93. "lg": 12px,
  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", "base"),
  116. "size": map-deep-get($config-global, "font", "size", "base"),
  117. "weight": 400,
  118. ),
  119. // Borders
  120. "border": (
  121. "width": 1px,
  122. "radius": 4px,
  123. ),
  124. "padding": #{0.5 * 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", "secondary", "fallback"),
  142. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  143. ),
  144. "size": map-deep-get($config-global, "font", "size", "sm"),
  145. "weight": 700,
  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": #{18 * map-deep-get($config-global, "spacing", "vertical")},
  162. "color": (
  163. "foreground": #{map-deep-get($config-global, "color", "white")},
  164. "background": #{map-deep-get($config-global, "color", "black")},
  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", "sm"),
  181. "h5": map-deep-get($config-global, "font", "size", "base"),
  182. "h4": map-deep-get($config-global, "font", "size", "md"),
  183. "h3": map-deep-get($config-global, "font", "size", "lg"),
  184. "h2": map-deep-get($config-global, "font", "size", "xl"),
  185. "h1": map-deep-get($config-global, "font", "size", "xxl"),
  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": 400,
  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-global, "font", "family", "secondary", "fallback"),
  229. "css-var": map-deep-get($config-global, "font", "family", "secondary", "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": 2px,
  240. ),
  241. );
  242. /**
  243. * Quote
  244. */
  245. $config-quote: (
  246. // Font
  247. "font": (
  248. "family": (
  249. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  250. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  251. ),
  252. ),
  253. );
  254. /**
  255. * Separator
  256. */
  257. $config-separator: (
  258. "height": 1px,
  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", "foreground", "light"),
  269. "link": map-deep-get($config-global, "color", "foreground", "default"),
  270. "link-hover": map-deep-get($config-global, "color", "primary", "default"),
  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": 400,
  282. ),
  283. ),
  284. // Fonts & Typography
  285. "description": (
  286. // Fonts
  287. "font": (
  288. "family": (
  289. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  290. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  291. ),
  292. "size": map-deep-get($config-global, "font", "size", "sm"),
  293. ),
  294. ),
  295. ),
  296. "main-nav": (
  297. // Colors
  298. "color": (
  299. "text": map-deep-get($config-global, "color", "white"),
  300. "link": map-deep-get($config-global, "color", "white"),
  301. "link-hover": map-deep-get($config-global, "color", "white"),
  302. ),
  303. // Fonts
  304. "font": (
  305. "family": (
  306. "fallback": map-deep-get($config-global, "font", "family", "secondary", "fallback"),
  307. "css-var": map-deep-get($config-global, "font", "family", "secondary", "css-var"),
  308. ),
  309. "size": map-deep-get($config-global, "font", "size", "sm"),
  310. "weight": 700,
  311. "line-height": 1,
  312. ),
  313. "link-padding": map-deep-get($config-global, "spacing", "unit"),
  314. ),
  315. "social-nav": (
  316. // Colors
  317. "color": (
  318. "link": map-deep-get($config-global, "color", "white"),
  319. "link-hover": map-deep-get($config-global, "color", "white"),
  320. ),
  321. "link-padding": 0,
  322. ),
  323. );
  324. /**
  325. * Footer
  326. */
  327. $config-footer: (
  328. // Colors
  329. "color": (
  330. "text": map-deep-get($config-global, "color", "foreground", "light"),
  331. "link": map-deep-get($config-global, "color", "foreground", "light"),
  332. "link-hover": map-deep-get($config-global, "color", "primary", "default"),
  333. ),
  334. // Fonts
  335. "font": (
  336. "family": (
  337. "fallback": map-deep-get($config-global, "font", "family", "primary", "fallback"),
  338. "css-var": map-deep-get($config-global, "font", "family", "primary", "css-var"),
  339. ),
  340. "size": map-deep-get($config-global, "font", "size", "sm"),
  341. "line-height": map-deep-get($config-global, "font", "line-height", "sm"),
  342. ),
  343. );