_extra-child-theme.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. // HTML reset
  5. html {
  6. @include font-family (map-deep-get($config-global, "font", "family", "primary") );
  7. }
  8. // Link style
  9. a {
  10. text-decoration: none;
  11. .wp-block-cover &,
  12. .wp-block-cover-image &,
  13. .wp-block-media-text &,
  14. p:not(.site-title) & {
  15. text-decoration: underline;
  16. &.wp-block-button__link,
  17. &:hover {
  18. text-decoration: none;
  19. }
  20. }
  21. }
  22. // Page
  23. .site {
  24. border-top: 5px solid map-deep-get($config-global, "color", "foreground", "default");
  25. position: relative;
  26. &:before {
  27. border-top: 1px solid rgba(#fff, 0.5);
  28. content: "";
  29. left: 0;
  30. position: absolute;
  31. top: -5px;
  32. width: 100%;
  33. }
  34. }
  35. // Header
  36. #masthead {
  37. padding-top: map-deep-get($config-global, "spacing", "vertical");
  38. .custom-logo-link {
  39. display: inline-block;
  40. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  41. }
  42. @include media(mobile) {
  43. align-content: center;
  44. align-items: center;
  45. display: flex;
  46. flex-flow: row wrap;
  47. justify-content: center;
  48. max-width: 92vw;
  49. padding-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  50. padding-top: #{1.5 * map-deep-get($config-global, "spacing", "vertical")};
  51. .site-branding {
  52. flex: 1 100%;
  53. }
  54. .main-navigation {
  55. padding-left: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
  56. padding-right: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
  57. }
  58. .social-navigation {
  59. padding-left: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
  60. padding-right: #{2 * map-deep-get($config-global, "spacing", "horizontal")};
  61. margin: 0;
  62. }
  63. }
  64. }
  65. // Footer
  66. #colophon {
  67. @include media(mobile) {
  68. margin-top: map-deep-get($config-global, "spacing", "vertical");
  69. }
  70. .site-info {
  71. @include media(mobile) {
  72. max-width: 92vw;
  73. margin-left: auto;
  74. margin-right: auto;
  75. }
  76. }
  77. .footer-navigation {
  78. & + .site-info {
  79. text-align: left;
  80. }
  81. .footer-menu > li:last-of-type > a {
  82. padding-right: 0;
  83. }
  84. }
  85. }
  86. // Navigation
  87. .main-navigation {
  88. #toggle-menu {
  89. text-transform: uppercase;
  90. }
  91. @include media(mobile) {
  92. a {
  93. padding: #{0.75 * map-deep-get($config-header, "main-nav", "link-padding")} map-deep-get($config-header, "main-nav", "link-padding");
  94. }
  95. }
  96. & > div > ul > li > a {
  97. text-transform: uppercase;
  98. }
  99. & > div {
  100. background: #{map-deep-get($config-global, "color", "border", "light")};
  101. border-radius: #{map-deep-get($config-global, "border-radius", "sm")};
  102. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  103. padding-right: map-deep-get($config-global, "spacing", "horizontal");
  104. @include media(mobile) {
  105. background: none;
  106. border-radius: 0;
  107. padding-left: 0;
  108. padding-right: 0;
  109. }
  110. }
  111. @include media(mobile) {
  112. & > div > ul > li {
  113. margin: 0 #{0.25 * map-deep-get($config-global, "spacing", "horizontal")};
  114. }
  115. & > div > ul > li:first-of-type > a {
  116. padding-left: #{map-deep-get($config-header, "main-nav", "link-padding")};
  117. }
  118. & > div > ul > li:last-of-type > a {
  119. padding-right: #{map-deep-get($config-header, "main-nav", "link-padding")};
  120. }
  121. & > div > ul > li:hover,
  122. & > div > ul > li:focus-within,
  123. & > div > ul > li.current-menu-item {
  124. & > a {
  125. background: #{map-deep-get($config-global, "color", "primary", "default")};
  126. border-radius: #{map-deep-get($config-global, "border-radius", "sm")};
  127. color: #{map-deep-get($config-global, "color", "background", "default")};
  128. }
  129. & > ul {
  130. border-radius: #{map-deep-get($config-global, "border-radius", "sm")};
  131. overflow: hidden;
  132. }
  133. & li {
  134. & > a {
  135. background: #{map-deep-get($config-global, "color", "foreground", "default")};
  136. color: #{map-deep-get($config-global, "color", "background", "default")};
  137. font-weight: normal;
  138. }
  139. &:hover > a,
  140. &.focus > a,
  141. &.current-menu-item > a {
  142. background: #{map-deep-get($config-global, "color", "primary", "default")};
  143. }
  144. }
  145. }
  146. & > div > ul > .menu-item-has-children > a::after {
  147. opacity: 0.67;
  148. }
  149. }
  150. }
  151. // Center common elements
  152. .site-branding,
  153. .site-info,
  154. .main-navigation,
  155. .entry-header,
  156. .entry-footer,
  157. .page-title,
  158. .author-title,
  159. .comments-title,
  160. .comment-reply-title,
  161. .a8c-posts-list {
  162. text-align: center;
  163. }
  164. .main-navigation > div {
  165. text-align: left;
  166. }
  167. .comment-reply-title {
  168. display: inherit;
  169. }
  170. .comment .comment-reply-title {
  171. display: flex;
  172. }
  173. .main-navigation > div > ul,
  174. .social-navigation > div > ul,
  175. .pagination .nav-links {
  176. justify-content: center;
  177. }
  178. .home.page.hide-homepage-title .site-main {
  179. padding-top: 0;
  180. }
  181. .home.page.hide-homepage-header.hide-homepage-title .hentry .entry-content {
  182. > .wp-block-image.alignfull:first-child,
  183. > .wp-block-cover.alignfull:first-child,
  184. > .wp-block-media-text.alignfull:first-child,
  185. > .wp-block-group.has-background.alignfull:first-child {
  186. margin-top: 0;
  187. }
  188. }
  189. // Cover & Hero block
  190. .wp-block-cover .wp-block-cover__inner-container,
  191. .wp-block-coblocks-hero .wp-block-coblocks-hero__box {
  192. & > * {
  193. margin-top: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  194. margin-bottom: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  195. @include media(mobile) {
  196. margin-top: map-deep-get($config-global, "spacing", "vertical");
  197. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  198. }
  199. &:first-child {
  200. margin-top: 0;
  201. }
  202. &:last-child {
  203. margin-bottom: 0;
  204. }
  205. }
  206. }
  207. // Quote block
  208. .wp-block-quote {
  209. p {
  210. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  211. }
  212. }
  213. // Table block
  214. table,
  215. .wp-block-table {
  216. td,
  217. th {
  218. border-color: map-deep-get($config-global, "color", "border", "default");
  219. }
  220. }
  221. // Posts List block
  222. .a8c-posts-list-item__excerpt {
  223. text-align: left;
  224. }
  225. .wp-block-newspack-blocks-homepage-articles {
  226. article {
  227. .entry-title a{
  228. &:active,
  229. &:focus,
  230. &:hover {
  231. text-decoration: none;
  232. }
  233. }
  234. .cat-links,
  235. .entry-meta {
  236. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  237. }
  238. .cat-links a,
  239. .more-link,
  240. .entry-meta a {
  241. text-decoration: none;
  242. &:active,
  243. &:focus,
  244. &:hover {
  245. text-decoration: underline;
  246. }
  247. }
  248. }
  249. &.image-alignbehind article {
  250. .entry-title a{
  251. &:active,
  252. &:focus,
  253. &:hover {
  254. text-decoration: underline;
  255. }
  256. }
  257. }
  258. }
  259. .has-background:not(.has-background-background-color),
  260. [class*="background-color"]:not(.has-background-background-color),
  261. [style*="background-color"] {
  262. .wp-block-newspack-blocks-homepage-articles article {
  263. .entry-title a:hover {
  264. text-decoration: underline;
  265. }
  266. }
  267. }
  268. // Hentry
  269. .entry-header {
  270. .entry-meta {
  271. display: none;
  272. }
  273. }
  274. .entry-footer {
  275. border-top: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
  276. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  277. font-size: #{map-deep-get($config-global, "font", "size", "xs")};
  278. padding-top: #{map-deep-get($config-global, "spacing", "unit")};
  279. }
  280. article .entry-header .entry-title,
  281. .page-title,
  282. .a8c-posts-list-item__title {
  283. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  284. font-size: #{map-deep-get($config-global, "font", "size", "xxxl")};
  285. margin-bottom: #{1.5 * map-deep-get($config-global, "spacing", "vertical")};
  286. a {
  287. color: inherit;
  288. &:active,
  289. &:focus,
  290. &:hover {
  291. color: #{map-deep-get($config-global, "color", "primary", "default")};
  292. }
  293. }
  294. }
  295. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  296. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  297. margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
  298. a {
  299. color: inherit;
  300. text-decoration: none;
  301. &:active,
  302. &:focus,
  303. &:hover {
  304. color: #{map-deep-get($config-global, "color", "primary", "default")};
  305. }
  306. }
  307. }
  308. .entry-content {
  309. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  310. }
  311. // Pagination
  312. .pagination {
  313. text-align: center;
  314. .nav-links > * {
  315. color: map-deep-get($config-global, "color", "foreground", "light");
  316. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  317. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  318. text-transform: uppercase;
  319. &.current,
  320. &:active,
  321. &:focus,
  322. &:hover {
  323. color: map-deep-get($config-global, "color", "primary", "default");
  324. }
  325. }
  326. svg {
  327. fill: currentColor;
  328. }
  329. &:before {
  330. background: map-deep-get($config-global, "color", "border", "default");;
  331. height: 1px;
  332. content: "";
  333. display: block;
  334. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  335. @include media(mobile) {
  336. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  337. }
  338. @extend %responsive-alignfull;
  339. }
  340. }
  341. // Post Navigation
  342. .post-navigation {
  343. a {
  344. color: map-deep-get($config-global, "color", "foreground", "default");
  345. &:active,
  346. &:hover,
  347. &:focus {
  348. color: map-deep-get($config-global, "color", "primary", "default");
  349. }
  350. }
  351. .meta-nav {
  352. color: map-deep-get($config-global, "color", "foreground", "light");
  353. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  354. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  355. font-weight: bold;
  356. text-transform: uppercase;
  357. }
  358. .post-title {
  359. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  360. }
  361. &:before {
  362. background: map-deep-get($config-global, "color", "border", "default");;
  363. height: 1px;
  364. content: "";
  365. display: block;
  366. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  367. @include media(mobile) {
  368. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  369. }
  370. @extend %responsive-alignfull;
  371. }
  372. }
  373. // Comments
  374. .comments-area {
  375. &:before {
  376. background: map-deep-get($config-global, "color", "border", "default");;
  377. height: 1px;
  378. content: "";
  379. display: block;
  380. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  381. @include media(mobile) {
  382. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  383. }
  384. @extend %responsive-alignfull;
  385. }
  386. .comment-list {
  387. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "light");
  388. > li {
  389. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  390. }
  391. }
  392. .children {
  393. > li {
  394. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  395. }
  396. }
  397. }
  398. .comments-title,
  399. .comment-reply-title {
  400. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  401. font-size: #{map-deep-get($config-heading, "font", "size", "h3")};
  402. }
  403. .comment-meta {
  404. .comment-metadata {
  405. color: map-deep-get($config-global, "color", "foreground", "light");
  406. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  407. a {
  408. color: inherit;
  409. }
  410. a:active,
  411. a:focus,
  412. a:hover {
  413. color: map-deep-get($config-global, "color", "primary", "default");
  414. }
  415. }
  416. }
  417. // Comments Navigation
  418. .comment-navigation {
  419. a {
  420. color: map-deep-get($config-global, "color", "foreground", "light");
  421. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  422. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  423. text-transform: uppercase;
  424. &:active,
  425. &:focus,
  426. &:hover {
  427. color: map-deep-get($config-global, "color", "primary", "default");
  428. }
  429. }
  430. .comments-title + & {
  431. display: none;
  432. }
  433. }
  434. // Widgets
  435. .widget-area {
  436. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  437. .widget-title,
  438. .widgettitle {
  439. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  440. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  441. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  442. text-transform: uppercase;
  443. &:empty {
  444. display: none;
  445. }
  446. }
  447. @include media(mobile) {
  448. padding-top: map-deep-get($config-global, "spacing", "vertical");
  449. }
  450. @include media(laptop) {
  451. display: flex;
  452. flex-wrap: wrap;
  453. justify-content: space-between;
  454. & > *:nth-child(2) {
  455. margin-top: 0;
  456. }
  457. .widget {
  458. width: calc(50% - #{map-deep-get($config-global, "spacing", "horizontal")});
  459. }
  460. }
  461. }
  462. .widget_calendar,
  463. .widget_calendar {
  464. caption {
  465. font-weight: bold;
  466. }
  467. td,
  468. th {
  469. text-align: center;
  470. }
  471. }
  472. .widget_archive,
  473. .widget_categories,
  474. .widget_links,
  475. .widget_meta,
  476. .widget_nav_menu,
  477. .widget_pages,
  478. .widget_recent_comments,
  479. .widget_recent_entries,
  480. .widget_rss,
  481. .widget_rss_links,
  482. .widget_top-posts,
  483. .widget_authors,
  484. .widget_jp_blogs_i_follow,
  485. .widget_top-click,
  486. .widget_upcoming_events_widget {
  487. ul {
  488. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "light");
  489. list-style: none;
  490. padding-left: 0;
  491. }
  492. li {
  493. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  494. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} 0;
  495. }
  496. }
  497. .widget_categories .children,
  498. .widget_nav_menu .sub-menu,
  499. .widget_pages .children {
  500. border-bottom: 0;
  501. margin-bottom: #{-0.25 * map-deep-get($config-global, "spacing", "vertical")};
  502. margin-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  503. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  504. }
  505. .widget_recent_entries .post-date {
  506. display: block;
  507. }
  508. .widget_rss {
  509. cite,
  510. .rssSummary,
  511. .rss-date {
  512. display: block;
  513. }
  514. }
  515. .widget_search {
  516. input[type="search"] {
  517. display: block;
  518. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  519. width: 100%;
  520. }
  521. }
  522. /**
  523. * Search block
  524. */
  525. .wp-block-search {
  526. &.wp-block-search__button-inside {
  527. .wp-block-search__inside-wrapper{
  528. border-radius: #{map-deep-get($config-button, "border-radius")};
  529. }
  530. .wp-block-search__input {
  531. background: transparent;
  532. }
  533. }
  534. .wp-block-search__input {
  535. margin-right: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  536. border-radius: #{map-deep-get($config-button, "border-radius")};
  537. }
  538. }