_config-child-theme-deep.scss 11 KB

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