_extra-child-theme.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  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. }
  302. /**
  303. * 4. Footer & Footer Widgets
  304. */
  305. .site-footer {
  306. margin: 0 auto;
  307. display: block;
  308. padding-left: $spacing_horizontal;
  309. padding-right: $spacing_horizontal;
  310. button,
  311. .button,
  312. input[type="button"],
  313. input[type="reset"],
  314. input[type="submit"], {
  315. &:hover {
  316. }
  317. }
  318. #footer-widgets {
  319. border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "light")};
  320. @extend %responsive-alignwide-nested;
  321. display: flex;
  322. flex-wrap: nowrap;
  323. flex: 1 0 100%;
  324. margin: 0 auto;
  325. @include alves-media(laptop-only) {
  326. display: block;
  327. }
  328. .widget-area {
  329. flex: 1;
  330. font-size: $font_size_sm;
  331. @include media(laptop) {
  332. padding-right: $footer_spacing_horizontal;
  333. &:last-of-type {
  334. padding-right: 0;
  335. }
  336. }
  337. }
  338. }
  339. #footer-info-wrapper {
  340. @extend %responsive-alignwide-nested;
  341. display: flex;
  342. margin: 0 auto;
  343. padding-top: ($baseline-unit * .75);
  344. max-width: 100%;
  345. a {
  346. color: $color_foreground;
  347. @include font-family( map-deep-get( $config-global, "font", "family", "secondary" ) );
  348. padding: 0;
  349. text-decoration: none;
  350. &:hover,
  351. &:focus {
  352. color: $color_primary;
  353. }
  354. }
  355. .footer-navigation {
  356. order: 1;
  357. flex-wrap: nowrap;
  358. flex: 1;
  359. text-align: left;
  360. padding-right: $spacing_horizontal;
  361. .footer-menu {
  362. display: block;
  363. justify-content: left;
  364. margin: 0;
  365. li:after {
  366. content: ' · ';
  367. display: inline;
  368. padding-right: 5px;
  369. vertical-align: middle;
  370. }
  371. li:last-of-type:after {
  372. content: '';
  373. }
  374. }
  375. }
  376. .site-info {
  377. color: $color_secondary;
  378. text-align: right;
  379. order: 2;
  380. font-style: italic;
  381. flex-wrap: nowrap;
  382. flex: 1;
  383. }
  384. }
  385. }
  386. /**
  387. * 5. Widgets
  388. */
  389. .widget {
  390. .widget-title {
  391. margin-bottom: $spacing_vertical;
  392. }
  393. ul {
  394. list-style: none;
  395. padding-left: 0;
  396. &.children > li {
  397. margin-bottom: 0;
  398. margin-top: 0;
  399. border: 0;
  400. a {
  401. padding-left: $spacing_horizontal;
  402. }
  403. }
  404. li {
  405. a {
  406. padding: ($baseline-unit * .75) 0;
  407. &:hover {
  408. text-decoration: underline;
  409. }
  410. }
  411. &.recentcomments a {
  412. padding: ($baseline-unit * .75) 0 !important;
  413. }
  414. }
  415. }
  416. }
  417. /**
  418. * 6. Blocks
  419. */
  420. .wp-block-latest-posts {
  421. > li {
  422. > a {
  423. display: inline-block;
  424. text-decoration: none;
  425. &:hover,
  426. &:focus,
  427. &:active {
  428. text-decoration: underline;
  429. }
  430. }
  431. }
  432. .wp-block-latest-posts__post-excerpt,
  433. .wp-block-latest-posts__post-full-content {
  434. margin-top: $spacing_vertical;
  435. }
  436. }
  437. .wp-block-newspack-blocks-homepage-articles article .entry-title a {
  438. text-decoration: none;
  439. }
  440. .wp-block-newspack-blocks-homepage-articles {
  441. article {
  442. .entry-title a {
  443. &:active,
  444. &:focus,
  445. &:hover {
  446. text-decoration: none;
  447. }
  448. }
  449. .cat-links a,
  450. .more-link,
  451. .entry-meta a {
  452. text-decoration: none;
  453. &:active,
  454. &:focus,
  455. &:hover {
  456. text-decoration: underline;
  457. }
  458. }
  459. }
  460. &.image-alignbehind article {
  461. .entry-title a {
  462. &:active,
  463. &:focus,
  464. &:hover {
  465. color: #fff;
  466. text-decoration: underline;
  467. }
  468. }
  469. }
  470. }
  471. .has-background:not(.has-background-background-color),
  472. [class*="background-color"]:not(.has-background-background-color),
  473. [style*="background-color"] {
  474. .wp-block-newspack-blocks-homepage-articles article {
  475. .entry-title a{
  476. &:active,
  477. &:focus,
  478. &:hover {
  479. text-decoration: underline;
  480. }
  481. }
  482. }
  483. }