_extra-child-theme.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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,
  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. // Cover & Hero block
  182. .wp-block-cover .wp-block-cover__inner-container,
  183. .wp-block-coblocks-hero .wp-block-coblocks-hero__box {
  184. & > * {
  185. margin-top: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  186. margin-bottom: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  187. @include media(mobile) {
  188. margin-top: map-deep-get($config-global, "spacing", "vertical");
  189. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  190. }
  191. &:first-child {
  192. margin-top: 0;
  193. }
  194. &:last-child {
  195. margin-bottom: 0;
  196. }
  197. }
  198. }
  199. // Quote block
  200. .wp-block-quote {
  201. p {
  202. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  203. }
  204. }
  205. // Table block
  206. table,
  207. .wp-block-table {
  208. td,
  209. th {
  210. border-color: map-deep-get($config-global, "color", "border", "default");
  211. }
  212. }
  213. // Posts List block
  214. .a8c-posts-list-item__excerpt {
  215. text-align: left;
  216. }
  217. .wp-block-newspack-blocks-homepage-articles {
  218. article {
  219. .entry-title a{
  220. &:active,
  221. &:focus,
  222. &:hover {
  223. text-decoration: none;
  224. }
  225. }
  226. .cat-links,
  227. .entry-meta {
  228. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  229. }
  230. .cat-links a,
  231. .more-link,
  232. .entry-meta a {
  233. text-decoration: none;
  234. &:active,
  235. &:focus,
  236. &:hover {
  237. text-decoration: underline;
  238. }
  239. }
  240. }
  241. &.image-alignbehind article {
  242. .entry-title a{
  243. &:active,
  244. &:focus,
  245. &:hover {
  246. text-decoration: underline;
  247. }
  248. }
  249. }
  250. }
  251. .has-background:not(.has-background-background-color),
  252. [class*="background-color"]:not(.has-background-background-color),
  253. [style*="background-color"] {
  254. .wp-block-newspack-blocks-homepage-articles article {
  255. .entry-title a:hover {
  256. text-decoration: underline;
  257. }
  258. }
  259. }
  260. // Hentry
  261. .entry-header {
  262. .entry-meta {
  263. display: none;
  264. }
  265. }
  266. .entry-footer {
  267. border-top: 1px solid #{map-deep-get($config-global, "color", "border", "default")};
  268. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  269. font-size: #{map-deep-get($config-global, "font", "size", "xs")};
  270. padding-top: #{map-deep-get($config-global, "spacing", "unit")};
  271. }
  272. article .entry-header .entry-title,
  273. .page-title,
  274. .a8c-posts-list-item__title {
  275. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  276. font-size: #{map-deep-get($config-global, "font", "size", "xxxl")};
  277. margin-bottom: #{1.5 * map-deep-get($config-global, "spacing", "vertical")};
  278. a {
  279. color: inherit;
  280. &:active,
  281. &:focus,
  282. &:hover {
  283. color: #{map-deep-get($config-global, "color", "primary", "default")};
  284. }
  285. }
  286. }
  287. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  288. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  289. margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
  290. a {
  291. color: inherit;
  292. text-decoration: none;
  293. &:active,
  294. &:focus,
  295. &:hover {
  296. color: #{map-deep-get($config-global, "color", "primary", "default")};
  297. }
  298. }
  299. }
  300. .entry-content {
  301. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  302. }
  303. // Pagination
  304. .pagination {
  305. text-align: center;
  306. .nav-links > * {
  307. color: map-deep-get($config-global, "color", "foreground", "light");
  308. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  309. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  310. text-transform: uppercase;
  311. &.current,
  312. &:active,
  313. &:focus,
  314. &:hover {
  315. color: map-deep-get($config-global, "color", "primary", "default");
  316. }
  317. }
  318. svg {
  319. fill: currentColor;
  320. }
  321. &:before {
  322. background: map-deep-get($config-global, "color", "border", "default");;
  323. height: 1px;
  324. content: "";
  325. display: block;
  326. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  327. @include media(mobile) {
  328. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  329. }
  330. @extend %responsive-alignfull;
  331. }
  332. }
  333. // Post Navigation
  334. .post-navigation {
  335. a {
  336. color: map-deep-get($config-global, "color", "foreground", "default");
  337. &:active,
  338. &:hover,
  339. &:focus {
  340. color: map-deep-get($config-global, "color", "primary", "default");
  341. }
  342. }
  343. .meta-nav {
  344. color: map-deep-get($config-global, "color", "foreground", "light");
  345. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  346. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  347. font-weight: bold;
  348. text-transform: uppercase;
  349. }
  350. .post-title {
  351. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  352. }
  353. &:before {
  354. background: map-deep-get($config-global, "color", "border", "default");;
  355. height: 1px;
  356. content: "";
  357. display: block;
  358. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  359. @include media(mobile) {
  360. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  361. }
  362. @extend %responsive-alignfull;
  363. }
  364. }
  365. // Comments
  366. .comments-area {
  367. &:before {
  368. background: map-deep-get($config-global, "color", "border", "default");;
  369. height: 1px;
  370. content: "";
  371. display: block;
  372. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  373. @include media(mobile) {
  374. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  375. }
  376. @extend %responsive-alignfull;
  377. }
  378. .comment-list {
  379. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "light");
  380. > li {
  381. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  382. }
  383. }
  384. .children {
  385. > li {
  386. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  387. }
  388. }
  389. }
  390. .comments-title,
  391. .comment-reply-title {
  392. @include font-family( map-deep-get($config-global, "font", "family", "primary") );
  393. font-size: #{map-deep-get($config-heading, "font", "size", "h3")};
  394. }
  395. .comment-meta {
  396. .comment-metadata {
  397. color: map-deep-get($config-global, "color", "foreground", "light");
  398. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  399. a {
  400. color: inherit;
  401. }
  402. a:active,
  403. a:focus,
  404. a:hover {
  405. color: map-deep-get($config-global, "color", "primary", "default");
  406. }
  407. }
  408. }
  409. // Comments Navigation
  410. .comment-navigation {
  411. a {
  412. color: map-deep-get($config-global, "color", "foreground", "light");
  413. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  414. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  415. text-transform: uppercase;
  416. &:active,
  417. &:focus,
  418. &:hover {
  419. color: map-deep-get($config-global, "color", "primary", "default");
  420. }
  421. }
  422. .comments-title + & {
  423. display: none;
  424. }
  425. }
  426. // Widgets
  427. .widget-area {
  428. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  429. .widget-title,
  430. .widgettitle {
  431. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  432. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  433. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  434. text-transform: uppercase;
  435. &:empty {
  436. display: none;
  437. }
  438. }
  439. @include media(mobile) {
  440. padding-top: map-deep-get($config-global, "spacing", "vertical");
  441. }
  442. @include media(laptop) {
  443. display: flex;
  444. flex-wrap: wrap;
  445. justify-content: space-between;
  446. & > *:nth-child(2) {
  447. margin-top: 0;
  448. }
  449. .widget {
  450. width: calc(50% - #{map-deep-get($config-global, "spacing", "horizontal")});
  451. }
  452. }
  453. }
  454. .widget_calendar,
  455. .widget_calendar {
  456. caption {
  457. font-weight: bold;
  458. }
  459. td,
  460. th {
  461. text-align: center;
  462. }
  463. }
  464. .widget_archive,
  465. .widget_categories,
  466. .widget_links,
  467. .widget_meta,
  468. .widget_nav_menu,
  469. .widget_pages,
  470. .widget_recent_comments,
  471. .widget_recent_entries,
  472. .widget_rss,
  473. .widget_rss_links,
  474. .widget_top-posts,
  475. .widget_authors,
  476. .widget_jp_blogs_i_follow,
  477. .widget_top-click,
  478. .widget_upcoming_events_widget {
  479. ul {
  480. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "light");
  481. list-style: none;
  482. padding-left: 0;
  483. }
  484. li {
  485. border-top: 1px solid map-deep-get($config-global, "color", "border", "light");
  486. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} 0;
  487. }
  488. }
  489. .widget_categories .children,
  490. .widget_nav_menu .sub-menu,
  491. .widget_pages .children {
  492. border-bottom: 0;
  493. margin-bottom: #{-0.25 * map-deep-get($config-global, "spacing", "vertical")};
  494. margin-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  495. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  496. }
  497. .widget_recent_entries .post-date {
  498. display: block;
  499. }
  500. .widget_rss {
  501. cite,
  502. .rssSummary,
  503. .rss-date {
  504. display: block;
  505. }
  506. }
  507. .widget_search {
  508. input[type="search"] {
  509. display: block;
  510. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  511. width: 100%;
  512. }
  513. }