_extra-child-theme.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. /**
  5. * Reset
  6. */
  7. // Reset Links
  8. a {
  9. text-decoration: none;
  10. .reply &,
  11. .widget-area &,
  12. .wp-block-cover &,
  13. .wp-block-cover-image &,
  14. .wp-block-media-text &,
  15. p:not(.site-title) & {
  16. text-decoration: underline;
  17. &.wp-block-button__link,
  18. &:hover {
  19. text-decoration: none;
  20. }
  21. }
  22. }
  23. // Reset Navigations
  24. .main-navigation > div > ul,
  25. .social-navigation > div > ul,
  26. .pagination .nav-links {
  27. justify-content: center;
  28. }
  29. /**
  30. * Header
  31. */
  32. #masthead {
  33. background: #{map-deep-get($config-global, "color", "foreground", "dark")};
  34. display: flex;
  35. justify-content: space-between;
  36. margin: 0;
  37. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} #{map-deep-get($config-global, "spacing", "horizontal")};
  38. position: relative;
  39. text-align: left;
  40. z-index: 9999;
  41. //@extend %responsive-alignfull;
  42. @include media(mobile) {
  43. align-items: flex-end;
  44. }
  45. @include media(tablet) {
  46. left: 0;
  47. max-width: 100%;
  48. position: absolute;
  49. right: 0;
  50. .wp-sticky-header & {
  51. position: fixed;
  52. }
  53. }
  54. }
  55. /**
  56. * Site Branding
  57. */
  58. .site-branding {
  59. margin: 0;
  60. margin-right: auto;
  61. padding-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  62. padding-right: #{map-deep-get($config-global, "spacing", "horizontal")};
  63. padding-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  64. text-align: inherit;
  65. @include media(mobile) {
  66. padding-bottom: 0;
  67. padding-top: 0;
  68. }
  69. }
  70. .site-title {
  71. display: inline;
  72. }
  73. .site-description {
  74. display: none;
  75. }
  76. @include media(tablet) {
  77. .site-description {
  78. display: inline;
  79. }
  80. .site-title:not(:empty) + .site-description:not(:empty)::before {
  81. color: map-deep-get($config-global, "color", "foreground", "light");
  82. content: "\2022";
  83. font-family: Arial, Helvetica, sans-serif; // For browsers without CSS custom properties support.
  84. font-family: var(--font-headings, "Arial, Helvetica, sans-serif");
  85. margin: 0 0.25em;
  86. }
  87. }
  88. /**
  89. * Header Menu
  90. */
  91. #site-navigation {
  92. margin: 0;
  93. text-align: right;
  94. > div {
  95. background: #{map-deep-get($config-global, "color", "foreground", "dark")};
  96. border-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} solid #{map-deep-get($config-global, "color", "foreground", "dark")};
  97. box-shadow: inset 0 1px 0 0 #{map-deep-get($config-global, "color", "primary", "default")};
  98. left: 0;
  99. position: absolute;
  100. padding: 0 #{map-deep-get($config-global, "spacing", "horizontal")};
  101. right: 0;
  102. @include media(mobile) {
  103. background: transparent;
  104. border: 0;
  105. box-shadow: none;
  106. left: auto;
  107. margin-bottom: -2px;
  108. position: inherit;
  109. padding: 0;
  110. right: auto;
  111. }
  112. > ul {
  113. justify-content: flex-end;
  114. & > .menu-item-has-children > a::after {
  115. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  116. }
  117. .sub-menu .menu-item a {
  118. &::before {
  119. display: none;
  120. }
  121. &::after {
  122. counter-increment: nested-list;
  123. content: " –" counters(nested-list, " –", none);
  124. }
  125. }
  126. @include media(mobile) {
  127. > li {
  128. &:not(:first-child)::before {
  129. color: map-deep-get($config-global, "color", "foreground", "light");
  130. content: "\2022";
  131. font-family: Arial, Helvetica, sans-serif; // For browsers without CSS custom properties support.
  132. font-family: var(--font-headings, Arial, Helvetica, sans-serif);
  133. line-height: 1;
  134. padding-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")};
  135. padding-top: #{0.5 * map-deep-get($config-global, "spacing", "unit")};
  136. }
  137. > a {
  138. padding-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")};
  139. padding-top: #{0.5 * map-deep-get($config-global, "spacing", "unit")};
  140. &::before,
  141. &::after {
  142. margin: 0;
  143. }
  144. }
  145. > .sub-menu {
  146. background: map-deep-get($config-global, "color", "foreground", "dark");
  147. box-shadow: none;
  148. left: auto;
  149. right: 0;
  150. text-align: right;
  151. }
  152. }
  153. }
  154. }
  155. }
  156. }
  157. // Toggle Menu
  158. #site-navigation #toggle:focus + #toggle-menu,
  159. #toggle-menu {
  160. text-decoration: none;
  161. }
  162. #site-navigation #toggle-menu {
  163. align-items: center;
  164. display: flex;
  165. padding: #{0.5 * map-deep-get($config-global, "spacing", "unit")} #{map-deep-get($config-global, "spacing", "unit")};
  166. &::after {
  167. content: "";
  168. 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");
  169. display: block;
  170. height: 24px;
  171. margin: 0;
  172. margin-left: #{0.25 * map-deep-get($config-global, "spacing", "unit")};
  173. width: 24px;
  174. }
  175. @include media(mobile) {
  176. display: none;
  177. }
  178. }
  179. #site-navigation #toggle:checked + #toggle-menu {
  180. &::after {
  181. 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");
  182. }
  183. }
  184. /**
  185. * Content Area
  186. */
  187. .site-main > * {
  188. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  189. margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
  190. @include media(mobile) {
  191. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  192. margin-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  193. }
  194. }
  195. @include media(mobile) {
  196. #main {
  197. padding-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  198. .hide-homepage-header & {
  199. padding-top: 0;
  200. }
  201. }
  202. }
  203. @include media(tablet) {
  204. #primary {
  205. margin-top: 44px; // JS Fallback
  206. }
  207. }
  208. /**
  209. * Post Navigation
  210. */
  211. .post-navigation {
  212. border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
  213. border-top: 2px solid #{map-deep-get($config-global, "color", "border", "default")};
  214. padding: #{0.5 * map-deep-get($config-global, "spacing", "vertical")} 0;
  215. .meta-nav {
  216. color: #{map-deep-get($config-global, "color", "foreground", "light")};
  217. @include font-family( map-deep-get($config-global, "font", "family", "ui") );
  218. font-weight: bold;
  219. text-transform: uppercase;
  220. }
  221. .post-title {
  222. font-size: inherit;
  223. }
  224. }
  225. /**
  226. * Hentry
  227. */
  228. // Entry Header
  229. .entry-header {
  230. .entry-meta {
  231. display: none;
  232. }
  233. }
  234. // Entry Title
  235. .entry-header,
  236. .page-title,
  237. .a8c-posts-list-item__title,
  238. .a8c-posts-list .a8c-posts-list-item__featured {
  239. text-align: center;
  240. }
  241. // Entry Footer
  242. .entry-footer {
  243. text-align: center;
  244. }
  245. // Sticky Post
  246. .sticky-post,
  247. .a8c-posts-list .a8c-posts-list-item__featured span {
  248. background: #{map-deep-get($config-global, "color", "secondary", "default")};
  249. color: #{map-deep-get($config-global, "color", "background", "default")};
  250. @include font-family( map-deep-get($config-global, "font", "family", "ui") );
  251. text-transform: uppercase;
  252. }
  253. // Remove margin if alignfull is first element
  254. .home.hide-homepage-title {
  255. .hentry .entry-content {
  256. & > *:first-child {
  257. &.alignfull {
  258. margin-top: -#{map-deep-get($config-global, "spacing", "unit")};
  259. @include media(mobile) {
  260. margin-top: -#{2 * map-deep-get($config-global, "spacing", "vertical")};
  261. }
  262. }
  263. }
  264. }
  265. }
  266. // Remove margin if alignfull is first element and header is hidden.
  267. @include media(mobile) {
  268. .home.page.hide-homepage-header.hide-homepage-title .hentry .entry-content {
  269. > .wp-block-image.alignfull:first-child,
  270. > .wp-block-cover.alignfull:first-child,
  271. > .wp-block-media-text.alignfull:first-child,
  272. > .wp-block-group.has-background.alignfull:first-child {
  273. margin-top: -#{2.75 * map-deep-get($config-global, "spacing", "unit")};
  274. }
  275. }
  276. }
  277. // Remove margin if alignfull is last element
  278. .page:not(.logged-in) {
  279. .hentry .entry-content {
  280. & > *:last-child {
  281. &.alignfull {
  282. margin-bottom: -#{map-deep-get($config-global, "spacing", "vertical")};
  283. @include media(mobile) {
  284. margin-bottom: -#{2 * map-deep-get($config-global, "spacing", "vertical")};
  285. }
  286. }
  287. }
  288. }
  289. }
  290. // Author Bio
  291. .author-bio {
  292. border: 2px solid #{map-deep-get($config-global, "color", "border", "default")};
  293. padding: #{map-deep-get($config-global, "spacing", "unit")};
  294. .author-title {
  295. font-size: inherit;
  296. }
  297. }
  298. /**
  299. * Blocks
  300. */
  301. // Cover & Hero block
  302. .wp-block-cover .wp-block-cover__inner-container,
  303. .wp-block-coblocks-hero .wp-block-coblocks-hero__box {
  304. & > * {
  305. margin-top: #{0.666 * map-deep-get($config-global, "spacing", "vertical")};
  306. margin-bottom: #{0.666 * map-deep-get($config-global, "spacing", "vertical")};
  307. @include media(mobile) {
  308. margin-top: map-deep-get($config-global, "spacing", "vertical");
  309. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  310. }
  311. &:first-child {
  312. margin-top: 0;
  313. }
  314. &:last-child {
  315. margin-bottom: 0;
  316. }
  317. }
  318. }
  319. // Pullquote
  320. .wp-block-pullquote {
  321. border-bottom-width: 1px;
  322. blockquote {
  323. padding: 0;
  324. }
  325. }
  326. // Table block
  327. table,
  328. .wp-block-table {
  329. td,
  330. th {
  331. border-color: #{map-deep-get($config-global, "color", "border", "default")};
  332. }
  333. }
  334. // Blog Posts Listing
  335. .a8c-posts-list {
  336. text-align: center;
  337. }
  338. .a8c-posts-list__item {
  339. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  340. margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
  341. @include media(mobile) {
  342. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  343. margin-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  344. }
  345. .a8c-posts-list-item__meta {
  346. text-align: center;
  347. }
  348. }
  349. .a8c-posts-list__listing {
  350. text-align: left;
  351. &:not(:last-child) {
  352. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  353. @include media(mobile) {
  354. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  355. }
  356. }
  357. }
  358. /**
  359. * Blog Posts (Newspack)
  360. */
  361. .wp-block-newspack-blocks-homepage-articles {
  362. article {
  363. .entry-title a {
  364. &:active,
  365. &:focus,
  366. &:hover {
  367. text-decoration: none;
  368. }
  369. }
  370. .cat-links a,
  371. .more-link,
  372. .entry-meta a {
  373. text-decoration: none;
  374. &:active,
  375. &:focus,
  376. &:hover {
  377. text-decoration: underline;
  378. }
  379. }
  380. }
  381. &.image-alignbehind article {
  382. .entry-title a {
  383. &:active,
  384. &:focus,
  385. &:hover {
  386. text-decoration: underline;
  387. }
  388. }
  389. }
  390. }
  391. .has-background:not(.has-background-background-color),
  392. [class*="background-color"]:not(.has-background-background-color),
  393. [style*="background-color"] {
  394. .wp-block-newspack-blocks-homepage-articles article {
  395. .entry-title a {
  396. &:active,
  397. &:focus,
  398. &:hover {
  399. text-decoration: underline;
  400. }
  401. }
  402. }
  403. }
  404. /**
  405. * Comments
  406. */
  407. .comments-title {
  408. text-align: center;
  409. }
  410. .comment-list {
  411. > li:first-child {
  412. border-top-width: 2px;
  413. }
  414. }
  415. .comment-body {
  416. content: "";
  417. display: table;
  418. table-layout: fixed;
  419. width: 100%;
  420. }
  421. .comment-meta .comment-metadata {
  422. @include font-family( map-deep-get($config-global, "font", "family", "ui") );
  423. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  424. font-weight: bold;
  425. text-transform: uppercase;
  426. }
  427. .reply {
  428. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  429. }
  430. .comment-reply-title {
  431. display: inherit;
  432. text-align: center;
  433. }
  434. .comment .comment-reply-title {
  435. display: flex;
  436. }
  437. .comment-respond {
  438. .form-submit {
  439. display: flex;
  440. justify-content: center;
  441. }
  442. }
  443. @include media(tablet) {
  444. .comment-meta {
  445. border-right: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
  446. display: block;
  447. float: left;
  448. padding-right: #{map-deep-get($config-global, "spacing", "horizontal")};
  449. width: 20%;
  450. .comment-author {
  451. display: block;
  452. width: 100%;
  453. .avatar,
  454. .fn {
  455. display: block;
  456. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  457. }
  458. }
  459. }
  460. .comment-content,
  461. .reply {
  462. float: right;
  463. width: 75%;
  464. width: calc(80% - #{map-deep-get($config-global, "spacing", "horizontal")} - 1px);
  465. }
  466. }
  467. .comment-navigation a {
  468. font-size: inherit;
  469. font-weight: bold;
  470. }
  471. /**
  472. * Widgets
  473. */
  474. // Widget Area
  475. .widget-area {
  476. width: 100%;
  477. &::before {
  478. background: map-deep-get($config-global, "color", "border", "default");
  479. height: 1px;
  480. content: "";
  481. display: block;
  482. margin-bottom: #{0.666 * map-deep-get($config-global, "spacing", "vertical")};
  483. @include media(mobile) {
  484. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  485. }
  486. @extend %responsive-alignfull;
  487. }
  488. .widget-title,
  489. .widgettitle {
  490. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  491. @include font-family( map-deep-get($config-global, "font", "family", "ui") );
  492. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  493. &:empty {
  494. display: none;
  495. }
  496. }
  497. @include media(laptop) {
  498. column-gap: #{map-deep-get($config-global, "spacing", "horizontal")};
  499. display: flex;
  500. flex-wrap: wrap;
  501. justify-content: space-between;
  502. & > *:nth-child(n + 2) {
  503. margin-top: 0;
  504. }
  505. .widget {
  506. flex: calc(50% - #{map-deep-get($config-global, "spacing", "horizontal")});
  507. }
  508. }
  509. }
  510. // Widgets
  511. .widget_calendar,
  512. .widget_calendar {
  513. caption {
  514. font-weight: bold;
  515. }
  516. td,
  517. th {
  518. text-align: center;
  519. }
  520. }
  521. .widget_archive,
  522. .widget_categories,
  523. .widget_links,
  524. .widget_meta,
  525. .widget_nav_menu,
  526. .widget_pages,
  527. .widget_recent_comments,
  528. .widget_recent_entries,
  529. .widget_rss,
  530. .widget_rss_links,
  531. .widget_top-posts,
  532. .widget_authors,
  533. .widget_jp_blogs_i_follow,
  534. .widget_top-click,
  535. .widget_upcoming_events_widget {
  536. ul {
  537. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "default");
  538. list-style: none;
  539. padding-left: 0;
  540. }
  541. li {
  542. border-top: 1px solid map-deep-get($config-global, "color", "border", "default");
  543. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} 0;
  544. }
  545. }
  546. .widget_categories .children,
  547. .widget_nav_menu .sub-menu,
  548. .widget_pages .children {
  549. border-bottom: 0;
  550. margin-bottom: #{-0.25 * map-deep-get($config-global, "spacing", "vertical")};
  551. margin-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  552. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  553. }
  554. .widget_recent_entries .post-date {
  555. display: block;
  556. }
  557. .widget_rss {
  558. cite,
  559. .rssSummary,
  560. .rss-date {
  561. display: block;
  562. }
  563. }
  564. .widget_search {
  565. input[type="search"] {
  566. display: block;
  567. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  568. width: 100%;
  569. }
  570. }
  571. /**
  572. * Social Menu
  573. */
  574. .social-navigation {
  575. background: #{map-deep-get($config-global, "color", "foreground", "dark")};
  576. padding: #{map-deep-get($config-global, "spacing", "vertical")} 0;
  577. width: calc(100% + #{map-deep-get($config-global, "spacing", "horizontal")});
  578. @extend %responsive-alignfull;
  579. .social-links-menu {
  580. margin: 0;
  581. padding: 0 #{map-deep-get($config-global, "spacing", "horizontal")};
  582. text-align: center;
  583. }
  584. }
  585. /**
  586. * Footer
  587. */
  588. .site-footer {
  589. align-items: unset;
  590. flex-direction: column;
  591. padding-left: 0;
  592. padding-right: 0;
  593. }
  594. .site-footer > * {
  595. padding-left: #{map-deep-get($config-global, "spacing", "horizontal")};
  596. padding-right: #{map-deep-get($config-global, "spacing", "horizontal")};
  597. }
  598. /**
  599. * Footer Menu
  600. */
  601. .footer-navigation {
  602. display: block;
  603. flex: 1 0 100%;
  604. order: 1;
  605. text-align: center;
  606. .footer-menu {
  607. justify-content: center;
  608. text-align: inherit;
  609. > li {
  610. &:not(:first-child)::before {
  611. color: map-deep-get($config-global, "color", "border", "dark");
  612. content: "\2022";
  613. font-family: Arial, Helvetica, sans-serif; // For browsers without CSS custom properties support.
  614. font-family: var(--font-headings, "Arial, Helvetica, sans-serif");
  615. }
  616. }
  617. }
  618. @include media(mobile) {
  619. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  620. }
  621. }
  622. /**
  623. * Site Info
  624. */
  625. .site-info {
  626. font-weight: bold;
  627. text-align: center;
  628. a {
  629. font-weight: inherit;
  630. }
  631. }
  632. /**
  633. * Buttons
  634. */
  635. .button,
  636. .wp-block-button__link,
  637. .wp-block-file__button,
  638. .a8c-posts-list__view-all {
  639. position: relative;
  640. &::before {
  641. border: 2px solid;
  642. border-radius: inherit;
  643. content: "";
  644. display: block;
  645. left: 3px;
  646. margin: 0;
  647. position: absolute;
  648. top: 3px;
  649. height: calc(100% - 6px);
  650. width: calc(100% - 6px);
  651. }
  652. }
  653. button,
  654. input[type="submit"] {
  655. outline: 2px solid;
  656. outline-offset: -5px;
  657. }
  658. /**
  659. * AMP Support
  660. */
  661. html[amp] {
  662. @include media( tablet ) {
  663. #masthead {
  664. position: sticky;
  665. top: 0;
  666. }
  667. .logged-in #masthead {
  668. top: 32px;
  669. }
  670. }
  671. @media screen and ( max-width: 782px ) {
  672. .logged-in #masthead {
  673. top: 46px;
  674. }
  675. }
  676. }
  677. /**
  678. * Search block
  679. */
  680. .wp-block-search {
  681. .wp-block-search__input {
  682. margin-right: calc(0.1 * #{map-deep-get($config-button, "padding", "horizontal")});
  683. }
  684. .wp-block-search__button {
  685. margin-left: calc(0.1 * #{map-deep-get($config-button, "padding", "horizontal")});
  686. }
  687. }