_extra-child-theme.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /**
  2. * Extra Child Theme Styles
  3. *
  4. * 0. Mixins & Variables
  5. * 1. General Styles
  6. * 2. Header & Navigation
  7. * 3. Main Wrapper and Content
  8. * 4. Footer & Footer Widgets
  9. * 5. Widgets
  10. * 6. Blocks
  11. */
  12. /**
  13. * 0. Mixins and Variables
  14. */
  15. @mixin alves-media( $res ) {
  16. @if laptop-only == $res {
  17. @media only screen and (max-width: #{map-deep-get($config-global, "breakpoint", "lg") - 1}) {
  18. @content;
  19. }
  20. }
  21. }
  22. $color_background: #{map-deep-get($config-global, "color", "background", "default")};
  23. $color_background_light: #{map-deep-get($config-global, "color", "background", "light")};
  24. $color_background_dark: #{map-deep-get($config-global, "color", "background", "dark")};
  25. $color_foreground: #{map-deep-get($config-global, "color", "foreground", "default")};
  26. $color_primary: #{map-deep-get($config-global, "color", "primary", "default")};
  27. $color_secondary: #{map-deep-get($config-global, "color", "secondary", "default")};
  28. $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "hover")};
  29. $color_secondary_hover: #{map-deep-get($config-global, "color", "secondary", "hover")};
  30. $spacing_horizontal: #{map-deep-get($config-global, "spacing", "horizontal")};
  31. $spacing_vertical: #{map-deep-get($config-global, "spacing", "vertical")};
  32. $font_size_xs: #{map-deep-get($config-global, "font", "size", "xs")};
  33. $font_size_sm: #{map-deep-get($config-global, "font", "size", "sm")};
  34. $font_size_md: #{map-deep-get($config-global, "font", "size", "md")};
  35. $font_size_base: #{map-deep-get($config-global, "font", "size", "base")};
  36. $font_size_lg: #{map-deep-get($config-global, "font", "size", "lg")};
  37. $font_size_xl: #{map-deep-get($config-global, "font", "size", "xl")};
  38. $font_family_code: #{map-deep-get($config-global, "font", "family", "code")};
  39. $font_line_height_body: #{map-deep-get($config-global, "font", "line-height", "body")};
  40. $button_line_height: #{map-deep-get($config-button, "font", "line-height")};
  41. $button_font_weight: #{map-deep-get($config-button, "font", "weight")};
  42. $button_font_family: #{map-deep-get($config-button, "font", "family", "fallback")};
  43. $button_font_size: #{map-deep-get($config-button, "font", "size")};
  44. $button_spacing_vertical: #{map-deep-get($config-button, "padding", "vertical")};
  45. $button_spacing_horizontal: #{map-deep-get($config-button, "padding", "horizontal")};
  46. $button_background_hover: #{map-deep-get($config-button, "color", "background-hover")};
  47. $font_size_widget_title: #{map-deep-get($config-heading, "font", "size", "h4")};
  48. $footer_spacing_horizontal: 2 * map-deep-get($config-global, "spacing", "horizontal");
  49. $site_main_spacing_vertical: 2 * map-deep-get($config-global, "spacing", "vertical");
  50. /**
  51. * 1. General Styles
  52. */
  53. a {
  54. text-decoration: underline;
  55. &:hover,
  56. &:focus {
  57. text-decoration: none;
  58. }
  59. .wp-block-group &,
  60. .wp-block-cover &,
  61. .wp-block-cover-image &,
  62. .wp-block-media-text &,
  63. p:not(.site-title) & {
  64. text-decoration: underline;
  65. &.wp-block-button__link,
  66. &:hover {
  67. text-decoration: none;
  68. }
  69. }
  70. }
  71. .has-background {
  72. a {
  73. color: currentColor;
  74. }
  75. }
  76. a {
  77. text-decoration: none;
  78. }
  79. .entry-header,
  80. .page-header {
  81. padding-top: $spacing_vertical;
  82. }
  83. .site-info,
  84. .entry-footer,
  85. .entry-header,
  86. .page-title,
  87. .page-header,
  88. .author-title,
  89. .comments-title,
  90. .comment-reply-title {
  91. text-align: center;
  92. }
  93. button,
  94. .archive .read-more a,
  95. .blog .read-more a,
  96. .search-results .read-more a,
  97. .button,
  98. input[type="button"],
  99. input[type="reset"],
  100. input[type="submit"],
  101. .wp-block-button a {
  102. transition: background-color 0.125s ease-in;
  103. }
  104. .widget-title {
  105. @include font-family( map-deep-get($config-global, "font", "family", "primary" ) );
  106. }
  107. blockquote cite {
  108. @include font-family( map-deep-get($config-global, "font", "family", "secondary" ) );
  109. }
  110. .wp-block-quote p,
  111. blockquote p {
  112. font-size: $font_size_md;
  113. }
  114. .comment-reply-title {
  115. display: inherit;
  116. }
  117. .comment .comment-reply-title {
  118. display: flex;
  119. }
  120. .entry-meta,
  121. .entry-footer {
  122. color: $color_foreground;
  123. }
  124. /**
  125. * 2. Header & Navigation
  126. */
  127. /**
  128. * Wide Header & Footer
  129. */
  130. body:not(.fse-enabled) {
  131. #masthead {
  132. padding-left: 16px;
  133. padding-right: 16px;
  134. padding-bottom: $spacing_vertical;
  135. position: relative;
  136. @extend %responsive-alignwide-nested;
  137. @include media(desktop) {
  138. padding-left: 0;
  139. padding-right: 0;
  140. }
  141. }
  142. }
  143. /**
  144. * Mobile-Menu
  145. */
  146. .site-header {
  147. margin-left: 0;
  148. margin-right: 0;
  149. }
  150. /**
  151. * CSS-grid Desktop Menu
  152. */
  153. @include media(mobile) {
  154. .site-header {
  155. align-items: center;
  156. display: grid;
  157. margin-left: auto;
  158. margin-right: auto;
  159. grid-template-columns: auto;
  160. grid-template-rows: auto;
  161. grid-column-gap: #{map-deep-get($config-global, "spacing", "unit")};
  162. grid-template-areas:
  163. "site-logo site-logo"
  164. "site-title main-navigation"
  165. "site-description social-navigation";
  166. &:before,
  167. &:after {
  168. content: none;
  169. display: none;
  170. }
  171. & > * {
  172. margin-top: 0;
  173. margin-bottom: 0;
  174. }
  175. .site-logo {
  176. grid-area: site-logo;
  177. margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
  178. }
  179. .site-title {
  180. grid-area: site-title;
  181. & + .site-description {
  182. margin-top: 0;
  183. }
  184. }
  185. .site-description {
  186. align-self: center;
  187. grid-area: site-description;
  188. }
  189. .main-navigation {
  190. align-self: center;
  191. display: flex;
  192. justify-content: flex-end;
  193. grid-area: main-navigation;
  194. flex-wrap: wrap;
  195. & > div {
  196. justify-content: flex-end;
  197. }
  198. & > div > ul {
  199. justify-content: flex-end;
  200. margin-left: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  201. margin-right: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  202. & > li {
  203. padding-left: #{map-deep-get($config-header, "main-nav", "link-padding")};
  204. padding-right: #{map-deep-get($config-header, "main-nav", "link-padding")};
  205. padding-top: $baseline-unit;
  206. padding-bottom: $baseline-unit;
  207. & > a {
  208. padding: 0;
  209. }
  210. .sub-menu {
  211. a {
  212. background: $color_primary;
  213. color: $color_background;
  214. &:hover,
  215. &:focus {
  216. text-decoration: underline;
  217. }
  218. }
  219. }
  220. }
  221. & > .menu-item-has-children > a::after {
  222. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  223. }
  224. }
  225. & > div > ul > li:hover,
  226. & > div > ul > li.focus,
  227. & > div > ul > li.current-menu-item {
  228. & > a {
  229. }
  230. & > ul {
  231. box-shadow: none;
  232. overflow: hidden;
  233. &:before {
  234. border-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid #{map-deep-get($config-global, "color", "primary", "default")};
  235. border-left: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  236. border-right: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  237. content: "";
  238. display: block;
  239. margin-left: #{map-deep-get($config-global, "spacing", "unit")};
  240. width: #{map-deep-get($config-global, "spacing", "unit")};
  241. }
  242. }
  243. & li {
  244. & > a {
  245. }
  246. &:hover > a,
  247. &.focus > a,
  248. &.current-menu-item > a {
  249. }
  250. }
  251. }
  252. }
  253. .social-navigation {
  254. align-self: center;
  255. grid-area: social-navigation;
  256. justify-self: flex-end;
  257. }
  258. }
  259. }
  260. .main-navigation > div > ul > li:first-of-type,
  261. .social-navigation > div > ul > li:first-of-type {
  262. margin-left: 0;
  263. }
  264. .main-navigation > div > ul > li:last-of-type,
  265. .social-navigation > div > ul > li:last-of-type {
  266. margin-right: 0;
  267. }
  268. .footer-navigation .footer-menu > li:first-of-type {
  269. margin-left: 0;
  270. }
  271. // Social Menu
  272. .social-navigation {
  273. & > div > ul {
  274. flex-wrap: wrap;
  275. }
  276. }
  277. .main-navigation > div {
  278. text-align: left;
  279. }
  280. .pagination .nav-links {
  281. justify-content: center;
  282. }
  283. /**
  284. * 3. Main Wrapper and Content
  285. */
  286. .home.page.hide-homepage-title {
  287. .site-content {
  288. .site-main {
  289. padding-top: 0;
  290. }
  291. @include media(mobile-only) {
  292. padding-top: $spacing_vertical;
  293. }
  294. }
  295. }
  296. .site-content {
  297. .site-main {
  298. padding-top: 0;
  299. padding-bottom: 0;
  300. }
  301. @include media(mobile-only) {
  302. padding-top: $site_main_spacing_vertical;
  303. }
  304. }
  305. /**
  306. * 4. Footer & Footer Widgets
  307. */
  308. .site-footer {
  309. margin: 0 auto;
  310. display: block;
  311. padding-left: $spacing_horizontal;
  312. padding-right: $spacing_horizontal;
  313. button,
  314. .button,
  315. input[type="button"],
  316. input[type="reset"],
  317. input[type="submit"], {
  318. &:hover {
  319. }
  320. }
  321. #footer-widgets {
  322. border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "light")};
  323. @extend %responsive-alignwide-nested;
  324. display: flex;
  325. flex-wrap: nowrap;
  326. flex: 1 0 100%;
  327. margin: 0 auto;
  328. @include alves-media(laptop-only) {
  329. display: block;
  330. }
  331. .widget-area {
  332. flex: 1;
  333. font-size: $font_size_sm;
  334. @include media(laptop) {
  335. padding-right: $footer_spacing_horizontal;
  336. &:last-of-type {
  337. padding-right: 0;
  338. }
  339. }
  340. }
  341. }
  342. #footer-info-wrapper {
  343. @extend %responsive-alignwide-nested;
  344. display: flex;
  345. margin: 0 auto;
  346. padding-top: ($baseline-unit * .75);
  347. max-width: 100%;
  348. a {
  349. color: $color_foreground;
  350. @include font-family( map-deep-get( $config-global, "font", "family", "secondary" ) );
  351. padding: 0;
  352. text-decoration: none;
  353. &:hover,
  354. &:focus {
  355. color: $color_primary;
  356. }
  357. }
  358. .footer-navigation {
  359. order: 1;
  360. flex-wrap: nowrap;
  361. flex: 1;
  362. text-align: left;
  363. padding-right: $spacing_horizontal;
  364. .footer-menu {
  365. display: block;
  366. justify-content: left;
  367. margin: 0;
  368. li:after {
  369. content: ' · ';
  370. display: inline;
  371. padding-right: 5px;
  372. vertical-align: middle;
  373. }
  374. li:last-of-type:after {
  375. content: '';
  376. }
  377. }
  378. }
  379. .site-info {
  380. color: $color_secondary;
  381. text-align: right;
  382. order: 2;
  383. font-style: italic;
  384. flex-wrap: nowrap;
  385. flex: 1;
  386. }
  387. }
  388. }
  389. /**
  390. * 5. Widgets
  391. */
  392. .widget {
  393. .widget-title {
  394. margin-bottom: $spacing_vertical;
  395. }
  396. ul {
  397. list-style: none;
  398. padding-left: 0;
  399. &.children > li {
  400. margin-bottom: 0;
  401. margin-top: 0;
  402. border: 0;
  403. a {
  404. padding-left: $spacing_horizontal;
  405. }
  406. }
  407. li {
  408. a {
  409. padding: ($baseline-unit * .75) 0;
  410. &:hover {
  411. text-decoration: underline;
  412. }
  413. }
  414. &.recentcomments a {
  415. padding: ($baseline-unit * .75) 0 !important;
  416. }
  417. }
  418. }
  419. }
  420. /**
  421. * 6. Blocks
  422. */
  423. .wp-block-latest-posts {
  424. > li {
  425. > a {
  426. display: inline-block;
  427. text-decoration: none;
  428. &:hover,
  429. &:focus,
  430. &:active {
  431. text-decoration: underline;
  432. }
  433. }
  434. }
  435. .wp-block-latest-posts__post-excerpt,
  436. .wp-block-latest-posts__post-full-content {
  437. margin-top: $spacing_vertical;
  438. }
  439. }
  440. .wp-block-newspack-blocks-homepage-articles article .entry-title a {
  441. text-decoration: none;
  442. }
  443. .wp-block-newspack-blocks-homepage-articles {
  444. article {
  445. .entry-title a {
  446. &:active,
  447. &:focus,
  448. &:hover {
  449. text-decoration: none;
  450. }
  451. }
  452. .cat-links a,
  453. .more-link,
  454. .entry-meta a {
  455. text-decoration: none;
  456. &:active,
  457. &:focus,
  458. &:hover {
  459. text-decoration: underline;
  460. }
  461. }
  462. }
  463. &.image-alignbehind article {
  464. .entry-title a {
  465. &:active,
  466. &:focus,
  467. &:hover {
  468. color: #fff;
  469. text-decoration: underline;
  470. }
  471. }
  472. }
  473. }
  474. .has-background:not(.has-background-background-color),
  475. [class*="background-color"]:not(.has-background-background-color),
  476. [style*="background-color"] {
  477. .wp-block-newspack-blocks-homepage-articles article {
  478. .entry-title a{
  479. &:active,
  480. &:focus,
  481. &:hover {
  482. text-decoration: underline;
  483. }
  484. }
  485. }
  486. }