_extra-child-theme.scss 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. /**
  5. * Variables
  6. */
  7. $color_background: map-deep-get($config-global, "color", "background", "default");
  8. $color_background_light: map-deep-get($config-global, "color", "background", "light");
  9. $color_foreground: map-deep-get($config-global, "color", "foreground", "default");
  10. $color_foreground_light: map-deep-get($config-global, "color", "foreground", "light");
  11. $color_primary: map-deep-get($config-global, "color", "primary", "default");
  12. $color_border: map-deep-get($config-global, "color", "border", "default");
  13. $spacing_unit: map-deep-get($config-global, "spacing", "unit");
  14. $spacing_horizontal: map-deep-get($config-global, "spacing", "horizontal");
  15. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  16. $border_radius_sm: map-deep-get($config-global, "border-radius", "sm");
  17. $font_size_sm: map-deep-get($config-global, "font", "size", "sm");
  18. $font_size_lg: map-deep-get($config-global, "font", "size", "lg");
  19. $font_size_xl: map-deep-get($config-global, "font", "size", "xl");
  20. $font_size_h1: map-deep-get($config-heading, "font", "size", "h1");
  21. /**
  22. * Reset
  23. */
  24. a,
  25. button,
  26. .button,
  27. input[type="submit"] {
  28. text-decoration: none;
  29. &:active,
  30. &:focus,
  31. &:hover {
  32. text-decoration: underline;
  33. }
  34. }
  35. dt {
  36. font-family: inherit;
  37. font-family: var( --font-base, inherit );
  38. }
  39. .entry-header,
  40. .entry-footer,
  41. .page-title,
  42. .author-title,
  43. .comments-title,
  44. .comment-reply-title {
  45. text-align: center;
  46. }
  47. .comment-reply-title {
  48. display: inherit;
  49. }
  50. .comment .comment-reply-title {
  51. display: flex;
  52. }
  53. .pagination .nav-links {
  54. justify-content: center;
  55. }
  56. /**
  57. * Wide Header & Footer
  58. */
  59. #masthead,
  60. #colophon {
  61. @extend %responsive-alignwide;
  62. }
  63. /**
  64. * Header
  65. */
  66. // Site Header
  67. .site-header {
  68. align-items: center;
  69. display: flex;
  70. justify-content: space-between;
  71. & > * {
  72. margin-top: 0;
  73. margin-bottom: 0;
  74. }
  75. }
  76. // Site Branding
  77. .site-branding {
  78. margin: 0;
  79. margin-right: auto;
  80. & > * {
  81. margin-top: #{0.5 * $spacing_unit};
  82. &:first-child {
  83. margin-top: 0;
  84. }
  85. }
  86. .site-logo img {
  87. max-height: #{3 * $spacing_vertical};
  88. width: auto;
  89. }
  90. .site-description {
  91. display: none;
  92. @include media(mobile) {
  93. display: block;
  94. }
  95. }
  96. }
  97. // Main Navigation
  98. .main-navigation {
  99. margin: 0;
  100. margin-left: auto;
  101. & > div {
  102. background: $color_background;
  103. border: 1px solid $color_border;
  104. border-radius: $border_radius_sm;
  105. left: #{2* $spacing_horizontal};
  106. margin-top: #{0.5 * $spacing_unit};
  107. padding: 0 #{0.5 * $spacing_unit};
  108. position: absolute;
  109. right: #{2 * $spacing_horizontal};
  110. z-index: 99;
  111. }
  112. li.current-menu-item > a {
  113. font-weight: 700;
  114. }
  115. @include media(mobile) {
  116. & > div {
  117. background: transparent;
  118. border: 0;
  119. border-radius: 0;
  120. left: auto;
  121. margin-top: 0;
  122. padding: 0;
  123. position: inherit;
  124. right: auto;
  125. z-index: 1;
  126. }
  127. & > div > ul {
  128. justify-content: flex-end;
  129. margin-left: -#{0.5 * $spacing_horizontal};
  130. margin-right: -#{0.5 * $spacing_horizontal};
  131. & > li {
  132. padding-left: $spacing_unit;
  133. padding-right: $spacing_unit;
  134. padding-top: $baseline-unit;
  135. padding-bottom: $baseline-unit;
  136. & > a {
  137. padding: 0;
  138. }
  139. }
  140. & > .menu-item-has-children > a::after {
  141. border-left: #{0.25 * $spacing_unit} solid transparent;
  142. border-right: #{0.25 * $spacing_unit} solid transparent;
  143. border-top: #{0.25 * $spacing_unit} solid $color_primary;
  144. content: "";
  145. margin: 0;
  146. margin-left: #{0.25 * $spacing_unit};
  147. vertical-align: middle;
  148. }
  149. }
  150. & > div > ul > li:hover,
  151. & > div > ul > li.focus,
  152. & > div > ul > li.current-menu-item {
  153. & > ul {
  154. border: 1px solid $color_border;
  155. border-radius: $border_radius_sm;
  156. box-shadow: none;
  157. overflow: hidden;
  158. }
  159. }
  160. }
  161. }
  162. // Toggle Menu
  163. #site-navigation #toggle-menu {
  164. align-items: center;
  165. display: flex;
  166. padding: #{0.5 * $spacing_unit} $spacing_unit;
  167. &::before {
  168. content: "";
  169. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'/%3E%3C/svg%3E");
  170. display: block;
  171. height: 24px;
  172. margin: 0;
  173. margin-right: #{0.25 * $spacing_unit};
  174. width: 24px;
  175. }
  176. @include media(mobile) {
  177. display: none;
  178. }
  179. }
  180. #site-navigation #toggle:checked + #toggle-menu {
  181. &::before {
  182. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'%3E%3C/path%3E%3C/svg%3E");
  183. }
  184. }
  185. /**
  186. * Footer
  187. */
  188. // Footer Menus
  189. .footer-menus {
  190. display: flex;
  191. flex-direction: column;
  192. @include media(tablet) {
  193. flex: 1 0 50%;
  194. order: 2;
  195. margin-bottom: 0;
  196. margin-top: 0;
  197. text-align: right;
  198. }
  199. }
  200. // Footer Navigation
  201. .footer-navigation {
  202. @include media(tablet) {
  203. flex: 1 0 100%;
  204. }
  205. .footer-menu {
  206. @include media(tablet) {
  207. margin-right: -#{0.5 * $spacing_unit};
  208. }
  209. .current-menu-item > a {
  210. font-weight: 700;
  211. }
  212. a {
  213. display: block;
  214. padding: 0;
  215. @include media(tablet) {
  216. padding-left: #{0.5 * $spacing_unit};
  217. padding-right: #{0.5 * $spacing_unit};
  218. }
  219. }
  220. }
  221. }
  222. // Social Navigation
  223. .social-navigation {
  224. & > div > ul {
  225. flex-wrap: wrap;
  226. @include media(tablet) {
  227. justify-content: flex-end;
  228. }
  229. }
  230. .footer-navigation + & {
  231. margin-top: #{0.666 * $spacing_vertical};
  232. @include media(mobile) {
  233. margin-top: $spacing_vertical;
  234. }
  235. @include media(tablet) {
  236. margin-bottom: $spacing_unit;
  237. margin-top: 0;
  238. }
  239. }
  240. }
  241. // Site Info
  242. .site-info {
  243. span[role="separator"] {
  244. display: block;
  245. }
  246. .site-name {
  247. font-weight: 400;
  248. }
  249. }
  250. /**
  251. * Content
  252. */
  253. // Entry Header
  254. .entry-header {
  255. .entry-meta {
  256. display: none;
  257. }
  258. }
  259. // Entry Title
  260. .entry-title,
  261. .page-title,
  262. .a8c-posts-list .a8c-posts-list-item__title {
  263. a {
  264. color: inherit;
  265. &:active,
  266. &:focus,
  267. &:hover {
  268. color: $color_primary;
  269. }
  270. }
  271. }
  272. .entry-title,
  273. .page-title {
  274. font-size: $font_size_h1;
  275. }
  276. // Sticky tag
  277. .sticky-post,
  278. .a8c-posts-list .a8c-posts-list-item__featured span {
  279. background: $color_background_light;
  280. border-radius: $border_radius_sm;
  281. color: $color_foreground;
  282. font-family: inherit;
  283. font-family: var( --font-base, inherit );
  284. padding: #{0.5 * $spacing_unit} $spacing_unit;
  285. }
  286. /**
  287. * Pagination
  288. */
  289. .pagination .nav-links > * {
  290. font-family: inherit;
  291. font-family: var( --font-headings, inherit );
  292. font-size: inherit;
  293. font-weight: 400;
  294. }
  295. /**
  296. * Post Navigation
  297. */
  298. .post-navigation {
  299. a {
  300. .post-title {
  301. color: $color_foreground;
  302. }
  303. }
  304. a:active,
  305. a:focus,
  306. a:hover {
  307. text-decoration: none;
  308. .post-title {
  309. color: $color_primary;
  310. text-decoration: underline;
  311. }
  312. }
  313. .meta-nav {
  314. color: $color_foreground;
  315. }
  316. }
  317. /**
  318. * Comment Navigation
  319. */
  320. .comment-navigation {
  321. a {
  322. font-family: inherit;
  323. font-family: var( --font-headings, inherit );
  324. font-size: inherit;
  325. font-weight: 400;
  326. }
  327. }
  328. /**
  329. * Comments
  330. */
  331. .comment-meta {
  332. .comment-author {
  333. .fn {
  334. font-family: inherit;
  335. font-family: var( --font-headings, inherit );
  336. a {
  337. color: inherit;
  338. &:active,
  339. &:focus,
  340. &:hover {
  341. color: $color_primary;
  342. }
  343. }
  344. }
  345. .avatar {
  346. border-radius: 50%;
  347. }
  348. }
  349. .comment-metadata {
  350. font-size: $font_size_sm;
  351. line-height: inherit;
  352. }
  353. }
  354. .reply {
  355. font-size: inherit;
  356. line-height: inherit;
  357. }
  358. .pingback,
  359. .trackback {
  360. .url {
  361. font-family: inherit;
  362. font-family: var( --font-headings, inherit );
  363. }
  364. }
  365. /**
  366. * Blocks
  367. */
  368. // Category
  369. .wp-block-categories {
  370. .children {
  371. list-style: disc;
  372. & > li {
  373. border: 0;
  374. margin-bottom: 0;
  375. margin-top: 0;
  376. }
  377. }
  378. }
  379. // Latest Comments
  380. .wp-block-latest-comments .wp-block-latest-comments__comment-meta {
  381. font-family: inherit;
  382. font-family: var( --font-headings, inherit );
  383. }
  384. // Pullquote
  385. .wp-block-pullquote {
  386. blockquote {
  387. padding: 0;
  388. }
  389. }
  390. // Table block
  391. table,
  392. .wp-block-table {
  393. td,
  394. th {
  395. border-color: $color_border;
  396. }
  397. }
  398. // Posts List
  399. .a8c-posts-list {
  400. text-align: center;
  401. }
  402. .a8c-posts-list-item__excerpt {
  403. text-align: left;
  404. }
  405. // Font Sizes
  406. .is-larger-text,
  407. .has-larger-font-size,
  408. .has-huge-font-size {
  409. line-height: #{(strip-unit($baseline-unit) * 6) / (strip-unit($font_size_xl * $typescale-root))};
  410. }
  411. .is-large-text,
  412. .has-large-font-size {
  413. line-height: #{(strip-unit($baseline-unit) * 5) / (strip-unit($font_size_lg * $typescale-root))};
  414. }
  415. // Cookie
  416. body {
  417. .widget_eu_cookie_law_widget {
  418. background: transparent;
  419. bottom: 0;
  420. left: 0;
  421. padding: 0;
  422. right: 0;
  423. &.widget.top {
  424. bottom: auto;
  425. top: 0;
  426. }
  427. #eu-cookie-law {
  428. background: rgba($color_background, 0.9);
  429. border: none;
  430. color: $color_foreground;
  431. font-size: $font_size_sm;
  432. line-height: inherit;
  433. padding: $spacing_unit;
  434. @media (max-width: 600px) {
  435. padding-bottom: #{4 * $spacing_horizontal + $spacing_unit};
  436. }
  437. &.negative {
  438. background: rgba($color_foreground, 0.9);
  439. color: $color_background;
  440. input.accept {
  441. background: $color_background;
  442. color: $color_foreground;
  443. &:active,
  444. &:focus,
  445. &:hover {
  446. background: $color_background_light;
  447. }
  448. }
  449. }
  450. input.accept {
  451. margin: 0;
  452. margin-left: #{2 * $spacing_horizontal};
  453. @extend %button-style;
  454. @media (max-width: 600px) {
  455. bottom: $spacing_unit;
  456. left: $spacing_unit;
  457. margin: 0;
  458. }
  459. }
  460. }
  461. }
  462. &.admin-bar .widget_eu_cookie_law_widget {
  463. &.widget.top {
  464. top: 32px;
  465. @media (max-width: 782px) {
  466. top: 46px;
  467. }
  468. }
  469. }
  470. }