_extra-child-theme.scss 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. /**
  5. * Variables
  6. */
  7. $color_background: map-deep-get($config-global, "color", "background", "default");
  8. $color_background_light: map-deep-get($config-global, "color", "background", "light");
  9. $color_foreground: map-deep-get($config-global, "color", "foreground", "default");
  10. $color_foreground_light: map-deep-get($config-global, "color", "foreground", "light");
  11. $color_primary: map-deep-get($config-global, "color", "primary", "default");
  12. $color_border: map-deep-get($config-global, "color", "border", "default");
  13. $spacing_unit: map-deep-get($config-global, "spacing", "unit");
  14. $spacing_horizontal: map-deep-get($config-global, "spacing", "horizontal");
  15. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  16. $border_radius_sm: map-deep-get($config-global, "border-radius", "sm");
  17. $font_size_sm: map-deep-get($config-global, "font", "size", "sm");
  18. $font_size_lg: map-deep-get($config-global, "font", "size", "lg");
  19. $font_size_xl: map-deep-get($config-global, "font", "size", "xl");
  20. $font_size_h1: map-deep-get($config-heading, "font", "size", "h1");
  21. /**
  22. * Reset
  23. */
  24. a,
  25. .wp-block-newspack-blocks-homepage-articles article .entry-meta a,
  26. .wp-block-newspack-blocks-homepage-articles article .cat-links a,
  27. .entry-content .more-link {
  28. text-decoration: none;
  29. .has-background &:not(.wp-block-button__link):not(.wp-block-file__button),
  30. &:active,
  31. &:focus,
  32. &:hover {
  33. text-decoration: underline;
  34. }
  35. }
  36. dt {
  37. font-family: inherit;
  38. font-family: var( --font-base, inherit );
  39. }
  40. .entry-header,
  41. .entry-footer,
  42. .page-title,
  43. .author-title,
  44. .comments-title,
  45. .comment-reply-title {
  46. text-align: center;
  47. }
  48. .comment-reply-title {
  49. display: inherit;
  50. }
  51. .comment .comment-reply-title {
  52. display: flex;
  53. }
  54. .pagination .nav-links {
  55. justify-content: center;
  56. }
  57. /**
  58. * Wide Header & Footer
  59. */
  60. #masthead,
  61. #colophon {
  62. @extend %responsive-alignwide;
  63. }
  64. /**
  65. * Header
  66. */
  67. // Site Header
  68. .site-header {
  69. align-items: center;
  70. display: flex;
  71. justify-content: space-between;
  72. & > * {
  73. margin-top: 0;
  74. margin-bottom: 0;
  75. }
  76. }
  77. // Site Branding
  78. .site-branding {
  79. margin: 0;
  80. margin-right: auto;
  81. & > * {
  82. margin-top: #{0.5 * $spacing_unit};
  83. &:first-child {
  84. margin-top: 0;
  85. }
  86. }
  87. .site-logo img {
  88. max-height: #{3 * $spacing_vertical};
  89. width: auto;
  90. }
  91. .site-description {
  92. display: none;
  93. @include media(mobile) {
  94. display: block;
  95. }
  96. }
  97. }
  98. // Main Navigation
  99. .main-navigation {
  100. margin: 0;
  101. margin-left: auto;
  102. & > div {
  103. background: $color_background;
  104. border: 1px solid $color_border;
  105. border-radius: $border_radius_sm;
  106. left: #{$spacing_horizontal};
  107. margin-top: #{0.5 * $spacing_unit};
  108. padding: 0 #{0.5 * $spacing_unit};
  109. position: absolute;
  110. right: #{$spacing_horizontal};
  111. z-index: 99;
  112. }
  113. li.current-menu-item > a {
  114. font-weight: 700;
  115. }
  116. @include media(mobile) {
  117. & > div {
  118. background: transparent;
  119. border: 0;
  120. border-radius: 0;
  121. left: auto;
  122. margin-top: 0;
  123. padding: 0;
  124. position: inherit;
  125. right: auto;
  126. z-index: 1;
  127. }
  128. & > div > ul {
  129. justify-content: flex-end;
  130. margin-left: -#{0.5 * $spacing_horizontal};
  131. margin-right: -#{0.5 * $spacing_horizontal};
  132. & > li {
  133. padding-left: $spacing_unit;
  134. padding-right: $spacing_unit;
  135. padding-top: $baseline-unit;
  136. padding-bottom: $baseline-unit;
  137. & > a {
  138. padding: 0;
  139. }
  140. }
  141. & > .menu-item-has-children > a::after {
  142. border-left: #{0.25 * $spacing_unit} solid transparent;
  143. border-right: #{0.25 * $spacing_unit} solid transparent;
  144. border-top: #{0.25 * $spacing_unit} solid $color_primary;
  145. content: "";
  146. margin: 0;
  147. margin-left: #{0.25 * $spacing_unit};
  148. vertical-align: middle;
  149. }
  150. }
  151. & > div > ul > li:hover,
  152. & > div > ul > li:focus-within,
  153. & > div > ul > li.current-menu-item {
  154. & > ul {
  155. border: 1px solid $color_border;
  156. border-radius: $border_radius_sm;
  157. box-shadow: none;
  158. overflow: hidden;
  159. }
  160. }
  161. }
  162. }
  163. // Toggle Menu
  164. #site-navigation #toggle-menu {
  165. align-items: center;
  166. display: flex;
  167. padding: #{0.5 * $spacing_unit} $spacing_unit;
  168. &::before {
  169. content: "";
  170. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'/%3E%3C/svg%3E");
  171. display: block;
  172. height: 24px;
  173. margin: 0;
  174. margin-right: #{0.25 * $spacing_unit};
  175. width: 24px;
  176. }
  177. @include media(mobile) {
  178. display: none;
  179. }
  180. }
  181. #site-navigation #toggle:checked + #toggle-menu {
  182. &::before {
  183. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'%3E%3C/path%3E%3C/svg%3E");
  184. }
  185. }
  186. /**
  187. * Footer
  188. */
  189. // Footer Menus
  190. .footer-menus {
  191. display: flex;
  192. flex-direction: column;
  193. @include media(tablet) {
  194. flex: 1 0 50%;
  195. order: 2;
  196. margin-bottom: 0;
  197. margin-top: 0;
  198. text-align: right;
  199. }
  200. }
  201. // Footer Navigation
  202. .footer-navigation {
  203. @include media(tablet) {
  204. flex: 1 0 100%;
  205. }
  206. .footer-menu {
  207. @include media(tablet) {
  208. margin-right: -#{0.5 * $spacing_unit};
  209. }
  210. .current-menu-item > a {
  211. font-weight: 700;
  212. }
  213. a {
  214. display: block;
  215. padding: 0;
  216. @include media(tablet) {
  217. padding-left: #{0.5 * $spacing_unit};
  218. padding-right: #{0.5 * $spacing_unit};
  219. }
  220. }
  221. }
  222. }
  223. // Social Navigation
  224. .social-navigation {
  225. & > div > ul {
  226. flex-wrap: wrap;
  227. @include media(tablet) {
  228. justify-content: flex-end;
  229. }
  230. }
  231. .footer-navigation + & {
  232. margin-top: #{0.666 * $spacing_vertical};
  233. @include media(mobile) {
  234. margin-top: $spacing_vertical;
  235. }
  236. @include media(tablet) {
  237. margin-bottom: $spacing_unit;
  238. margin-top: 0;
  239. }
  240. }
  241. }
  242. // Site Info
  243. .site-info {
  244. span[role="separator"] {
  245. display: block;
  246. }
  247. .site-name {
  248. font-weight: 400;
  249. }
  250. }
  251. /**
  252. * Content
  253. */
  254. // Entry Header
  255. .entry-header {
  256. .entry-meta {
  257. display: none;
  258. }
  259. }
  260. // Entry Title
  261. .entry-title,
  262. .page-title,
  263. .a8c-posts-list .a8c-posts-list-item__title,
  264. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  265. a {
  266. color: inherit;
  267. text-decoration: none;
  268. &:active,
  269. &:focus,
  270. &:hover {
  271. color: $color_primary;
  272. }
  273. }
  274. }
  275. .entry-title,
  276. .page-title {
  277. font-size: $font_size_h1;
  278. }
  279. // Sticky tag
  280. .sticky-post,
  281. .a8c-posts-list .a8c-posts-list-item__featured span {
  282. background: $color_background_light;
  283. border-radius: $border_radius_sm;
  284. color: $color_foreground;
  285. font-family: inherit;
  286. font-family: var( --font-base, inherit );
  287. padding: #{0.5 * $spacing_unit} $spacing_unit;
  288. }
  289. /**
  290. * Pagination
  291. */
  292. .pagination .nav-links > * {
  293. font-family: inherit;
  294. font-family: var( --font-headings, inherit );
  295. font-size: inherit;
  296. font-weight: 400;
  297. }
  298. /**
  299. * Post Navigation
  300. */
  301. .post-navigation {
  302. a {
  303. .post-title {
  304. color: $color_foreground;
  305. }
  306. }
  307. a:active,
  308. a:focus,
  309. a:hover {
  310. text-decoration: none;
  311. .post-title {
  312. color: $color_primary;
  313. text-decoration: underline;
  314. }
  315. }
  316. .meta-nav {
  317. color: $color_foreground;
  318. }
  319. }
  320. /**
  321. * Comment Navigation
  322. */
  323. .comment-navigation {
  324. a {
  325. font-family: inherit;
  326. font-family: var( --font-headings, inherit );
  327. font-size: inherit;
  328. font-weight: 400;
  329. }
  330. }
  331. /**
  332. * Comments
  333. */
  334. .comment-meta {
  335. .comment-author {
  336. .fn {
  337. font-family: inherit;
  338. font-family: var( --font-headings, inherit );
  339. a {
  340. color: inherit;
  341. &:active,
  342. &:focus,
  343. &:hover {
  344. color: $color_primary;
  345. }
  346. }
  347. }
  348. .avatar {
  349. border-radius: 50%;
  350. }
  351. }
  352. .comment-metadata {
  353. font-size: $font_size_sm;
  354. line-height: inherit;
  355. }
  356. }
  357. .reply {
  358. font-size: inherit;
  359. line-height: inherit;
  360. }
  361. .pingback,
  362. .trackback {
  363. .url {
  364. font-family: inherit;
  365. font-family: var( --font-headings, inherit );
  366. }
  367. }
  368. /**
  369. * Blocks
  370. */
  371. // Category
  372. .wp-block-categories {
  373. .children {
  374. list-style: disc;
  375. & > li {
  376. border: 0;
  377. margin-bottom: 0;
  378. margin-top: 0;
  379. }
  380. }
  381. }
  382. // Latest Comments
  383. .wp-block-latest-comments .wp-block-latest-comments__comment-meta {
  384. font-family: inherit;
  385. font-family: var( --font-headings, inherit );
  386. }
  387. // Pullquote
  388. .wp-block-pullquote {
  389. blockquote {
  390. padding: 0;
  391. }
  392. }
  393. // Table block
  394. table,
  395. .wp-block-table {
  396. td,
  397. th {
  398. border-color: $color_border;
  399. }
  400. }
  401. // Posts List
  402. .a8c-posts-list {
  403. text-align: center;
  404. }
  405. .a8c-posts-list-item__excerpt {
  406. text-align: left;
  407. }
  408. // Font Sizes
  409. .is-larger-text,
  410. .has-larger-font-size,
  411. .has-huge-font-size {
  412. line-height: #{(strip-unit($baseline-unit) * 6) / (strip-unit($font_size_xl * $typescale-root))};
  413. }
  414. .is-large-text,
  415. .has-large-font-size {
  416. line-height: #{(strip-unit($baseline-unit) * 5) / (strip-unit($font_size_lg * $typescale-root))};
  417. }
  418. // Cookie
  419. body {
  420. .widget_eu_cookie_law_widget {
  421. background: transparent;
  422. bottom: 0;
  423. left: 0;
  424. padding: 0;
  425. right: 0;
  426. &.widget.top {
  427. bottom: auto;
  428. top: 0;
  429. }
  430. #eu-cookie-law {
  431. background: rgba($color_background, 0.9);
  432. border: none;
  433. color: $color_foreground;
  434. font-size: $font_size_sm;
  435. line-height: inherit;
  436. padding: $spacing_unit;
  437. @media (max-width: 600px) {
  438. padding-bottom: #{4 * $spacing_horizontal + $spacing_unit};
  439. }
  440. &.negative {
  441. background: rgba($color_foreground, 0.9);
  442. color: $color_background;
  443. input.accept {
  444. background: $color_background;
  445. color: $color_foreground;
  446. &:active,
  447. &:focus,
  448. &:hover {
  449. background: $color_background_light;
  450. }
  451. }
  452. }
  453. input.accept {
  454. margin: 0;
  455. margin-left: #{2 * $spacing_horizontal};
  456. @extend %button-style;
  457. @media (max-width: 600px) {
  458. bottom: $spacing_unit;
  459. left: $spacing_unit;
  460. margin: 0;
  461. }
  462. }
  463. }
  464. }
  465. &.admin-bar .widget_eu_cookie_law_widget {
  466. &.widget.top {
  467. top: 32px;
  468. @media (max-width: 782px) {
  469. top: 46px;
  470. }
  471. }
  472. }
  473. }