_extra-child-theme.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. $color_background: map-deep-get($config-global, "color", "background", "default");
  5. $color_foreground: map-deep-get($config-global, "color", "foreground", "default");
  6. $color_foreground_light: map-deep-get($config-global, "color", "foreground", "light");
  7. $color_primary: map-deep-get($config-global, "color", "primary", "default");
  8. $color_primary_hover: map-deep-get($config-global, "color", "primary", "hover");
  9. $spacing_horizontal: map-deep-get($config-global, "spacing", "horizontal");
  10. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  11. $spacing_unit: map-deep-get($config-global, "spacing", "unit");
  12. /**
  13. * Elements
  14. */
  15. b, strong {
  16. font-weight: 600;
  17. }
  18. a {
  19. text-decoration: none;
  20. .wp-block-cover &,
  21. .wp-block-cover-image &,
  22. .wp-block-media-text &,
  23. p:not(.site-title) & {
  24. text-decoration: underline;
  25. &.wp-block-button__link,
  26. &:hover {
  27. text-decoration: none;
  28. }
  29. }
  30. }
  31. /**
  32. * Header
  33. */
  34. .site-header {
  35. max-width: 100%;
  36. padding-left: $spacing_unit;
  37. padding-right: $spacing_unit;
  38. position: relative;
  39. @include media(mobile) {
  40. padding: #{1.5 * $spacing_unit} $spacing_vertical;
  41. }
  42. }
  43. /**
  44. * CSS-grid Desktop Menu
  45. */
  46. @include media(mobile) {
  47. .site-header {
  48. align-items: center;
  49. display: grid;
  50. grid-template-columns: auto;
  51. grid-template-rows: auto;
  52. grid-column-gap: #{map-deep-get($config-global, "spacing", "unit")};
  53. grid-template-areas:
  54. "site-branding main-navigation";
  55. &:before,
  56. &:after {
  57. content: none;
  58. display: none;
  59. }
  60. & > * {
  61. margin-top: 0;
  62. margin-bottom: 0;
  63. }
  64. .site-branding {
  65. grid-area: site-branding;
  66. align-self: center;
  67. }
  68. .site-logo {
  69. & + .site-title {
  70. margin-top: #{map-deep-get($config-global, "spacing", "unit")};
  71. }
  72. }
  73. .site-title {
  74. & + .site-description {
  75. margin-top: #{0.5 * $baseline-unit};
  76. }
  77. }
  78. .main-navigation {
  79. align-self: center;
  80. grid-area: main-navigation;
  81. justify-self: flex-end;
  82. & > div > ul {
  83. justify-content: flex-end;
  84. margin-left: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  85. margin-right: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  86. & > li > a {
  87. padding: 0 #{map-deep-get($config-header, "main-nav", "link-padding")};
  88. }
  89. & > .menu-item-has-children > a::after {
  90. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  91. }
  92. }
  93. & > div > ul > li:hover,
  94. & > div > ul > li:focus-within,
  95. & > div > ul > li.current-menu-item {
  96. & > a {
  97. color: #{map-deep-get($config-global, "color", "primary", "default")};
  98. }
  99. & > ul {
  100. box-shadow: none;
  101. overflow: hidden;
  102. &:before {
  103. border-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid #{map-deep-get($config-global, "color", "primary", "default")};
  104. border-left: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  105. border-right: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  106. content: "";
  107. display: block;
  108. margin-left: #{map-deep-get($config-global, "spacing", "unit")};
  109. width: #{map-deep-get($config-global, "spacing", "unit")};
  110. }
  111. }
  112. & li {
  113. & > a {
  114. background: #{map-deep-get($config-global, "color", "primary", "default")};
  115. color: #{map-deep-get($config-global, "color", "background", "default")};
  116. }
  117. &:hover > a,
  118. &.focus > a,
  119. &.current-menu-item > a {
  120. background: #{map-deep-get($config-global, "color", "primary", "hover")};
  121. }
  122. }
  123. }
  124. }
  125. .social-navigation {
  126. align-self: center;
  127. justify-self: flex-end;
  128. }
  129. }
  130. }
  131. /**
  132. * Main
  133. */
  134. .site-main {
  135. padding-top: 0;
  136. }
  137. .site-main > article > .entry-header,
  138. .site-main > .page-header,
  139. .site-main > .not-found > .page-header {
  140. margin-top: #{0.666 * $spacing_vertical};
  141. @include media(mobile) {
  142. margin-top: #{2 * $spacing_vertical};
  143. }
  144. }
  145. /**
  146. * Content
  147. */
  148. // Entry Title Link
  149. .entry-title,
  150. .page-title,
  151. .a8c-posts-list .a8c-posts-list-item__title,
  152. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  153. a {
  154. color: inherit;
  155. text-decoration: none;
  156. &:active,
  157. &:focus,
  158. &:hover {
  159. color: map-deep-get($config-global, "color", "primary", "default");
  160. }
  161. }
  162. }
  163. // Sticky tag
  164. .sticky-post,
  165. .a8c-posts-list .a8c-posts-list-item__featured span {
  166. padding: #{0.5 * $baseline-unit} #{0.66 * $spacing_unit};
  167. }
  168. /**
  169. * Next/Previous navigation
  170. */
  171. // Singular navigation
  172. .post-navigation {
  173. .meta-nav {
  174. color: map-deep-get($config-global, "color", "foreground", "light");
  175. }
  176. .post-title {
  177. font-size: #{map-deep-get($config-heading, "font", "size", "h4")};
  178. line-height: #{map-deep-get($config-global, "font", "line-height", "heading")};
  179. }
  180. }
  181. /**
  182. * Comments
  183. */
  184. .logged-in-as,
  185. .comment-notes,
  186. .comment-form-cookies-consent {
  187. font-size: map-deep-get($config-global, "font", "size", "sm");
  188. }
  189. .comment-form-cookies-consent input[type=checkbox] + label {
  190. line-height: #{map-deep-get($config-global, "font", "line-height", "body")};
  191. }
  192. .comment-notes {
  193. color: map-deep-get($config-global, "color", "foreground", "light");
  194. }
  195. .comment-form > p:not(.comment-form-cookies-consent) label {
  196. font-weight: 600;
  197. }
  198. /**
  199. * Blocks
  200. */
  201. // Cover
  202. .wp-block-cover,
  203. .wp-block-cover-image {
  204. h1, h2, h3, h4, h5, h6 {
  205. font-weight: 700;
  206. }
  207. @include media(desktop) {
  208. min-height: #{20 * map-deep-get($config-global, "spacing", "vertical")};
  209. h1 {
  210. font-size: map-deep-get($config-global, "font", "size", "xxxxl")
  211. }
  212. h2 {
  213. font-size: map-deep-get($config-global, "font", "size", "xxxl");
  214. }
  215. h3 {
  216. font-size: map-deep-get($config-global, "font", "size", "xxl");
  217. }
  218. h4 {
  219. font-size: map-deep-get($config-global, "font", "size", "xl");
  220. }
  221. h5 {
  222. font-size: map-deep-get($config-global, "font", "size", "lg");
  223. }
  224. h6 {
  225. font-size: map-deep-get($config-global, "font", "size", "md");
  226. }
  227. }
  228. }
  229. // Column
  230. .wp-block-columns.alignfull {
  231. @include media(mobile) {
  232. padding-right: $spacing_vertical;
  233. padding-left: $spacing_vertical;
  234. }
  235. }
  236. .jetpack-business-hours {
  237. dd {
  238. padding-left: 0;
  239. }
  240. }
  241. .wp-block-newspack-blocks-homepage-articles {
  242. article {
  243. .entry-title a{
  244. &:active,
  245. &:focus,
  246. &:hover {
  247. text-decoration: none;
  248. }
  249. }
  250. .more-link {
  251. }
  252. .cat-links a,
  253. .more-link,
  254. .entry-meta a {
  255. text-decoration: none;
  256. &:active,
  257. &:focus,
  258. &:hover {
  259. color: $color_primary_hover;
  260. text-decoration: underline;
  261. }
  262. }
  263. }
  264. &.image-alignbehind article {
  265. .entry-title a{
  266. &:active,
  267. &:focus,
  268. &:hover {
  269. text-decoration: underline;
  270. }
  271. }
  272. .more-link {
  273. &:active,
  274. &:focus,
  275. &:hover {
  276. color: inherit;
  277. }
  278. }
  279. }
  280. }
  281. .has-background:not(.has-background-background-color),
  282. [class*="background-color"]:not(.has-background-background-color),
  283. [style*="background-color"] {
  284. .wp-block-newspack-blocks-homepage-articles article {
  285. .entry-title a:hover {
  286. text-decoration: underline;
  287. }
  288. }
  289. }
  290. /**
  291. * Widgets
  292. */
  293. .widget {
  294. select {
  295. max-width: 100%;
  296. }
  297. }
  298. .widget-title {
  299. font-size: #{map-deep-get($config-heading, "font", "size", "h3")};
  300. margin-bottom: #{0.5 * $spacing_vertical};
  301. }
  302. .widget_archive,
  303. .widget_categories,
  304. .widget_meta,
  305. .widget_nav_menu,
  306. .widget_pages,
  307. .widget_recent_comments,
  308. .widget_recent_entries,
  309. .widget_rss {
  310. ul {
  311. padding-left: 0;
  312. list-style: none;
  313. li {
  314. color: map-deep-get($config-global, "color", "foreground", "light");
  315. font-weight: 600;
  316. }
  317. ul {
  318. counter-reset: submenu;
  319. }
  320. ul > li > a::before {
  321. font-weight: normal;
  322. content: "\2013\00a0" counters(submenu, "\2013\00a0", none);
  323. counter-increment: submenu
  324. }
  325. }
  326. }
  327. .widget_tag_cloud {
  328. .tagcloud {
  329. font-weight: 600;
  330. }
  331. }
  332. .widget_search {
  333. .search-field {
  334. width: 100%;
  335. @include media(mobile) {
  336. width: auto;
  337. }
  338. }
  339. .search-submit {
  340. display: block;
  341. margin-top: $typescale-base;
  342. }
  343. }
  344. .widget_calendar .calendar_wrap {
  345. text-align: center;
  346. table td,
  347. table th {
  348. border: none;
  349. }
  350. a {
  351. text-decoration: underline;
  352. }
  353. }
  354. .widget_links li,
  355. .widget_jp_blogs_i_follow li,
  356. .widget_rss_links li {
  357. font-family: inherit;
  358. font-family: var( --font-base, inherit );
  359. }
  360. /**
  361. * Footer
  362. */
  363. @include media(mobile-only) {
  364. .site-info {
  365. text-align: center;
  366. }
  367. }
  368. //Social Navigation
  369. .social-navigation {
  370. flex: 1 0 50%;
  371. order: 2;
  372. margin-bottom: 0;
  373. }
  374. .social-links-menu {
  375. flex-wrap: wrap;
  376. justify-content: flex-end;
  377. }
  378. @include media(mobile-only) {
  379. .social-links-menu {
  380. justify-content: center;
  381. }
  382. }
  383. // Updates the Mobile Navigation to be next to the site title.
  384. @import "../../varia/sass/components/header/_site-mobile-nav-side";
  385. @include media(mobile-only) {
  386. .mobile-nav-side {
  387. .site-header.has-menu {
  388. .site-branding {
  389. display: contents;
  390. }
  391. }
  392. }
  393. }
  394. /**
  395. * Search block
  396. */
  397. .wp-block-search {
  398. &.wp-block-search__button-inside {
  399. .wp-block-search__inside-wrapper{
  400. border-radius: #{map-deep-get($config-button, "border-radius")};
  401. }
  402. .wp-block-search__input {
  403. background: transparent;
  404. }
  405. }
  406. .wp-block-search__input {
  407. margin-right: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  408. border-radius: #{map-deep-get($config-button, "border-radius")};
  409. }
  410. }