_extra-child-theme.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  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 .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, .reply {
  461. float: right;
  462. width: 75%;
  463. width: calc(80% - #{map-deep-get($config-global, "spacing", "horizontal")} - 1px);
  464. }
  465. }
  466. .comment-navigation a {
  467. font-size: inherit;
  468. font-weight: bold;
  469. }
  470. /**
  471. * Widgets
  472. */
  473. // Widget Area
  474. .widget-area {
  475. width: 100%;
  476. &:before {
  477. background: map-deep-get($config-global, "color", "border", "default");;
  478. height: 1px;
  479. content: "";
  480. display: block;
  481. margin-bottom: #{0.666 * map-deep-get($config-global, "spacing", "vertical")};
  482. @include media(mobile) {
  483. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  484. }
  485. @extend %responsive-alignfull;
  486. }
  487. .widget-title,
  488. .widgettitle {
  489. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  490. @include font-family( map-deep-get($config-global, "font", "family", "ui") );
  491. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  492. &:empty {
  493. display: none;
  494. }
  495. }
  496. @include media(laptop) {
  497. display: flex;
  498. flex-wrap: wrap;
  499. justify-content: space-between;
  500. & > *:nth-child(2) {
  501. margin-top: 0;
  502. }
  503. .widget {
  504. width: calc(50% - #{map-deep-get($config-global, "spacing", "horizontal")});
  505. }
  506. }
  507. }
  508. // Widgets
  509. .widget_calendar,
  510. .widget_calendar {
  511. caption {
  512. font-weight: bold;
  513. }
  514. td,
  515. th {
  516. text-align: center;
  517. }
  518. }
  519. .widget_archive,
  520. .widget_categories,
  521. .widget_links,
  522. .widget_meta,
  523. .widget_nav_menu,
  524. .widget_pages,
  525. .widget_recent_comments,
  526. .widget_recent_entries,
  527. .widget_rss,
  528. .widget_rss_links,
  529. .widget_top-posts,
  530. .widget_authors,
  531. .widget_jp_blogs_i_follow,
  532. .widget_top-click,
  533. .widget_upcoming_events_widget {
  534. ul {
  535. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "default");
  536. list-style: none;
  537. padding-left: 0;
  538. }
  539. li {
  540. border-top: 1px solid map-deep-get($config-global, "color", "border", "default");
  541. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} 0;
  542. }
  543. }
  544. .widget_categories .children,
  545. .widget_nav_menu .sub-menu,
  546. .widget_pages .children {
  547. border-bottom: 0;
  548. margin-bottom: #{-0.25 * map-deep-get($config-global, "spacing", "vertical")};
  549. margin-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  550. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  551. }
  552. .widget_recent_entries .post-date {
  553. display: block;
  554. }
  555. .widget_rss {
  556. cite,
  557. .rssSummary,
  558. .rss-date {
  559. display: block;
  560. }
  561. }
  562. .widget_search {
  563. input[type="search"] {
  564. display: block;
  565. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  566. width: 100%;
  567. }
  568. }
  569. /**
  570. * Social Menu
  571. */
  572. .social-navigation {
  573. background: #{map-deep-get($config-global, "color", "foreground", "dark")};
  574. padding: #{map-deep-get($config-global, "spacing", "vertical")} 0;
  575. width: calc(100% + #{map-deep-get($config-global, "spacing", "horizontal")});
  576. @extend %responsive-alignfull;
  577. .social-links-menu {
  578. margin: 0;
  579. padding: 0 #{map-deep-get($config-global, "spacing", "horizontal")};
  580. text-align: center;
  581. }
  582. }
  583. /**
  584. * Footer
  585. */
  586. .site-footer {
  587. align-items: unset;
  588. flex-direction: column;
  589. padding-left: 0;
  590. padding-right: 0;
  591. }
  592. .site-footer > * {
  593. padding-left: #{map-deep-get($config-global, "spacing", "horizontal")};
  594. padding-right: #{map-deep-get($config-global, "spacing", "horizontal")};
  595. }
  596. /**
  597. * Footer Menu
  598. */
  599. .footer-navigation {
  600. display: block;
  601. flex: 1 0 100%;
  602. order: 1;
  603. text-align: center;
  604. .footer-menu {
  605. justify-content: center;
  606. text-align: inherit;
  607. > li {
  608. &:not(:first-child):before {
  609. color: map-deep-get($config-global, "color", "border", "dark");
  610. content: "\2022";
  611. font-family: Arial, Helvetica, sans-serif; // For browsers without CSS custom properties support.
  612. font-family: var( --font-headings, 'Arial, Helvetica, sans-serif' );
  613. }
  614. }
  615. }
  616. @include media(mobile) {
  617. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  618. }
  619. }
  620. /**
  621. * Site Info
  622. */
  623. .site-info {
  624. font-weight: bold;
  625. text-align: center;
  626. a {
  627. font-weight: inherit;
  628. }
  629. }
  630. /**
  631. * Buttons
  632. */
  633. .button,
  634. .wp-block-button__link,
  635. .wp-block-file__button,
  636. .a8c-posts-list__view-all {
  637. position: relative;
  638. &:before {
  639. border: 2px solid;
  640. content: "";
  641. display: block;
  642. left: 3px;
  643. margin: 0;
  644. position: absolute;
  645. top: 3px;
  646. height: calc(100% - 6px);
  647. width: calc(100% - 6px);
  648. }
  649. }
  650. button,
  651. input[type="submit"] {
  652. outline: 2px solid;
  653. outline-offset: -5px;
  654. }
  655. .is-style-circular .wp-block-button__link {
  656. &:before {
  657. border-radius: 100px;
  658. }
  659. }
  660. /**
  661. * AMP Support
  662. */
  663. html[amp] {
  664. @include media( tablet ) {
  665. #masthead {
  666. position: sticky;
  667. top: 0;
  668. }
  669. .logged-in #masthead {
  670. top: 32px;
  671. }
  672. }
  673. @media screen and ( max-width: 782px ) {
  674. .logged-in #masthead {
  675. top: 46px;
  676. }
  677. }
  678. }
  679. /**
  680. * Search block
  681. */
  682. .wp-block-search {
  683. .wp-block-search__input {
  684. margin-right: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  685. }
  686. .wp-block-search__button {
  687. margin-left: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  688. }
  689. }