_extra-child-theme.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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. #masthead {
  131. padding-left: 16px;
  132. padding-right: 16px;
  133. padding-bottom: $spacing_vertical;
  134. position: relative;
  135. @extend %responsive-alignwide-nested;
  136. @include media(desktop) {
  137. padding-left: 0;
  138. padding-right: 0;
  139. }
  140. }
  141. /**
  142. * Mobile-Menu
  143. */
  144. .site-header {
  145. margin-left: 0;
  146. margin-right: 0;
  147. }
  148. /**
  149. * CSS-grid Desktop Menu
  150. */
  151. @include media(mobile) {
  152. .site-header {
  153. align-items: center;
  154. display: grid;
  155. margin-left: auto;
  156. margin-right: auto;
  157. grid-template-columns: auto;
  158. grid-template-rows: auto;
  159. grid-column-gap: #{map-deep-get($config-global, "spacing", "unit")};
  160. grid-template-areas:
  161. "site-logo site-logo"
  162. "site-title main-navigation"
  163. "site-description social-navigation";
  164. &:before,
  165. &:after {
  166. content: none;
  167. display: none;
  168. }
  169. & > * {
  170. margin-top: 0;
  171. margin-bottom: 0;
  172. }
  173. .site-logo {
  174. grid-area: site-logo;
  175. margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
  176. }
  177. .site-title {
  178. grid-area: site-title;
  179. & + .site-description {
  180. margin-top: 0;
  181. }
  182. }
  183. .site-description {
  184. align-self: center;
  185. grid-area: site-description;
  186. }
  187. .main-navigation {
  188. align-self: center;
  189. justify-self: flex-end;
  190. grid-area: main-navigation;
  191. & > div > ul {
  192. justify-content: flex-end;
  193. margin-left: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  194. margin-right: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  195. & > li {
  196. padding-left: #{map-deep-get($config-header, "main-nav", "link-padding")};
  197. padding-right: #{map-deep-get($config-header, "main-nav", "link-padding")};
  198. padding-top: $baseline-unit;
  199. padding-bottom: $baseline-unit;
  200. & > a {
  201. padding: 0;
  202. }
  203. .sub-menu {
  204. a {
  205. background: $color_primary;
  206. color: $color_background;
  207. &:hover,
  208. &:focus {
  209. text-decoration: underline;
  210. }
  211. }
  212. }
  213. }
  214. & > .menu-item-has-children > a::after {
  215. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  216. }
  217. }
  218. & > div > ul > li:hover,
  219. & > div > ul > li.focus,
  220. & > div > ul > li.current-menu-item {
  221. & > a {
  222. }
  223. & > ul {
  224. box-shadow: none;
  225. overflow: hidden;
  226. &:before {
  227. border-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid #{map-deep-get($config-global, "color", "primary", "default")};
  228. border-left: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  229. border-right: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  230. content: "";
  231. display: block;
  232. margin-left: #{map-deep-get($config-global, "spacing", "unit")};
  233. width: #{map-deep-get($config-global, "spacing", "unit")};
  234. }
  235. }
  236. & li {
  237. & > a {
  238. }
  239. &:hover > a,
  240. &.focus > a,
  241. &.current-menu-item > a {
  242. }
  243. }
  244. }
  245. }
  246. .social-navigation {
  247. align-self: center;
  248. grid-area: social-navigation;
  249. justify-self: flex-end;
  250. }
  251. }
  252. }
  253. .main-navigation > div > ul > li:first-of-type,
  254. .social-navigation > div > ul > li:first-of-type {
  255. margin-left: 0;
  256. }
  257. .main-navigation > div > ul > li:last-of-type,
  258. .social-navigation > div > ul > li:last-of-type {
  259. margin-right: 0;
  260. }
  261. .footer-navigation .footer-menu > li:first-of-type {
  262. margin-left: 0;
  263. }
  264. // Social Menu
  265. .social-navigation {
  266. & > div > ul {
  267. flex-wrap: wrap;
  268. }
  269. }
  270. .main-navigation > div {
  271. text-align: left;
  272. }
  273. .main-navigation > div > ul,
  274. .pagination .nav-links {
  275. justify-content: center;
  276. }
  277. /**
  278. * 3. Main Wrapper and Content
  279. */
  280. .home.page.hide-homepage-title {
  281. .site-content {
  282. .site-main {
  283. padding-top: 0;
  284. }
  285. @include media(mobile-only) {
  286. padding-top: $spacing_vertical;
  287. }
  288. }
  289. }
  290. .site-content {
  291. .site-main {
  292. padding-top: 0;
  293. padding-bottom: 0;
  294. }
  295. @include media(mobile-only) {
  296. padding-top: $site_main_spacing_vertical;
  297. }
  298. }
  299. /**
  300. * 4. Footer & Footer Widgets
  301. */
  302. .site-footer {
  303. margin: 0 auto;
  304. display: block;
  305. padding-left: $spacing_horizontal;
  306. padding-right: $spacing_horizontal;
  307. button,
  308. .button,
  309. input[type="button"],
  310. input[type="reset"],
  311. input[type="submit"], {
  312. &:hover {
  313. }
  314. }
  315. #footer-widgets {
  316. border-bottom: 1px solid #{map-deep-get($config-global, "color", "border", "light")};
  317. @extend %responsive-alignwide-nested;
  318. display: flex;
  319. flex-wrap: nowrap;
  320. flex: 1 0 100%;
  321. margin: 0 auto;
  322. @include alves-media(laptop-only) {
  323. display: block;
  324. }
  325. .widget-area {
  326. flex: 1;
  327. font-size: $font_size_sm;
  328. @include media(laptop) {
  329. padding-right: $footer_spacing_horizontal;
  330. &:last-of-type {
  331. padding-right: 0;
  332. }
  333. }
  334. }
  335. }
  336. #footer-info-wrapper {
  337. @extend %responsive-alignwide-nested;
  338. display: flex;
  339. margin: 0 auto;
  340. padding-top: ($baseline-unit * .75);
  341. max-width: 100%;
  342. a {
  343. color: $color_foreground;
  344. @include font-family( map-deep-get( $config-global, "font", "family", "secondary" ) );
  345. padding: 0;
  346. text-decoration: none;
  347. &:hover,
  348. &:focus {
  349. color: $color_primary;
  350. }
  351. }
  352. .footer-navigation {
  353. order: 1;
  354. flex-wrap: nowrap;
  355. flex: 1;
  356. text-align: left;
  357. padding-right: $spacing_horizontal;
  358. .footer-menu {
  359. display: block;
  360. justify-content: left;
  361. margin: 0;
  362. li:after {
  363. content: ' · ';
  364. display: inline;
  365. padding-right: 5px;
  366. vertical-align: middle;
  367. }
  368. li:last-of-type:after {
  369. content: '';
  370. }
  371. }
  372. }
  373. .site-info {
  374. color: $color_secondary;
  375. text-align: right;
  376. order: 2;
  377. font-style: italic;
  378. flex-wrap: nowrap;
  379. flex: 1;
  380. }
  381. }
  382. }
  383. /**
  384. * 5. Widgets
  385. */
  386. .widget {
  387. .widget-title {
  388. margin-bottom: $spacing_vertical;
  389. }
  390. ul {
  391. list-style: none;
  392. padding-left: 0;
  393. &.children > li {
  394. margin-bottom: 0;
  395. margin-top: 0;
  396. border: 0;
  397. a {
  398. padding-left: $spacing_horizontal;
  399. }
  400. }
  401. li {
  402. a {
  403. padding: ($baseline-unit * .75) 0;
  404. &:hover {
  405. text-decoration: underline;
  406. }
  407. }
  408. &.recentcomments a {
  409. padding: ($baseline-unit * .75) 0 !important;
  410. }
  411. }
  412. }
  413. }
  414. /**
  415. * 6. Blocks
  416. */
  417. .wp-block-latest-posts {
  418. > li {
  419. > a {
  420. display: inline-block;
  421. text-decoration: none;
  422. &:hover,
  423. &:focus,
  424. &:active {
  425. text-decoration: underline;
  426. }
  427. }
  428. }
  429. .wp-block-latest-posts__post-excerpt,
  430. .wp-block-latest-posts__post-full-content {
  431. margin-top: $spacing_vertical;
  432. }
  433. }