_extra-child-theme.scss 9.5 KB

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