_extra-child-theme.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. // @import "";
  5. $spacing_unit: map-deep-get($config-global, "spacing", "unit");
  6. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  7. /**
  8. * Elements
  9. */
  10. a {
  11. .site-header &,
  12. &:hover,
  13. &:focus,
  14. .nav-links & {
  15. text-decoration: none;
  16. }
  17. }
  18. /**
  19. * Header
  20. */
  21. .site-header,
  22. .site-footer {
  23. max-width: 100%;
  24. padding-left: $spacing_unit;
  25. padding-right: $spacing_unit;
  26. position: relative;
  27. @include media(mobile) {
  28. padding: $spacing_vertical;
  29. }
  30. }
  31. .social-navigation {
  32. a {
  33. vertical-align: middle;
  34. }
  35. ul li a svg {
  36. display: block;
  37. width: (1.5 * $spacing_unit);
  38. height: (1.5 * $spacing_unit);
  39. transform: translateZ(0);
  40. }
  41. }
  42. /**
  43. * CSS-grid Desktop Menu
  44. */
  45. @include media(mobile) {
  46. .site-header {
  47. align-items: center;
  48. display: grid;
  49. grid-template-columns: auto;
  50. grid-template-rows: auto;
  51. grid-column-gap: $spacing_unit;
  52. grid-template-areas:
  53. "site-logo site-logo"
  54. "site-title social-navigation"
  55. "site-description main-navigation";
  56. &::before,
  57. &::after {
  58. content: none;
  59. display: none;
  60. }
  61. & > * {
  62. margin-top: 0;
  63. margin-bottom: 0;
  64. }
  65. &.has-logo:not(.has-title-and-tagline) {
  66. grid-template-areas:
  67. "site-logo main-navigation"
  68. "site-logo social-navigation";
  69. }
  70. }
  71. .site-logo {
  72. grid-area: site-logo;
  73. margin-bottom: $spacing_unit;
  74. }
  75. .site-title {
  76. align-self: flex-end;
  77. grid-area: site-title;
  78. & + .site-description {
  79. margin-top: 0;
  80. }
  81. }
  82. .site-description {
  83. align-self: center;
  84. grid-area: site-description;
  85. }
  86. .main-navigation {
  87. align-self: center;
  88. grid-area: main-navigation;
  89. justify-self: flex-end;
  90. & > div > ul {
  91. justify-content: flex-end;
  92. margin-left: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  93. margin-right: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  94. & > li {
  95. padding: #{map-deep-get($config-header, "main-nav", "link-padding")};
  96. & > a {
  97. padding: 0;
  98. }
  99. }
  100. & > .menu-item-has-children > a::after {
  101. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  102. }
  103. }
  104. & > div > ul > li:hover,
  105. & > div > ul > li:focus-within,
  106. & > div > ul > li.current-menu-item {
  107. & > a {
  108. color: #{map-deep-get($config-global, "color", "primary", "default")};
  109. }
  110. & > ul {
  111. box-shadow: none;
  112. overflow: hidden;
  113. &::before {
  114. border-bottom: (0.5 * $spacing_unit) solid #{map-deep-get($config-global, "color", "primary", "default")};
  115. border-left: (0.5 * $spacing_unit) solid transparent;
  116. border-right: (0.5 * $spacing_unit) solid transparent;
  117. content: "";
  118. display: block;
  119. margin-left: $spacing_unit;
  120. width: $spacing_unit;
  121. }
  122. }
  123. & li {
  124. & > a {
  125. background: #{map-deep-get($config-global, "color", "primary", "default")};
  126. color: #{map-deep-get($config-global, "color", "background", "default")};
  127. }
  128. &:hover > a,
  129. &.focus > a,
  130. &.current-menu-item > a {
  131. background: #{map-deep-get($config-global, "color", "primary", "hover")};
  132. }
  133. }
  134. }
  135. }
  136. .social-navigation {
  137. align-self: center;
  138. grid-area: social-navigation;
  139. justify-self: flex-end;
  140. }
  141. }
  142. /**
  143. * Main
  144. */
  145. .site-main {
  146. padding-top: 0;
  147. }
  148. .site-main > article > .entry-header,
  149. .site-main > .page-header,
  150. .site-main > .not-found > .page-header {
  151. margin-top: #{0.666 * $spacing_vertical};
  152. @include media(mobile) {
  153. margin-top: #{2 * $spacing_vertical};
  154. }
  155. }
  156. .site-main > {
  157. article > .entry-header,
  158. .page-header,
  159. .not-found > .page-header {
  160. margin-top: #{0.666 * $spacing_vertical};
  161. @include media(mobile) {
  162. margin-top: #{2 * $spacing_vertical};
  163. }
  164. }
  165. }
  166. #main .entry-content .entry-attachment {
  167. max-width: calc(100% - #{2 * $spacing_vertical});
  168. }
  169. /**
  170. * Posts
  171. */
  172. .entry-title,
  173. .page-title,
  174. .a8c-posts-list .a8c-posts-list-item__title,
  175. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  176. a {
  177. color: inherit;
  178. text-decoration: none;
  179. &:active,
  180. &:focus,
  181. &:hover {
  182. color: map-deep-get($config-global, "color", "primary", "default");
  183. }
  184. }
  185. }
  186. .entry-meta,
  187. .entry-footer {
  188. color: map-deep-get($config-global, "color", "foreground", "default");
  189. }
  190. .entry-meta a:hover,
  191. .entry-meta a:active,
  192. .entry-footer a:hover,
  193. .entry-footer a:active {
  194. color: map-deep-get($config-global, "color", "primary", "default");
  195. }
  196. /**
  197. * Comments
  198. */
  199. .logged-in-as,
  200. .comment-notes,
  201. .comment-form-cookies-consent {
  202. font-size: map-deep-get($config-global, "font", "size", "sm");
  203. }
  204. .comment-form-cookies-consent input[type="checkbox"] + label {
  205. line-height: #{map-deep-get($config-global, "font", "line-height", "body")};
  206. }
  207. .comment-notes {
  208. color: map-deep-get($config-global, "color", "foreground", "light");
  209. }
  210. .comment-form > p:not(.comment-form-cookies-consent) label {
  211. font-weight: 600;
  212. }
  213. /**
  214. * Widgets
  215. */
  216. @include media(laptop) {
  217. .site-footer .widget-area {
  218. max-width: 100%;
  219. display: grid;
  220. grid-template-columns: 1fr 1fr;
  221. column-gap: 32px;
  222. & > .widget {
  223. margin-top: 0;
  224. }
  225. }
  226. }
  227. .widget {
  228. select {
  229. max-width: 100%;
  230. }
  231. }
  232. .widget-title {
  233. font-size: #{map-deep-get($config-heading, "font", "size", "h5")};
  234. margin-bottom: #{0.5 * $spacing_vertical};
  235. }
  236. .widget_archive,
  237. .widget_categories,
  238. .widget_links,
  239. .widget_meta,
  240. .widget_nav_menu,
  241. .widget_pages,
  242. .widget_recent_comments,
  243. .widget_recent_entries,
  244. .widget_rss,
  245. .widget_rss_links,
  246. .widget_top-posts,
  247. .widget_authors,
  248. .widget_jp_blogs_i_follow,
  249. .widget_top-click,
  250. .widget_upcoming_events_widget {
  251. ul {
  252. padding-left: 0;
  253. margin-right: 0;
  254. list-style: none;
  255. li {
  256. color: map-deep-get($config-global, "color", "foreground", "light");
  257. font-weight: 600;
  258. }
  259. ul {
  260. counter-reset: submenu;
  261. }
  262. ul > li > a::before {
  263. font-weight: normal;
  264. content: "\2013\00a0" counters(submenu, "\2013\00a0", none);
  265. counter-increment: submenu;
  266. }
  267. }
  268. }
  269. .widget_tag_cloud {
  270. .tagcloud {
  271. font-weight: 600;
  272. }
  273. }
  274. .widget_search {
  275. .search-field {
  276. width: 100%;
  277. @include media(mobile) {
  278. width: auto;
  279. }
  280. }
  281. .search-submit {
  282. display: block;
  283. margin-top: $typescale-base;
  284. }
  285. }
  286. .widget_calendar .calendar_wrap {
  287. text-align: center;
  288. table td,
  289. table th {
  290. border: none;
  291. }
  292. a {
  293. text-decoration: underline;
  294. }
  295. }
  296. .widget_links li,
  297. .widget_jp_blogs_i_follow li,
  298. .widget_rss_links li {
  299. font-family: inherit;
  300. font-family: var(--font-base, inherit);
  301. }
  302. /**
  303. * Blocks
  304. */
  305. .wp-block-cover,
  306. .wp-block-cover-image,
  307. .has-background {
  308. .wp-block-separator {
  309. border-color: currentcolor;
  310. }
  311. }
  312. .wp-block-latest-posts {
  313. > li {
  314. > a {
  315. color: map-deep-get($config-global, "color", "foreground", "default");
  316. display: inline-block;
  317. text-decoration: none;
  318. &:hover,
  319. &:focus,
  320. &:active {
  321. color: map-deep-get($config-global, "color", "primary", "default");
  322. .has-background:not(.has-background-background-color) & {
  323. color: currentcolor;
  324. text-decoration: underline;
  325. }
  326. }
  327. }
  328. }
  329. .wp-block-latest-posts__post-excerpt,
  330. .wp-block-latest-posts__post-full-content {
  331. margin-top: $spacing_unit;
  332. }
  333. }
  334. // Updates the Mobile Navigation to be next to the site title.
  335. @import "../../varia/sass/components/header/_site-mobile-nav-side";