_extra-child-theme.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. /**
  2. * Extra Child Theme Styles
  3. *
  4. * 1. General Helper Styles
  5. * 2. Header
  6. * 3. Main Wrapper and Content
  7. * 4. Navigation Menu
  8. * 5. Archive Pagination and Post Navigation
  9. * 6. Block Specific Styles
  10. * 6.1. Column Block
  11. * 6.2. Quote Block
  12. * 6.3. Hero Block and Cover Block
  13. * 6.4. File Block
  14. * 6.5. Latest Comments Block
  15. * 6.6. Button Block
  16. * 6.7. Posts List Block
  17. * 6.8. Search Block
  18. * 7. Widgets
  19. * 8. AMP Support
  20. */
  21. $color_background: #{map-deep-get($config-global, "color", "background", "default")};
  22. $color_background_light: #{map-deep-get($config-global, "color", "background", "light")};
  23. $color_foreground: #{map-deep-get($config-global, "color", "foreground", "default")};
  24. $color_primary: #{map-deep-get($config-global, "color", "primary", "default")};
  25. $color_secondary: #{map-deep-get($config-global, "color", "secondary", "default")};
  26. $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "hover")};
  27. $spacing_horizontal: #{map-deep-get($config-global, "spacing", "horizontal")};
  28. $spacing_vertical: #{map-deep-get($config-global, "spacing", "vertical")};
  29. $font_size_xs: #{map-deep-get($config-global, "font", "size", "xs")};
  30. $font_size_md: #{map-deep-get($config-global, "font", "size", "md")};
  31. $font_size_base: #{map-deep-get($config-global, "font", "size", "base")};
  32. $font_size_lg: #{map-deep-get($config-global, "font", "size", "lg")};
  33. $font_size_xl: #{map-deep-get($config-global, "font", "size", "xl")};
  34. $font_family_code: #{map-deep-get($config-global, "font", "family", "code")};
  35. $font_line_height_body: #{map-deep-get($config-global, "font", "line-height", "body")};
  36. $button_line_height: #{map-deep-get($config-button, "font", "line-height")};
  37. $button_font_weight: #{map-deep-get($config-button, "font", "weight")};
  38. $button_font_size: #{map-deep-get($config-button, "font", "size")};
  39. $button_spacing_vertical: #{map-deep-get($config-button, "padding", "vertical")};
  40. $button_spacing_horizontal: #{map-deep-get($config-button, "padding", "horizontal")};
  41. $button_color_hover: #{map-deep-get($config-button, "color", "text-hover")};
  42. $button_background_hover: #{map-deep-get($config-button, "color", "background-hover")};
  43. $font_size_widget_title: #{map-deep-get($config-heading, "font", "size", "h4")};
  44. /**
  45. * 1. General Styles
  46. */
  47. h1,
  48. h2,
  49. h3,
  50. h4,
  51. h5,
  52. h6 {
  53. color: $color_primary;
  54. }
  55. a {
  56. text-decoration: none;
  57. .wp-block-group &,
  58. .wp-block-cover &,
  59. .wp-block-cover-image &,
  60. .wp-block-media-text &,
  61. p:not(.site-title) & {
  62. text-decoration: underline;
  63. &.wp-block-button__link,
  64. &:hover {
  65. text-decoration: none;
  66. }
  67. }
  68. }
  69. /**
  70. * 2. Header
  71. */
  72. #masthead {
  73. border-bottom: 1px solid $color_background_light;
  74. background: $color_background;
  75. -webkit-transition: all .25s ease-in-out;
  76. -moz-transition: all .25s ease-in-out;
  77. transition: all .25s ease-in-out;
  78. width: 100%;
  79. .site-header-wrapper {
  80. display: flex;
  81. flex-wrap: wrap;
  82. position: relative;
  83. z-index: 1;
  84. -webkit-align-items: center;
  85. -ms-flex-align: center;
  86. align-items: center;
  87. .site-branding {
  88. -webkit-transition: margin-top .25s ease-in-out;
  89. -moz-transition: margin-top .25s ease-in-out;
  90. transition: margin-top .25s ease-in-out;
  91. margin-right: auto;
  92. .site-description {
  93. display: none;
  94. }
  95. .site-title {
  96. a {
  97. text-decoration: none;
  98. }
  99. }
  100. .site-logo {
  101. margin-bottom: $spacing_horizontal;
  102. }
  103. }
  104. .site-menu {
  105. display: block;
  106. -webkit-flex: 0 1 auto;
  107. -ms-flex: 0 1 auto;
  108. flex: 0 1 auto;
  109. @include media(mobile-only) {
  110. width: 100%;
  111. }
  112. }
  113. .main-navigation {
  114. > ul {
  115. > li {
  116. &.current-menu-item {
  117. a {
  118. border-color: $color_secondary;
  119. border-style: solid;
  120. border-width: 0 0 .125em;
  121. color: $color_primary_hover;
  122. }
  123. }
  124. }
  125. }
  126. ul {
  127. li {
  128. &.current-menu-item {
  129. > a {
  130. border-color: $color_secondary;
  131. border-style: solid;
  132. border-width: 0 0 .125em;
  133. color: $color_primary_hover;
  134. }
  135. }
  136. a {
  137. &::after {
  138. color: $color_primary_hover;
  139. }
  140. }
  141. ul {
  142. color: $color_background_light;
  143. li {
  144. border-bottom: 1px solid;
  145. margin: 0;
  146. &:first-child {
  147. border-top: 1px solid;
  148. }
  149. &.current-menu-item {
  150. a {
  151. border: none;
  152. }
  153. }
  154. }
  155. }
  156. }
  157. }
  158. }
  159. @include media(mobile) {
  160. .main-navigation {
  161. > ul {
  162. > li {
  163. &:first-child {
  164. margin-left: 0;
  165. }
  166. }
  167. }
  168. ul {
  169. li {
  170. margin: 0 .75em;
  171. &:first-child {
  172. margin-left: 0;
  173. }
  174. &:hover {
  175. ul {
  176. left: auto;
  177. right: 0;
  178. }
  179. }
  180. a {
  181. padding: .25em 0;
  182. }
  183. ul {
  184. li {
  185. a {
  186. padding: .75em;
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. @include media(mobile) {
  197. .site-header {
  198. padding-right: $spacing_vertical;
  199. padding-left: $spacing_vertical;
  200. position: fixed;
  201. z-index: 9999;
  202. }
  203. }
  204. @include media(mobile-only) {
  205. .site-title,
  206. .site-description {
  207. font-size: $font_size_xl;
  208. hyphens: auto;
  209. }
  210. }
  211. /**
  212. * 4. Navigation
  213. */
  214. /**
  215. * 4.1 Main Navigation
  216. */
  217. @include media(mobile-only) {
  218. #toggle-menu {
  219. position: absolute;
  220. top: 0;
  221. right: 0;
  222. }
  223. }
  224. /**
  225. * 4.2 Social Navigation
  226. */
  227. .social-links-menu {
  228. display: flex;
  229. flex-wrap: wrap;
  230. justify-content: flex-end;
  231. }
  232. @include media(mobile-only) {
  233. .social-links-menu {
  234. justify-content: center;
  235. }
  236. }
  237. .site-footer {
  238. > .social-navigation {
  239. order: 2;
  240. margin-bottom: 0;
  241. }
  242. }
  243. /**
  244. * 5. Archive Pagination and Post Navigation
  245. */
  246. /**
  247. * 6. Block Specific Styles
  248. */
  249. /**
  250. * 6.1. Column Block
  251. */
  252. /**
  253. * 6.2. Quote Block
  254. */
  255. .wp-block-quote,
  256. .wp-block-quote[style*="text-align:center"],
  257. .wp-block-quote[style*="text-align:right"] {
  258. border: 1px solid $color_background_light;
  259. padding: $spacing_horizontal;
  260. &.is-style-large {
  261. p {
  262. line-height: $font_line_height_body;
  263. }
  264. }
  265. p {
  266. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  267. font-size: $font_size_md;
  268. line-height: $font_line_height_body;
  269. }
  270. cite {
  271. color: inherit;
  272. font-size: $font_size_md;
  273. }
  274. }
  275. /**
  276. * 6.3. Hero Block and Cover Block
  277. */
  278. /**
  279. * 6.4. File Block
  280. */
  281. .wp-block-file {
  282. a {
  283. &.wp-block-file__button {
  284. line-height: $button_line_height;
  285. cursor: pointer;
  286. font-weight: $button_font_weight;
  287. @include font-family( map-deep-get($config-button, "font", "family") );
  288. // font-size: $button_font_size;
  289. padding: $button_spacing_vertical $button_spacing_horizontal;
  290. display: inline-block;
  291. &:focus,
  292. &:hover {
  293. color: $button_color_hover;
  294. background-color: $button_background_hover;
  295. opacity: 1;
  296. }
  297. }
  298. }
  299. }
  300. /**
  301. * 6.5. Latest Comments Block
  302. */
  303. .wp-block-latest-comments {
  304. .wp-block-latest-comments__comment-meta {
  305. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  306. }
  307. }
  308. /**
  309. * 6.6. Button Block
  310. * 6.7. Posts List Block
  311. * 6.8. Search Block
  312. */
  313. .wp-block-button, .a8c-posts-list {
  314. &.minimal {
  315. a {
  316. background: 0 0;
  317. border: 2px solid;
  318. }
  319. }
  320. }
  321. button,
  322. .button,
  323. input[type="submit"],
  324. .wp-block-button__link,
  325. .wp-block-file__button,
  326. .a8c-posts-list__view-all,
  327. button[data-load-more-btn] {
  328. border: 0;
  329. border-radius: 5em;
  330. text-transform: uppercase;
  331. &.has-background {
  332. &:focus,
  333. &:hover,
  334. &:visited {
  335. opacity: .8;
  336. }
  337. }
  338. }
  339. .wp-block-coblocks-hero__box,
  340. .wp-block-cover__inner-container,
  341. .wp-block-columns,
  342. .wp-block-group {
  343. .wp-block-latest-posts {
  344. border-bottom: 1px solid $color_background_light;
  345. > li {
  346. border-top: 1px solid $color_background_light;
  347. margin: 0;
  348. padding-top: $spacing_horizontal;
  349. padding-bottom: $spacing_horizontal;
  350. > a {
  351. font-size: $font_size_base;
  352. font-weight: normal;
  353. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  354. line-height: $font_line_height_body;
  355. }
  356. > time {
  357. &.wp-block-latest-posts__post-date {
  358. font-size: $font_size_base;
  359. }
  360. }
  361. }
  362. }
  363. }
  364. .wp-block-newspack-blocks-homepage-articles {
  365. article {
  366. .entry-title a {
  367. &:active,
  368. &:focus,
  369. &:hover {
  370. text-decoration: none;
  371. }
  372. }
  373. .more-link {
  374. &:active,
  375. &:focus,
  376. &:hover {
  377. color: #{map-deep-get($config-global, "color", "primary", "hover")};
  378. }
  379. }
  380. .cat-links a,
  381. .more-link,
  382. .entry-meta a {
  383. text-decoration: none;
  384. &:active,
  385. &:focus,
  386. &:hover {
  387. text-decoration: underline;
  388. }
  389. }
  390. }
  391. &.image-alignbehind article {
  392. .entry-title a {
  393. &:active,
  394. &:focus,
  395. &:hover {
  396. color: #fff;
  397. text-decoration: underline;
  398. }
  399. }
  400. .more-link {
  401. &:active,
  402. &:focus,
  403. &:hover {
  404. color: inherit;
  405. }
  406. }
  407. }
  408. }
  409. .has-background:not(.has-background-background-color),
  410. [class*="background-color"]:not(.has-background-background-color),
  411. [style*="background-color"] {
  412. .wp-block-newspack-blocks-homepage-articles article {
  413. .entry-title a{
  414. &:active,
  415. &:focus,
  416. &:hover {
  417. text-decoration: underline;
  418. }
  419. }
  420. .more-link {
  421. &:active,
  422. &:focus,
  423. &:hover {
  424. color: inherit;
  425. }
  426. }
  427. }
  428. }
  429. /**
  430. * 7. Widgets
  431. */
  432. .site-footer {
  433. .widget-area {
  434. .widget-title {
  435. font-size: $font_size_widget_title;
  436. margin-bottom: .857em;
  437. }
  438. }
  439. }
  440. /**
  441. * 6.9. Code, Pre Blocks
  442. */
  443. .wp-block-code {
  444. code {
  445. font-family: $font_family_code;
  446. font-size: $font_size_base;
  447. }
  448. }
  449. .wp-block-preformatted,
  450. .wp-block-verse {
  451. font-family: $font_family_code;
  452. font-size: $font_size_base;
  453. }
  454. /**
  455. * 8. AMP Support
  456. */
  457. html[amp] {
  458. @include media( mobile ) {
  459. .site-header {
  460. position: sticky;
  461. top: 0;
  462. }
  463. .logged-in .site-header {
  464. top: 32px;
  465. }
  466. }
  467. @media screen and ( max-width: 782px ) {
  468. .logged-in .site-header {
  469. top: 46px;
  470. }
  471. }
  472. }
  473. /**
  474. * Search block
  475. */
  476. .wp-block-search {
  477. &.wp-block-search__button-inside {
  478. .wp-block-search__inside-wrapper{
  479. border-radius: #{map-deep-get($config-button, "border-radius")};
  480. }
  481. .wp-block-search__input {
  482. background: transparent;
  483. }
  484. }
  485. .wp-block-search__input {
  486. margin-right: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  487. border-radius: #{map-deep-get($config-button, "border-radius")};
  488. }
  489. .wp-block-search__button {
  490. background-color: #{map-deep-get($config-global, "color", "primary", "default")};
  491. }
  492. }