_extra-child-theme.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. // @import "";
  5. a {
  6. text-decoration: none;
  7. .wp-block-cover &,
  8. .wp-block-cover-image &,
  9. .wp-block-media-text &,
  10. p:not(.site-title) & {
  11. text-decoration: underline;
  12. &.wp-block-button__link,
  13. &:hover {
  14. text-decoration: none;
  15. }
  16. }
  17. }
  18. /**
  19. * Wide Header & Footer
  20. */
  21. body:not(.fse-enabled) {
  22. #masthead,
  23. #colophon {
  24. padding-left: 16px;
  25. padding-right: 16px;
  26. position: relative;
  27. @extend %responsive-alignwide;
  28. @include media(mobile) {
  29. padding-left: 0;
  30. padding-right: 0;
  31. }
  32. }
  33. }
  34. #masthead {
  35. padding-bottom: 0;
  36. }
  37. #colophon {
  38. margin-left: auto;
  39. margin-right: auto;
  40. }
  41. /**
  42. * Mobile-Menu
  43. */
  44. .site-header {
  45. margin-left: 0;
  46. margin-right: 0;
  47. }
  48. /**
  49. * CSS-grid Desktop Menu
  50. */
  51. @include media(mobile) {
  52. .site-header {
  53. align-items: center;
  54. display: grid;
  55. margin-left: auto;
  56. margin-right: auto;
  57. grid-template-columns: auto;
  58. grid-template-rows: auto;
  59. grid-column-gap: #{map-deep-get($config-global, "spacing", "unit")};
  60. grid-template-areas:
  61. "site-logo site-logo"
  62. "site-title main-navigation"
  63. "site-description social-navigation";
  64. &:before,
  65. &:after {
  66. content: none;
  67. display: none;
  68. }
  69. & > * {
  70. margin-top: 0;
  71. margin-bottom: 0;
  72. }
  73. &.has-logo:not(.has-title-and-tagline) {
  74. grid-template-areas:
  75. "site-logo main-navigation"
  76. "site-logo social-navigation";
  77. }
  78. .site-logo {
  79. grid-area: site-logo;
  80. margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
  81. }
  82. .site-title {
  83. align-self: flex-end;
  84. grid-area: site-title;
  85. & + .site-description {
  86. margin-top: 0;
  87. }
  88. }
  89. .site-description {
  90. align-self: center;
  91. grid-area: site-description;
  92. }
  93. .main-navigation {
  94. align-self: center;
  95. grid-area: main-navigation;
  96. justify-self: flex-end;
  97. & > div > ul {
  98. justify-content: flex-end;
  99. margin-left: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  100. margin-right: -#{0.5 * map-deep-get($config-global, "spacing", "horizontal")};
  101. & > li {
  102. padding: #{map-deep-get($config-header, "main-nav", "link-padding")};
  103. & > a {
  104. padding: 0;
  105. }
  106. }
  107. & > .menu-item-has-children > a::after {
  108. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  109. }
  110. }
  111. & > div > ul > li:hover,
  112. & > div > ul > li:focus-within,
  113. & > div > ul > li.current-menu-item {
  114. & > a {
  115. color: #{map-deep-get($config-global, "color", "primary", "default")};
  116. }
  117. & > ul {
  118. box-shadow: none;
  119. overflow: hidden;
  120. &:before {
  121. border-bottom: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid #{map-deep-get($config-global, "color", "primary", "default")};
  122. border-left: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  123. border-right: #{0.5 * map-deep-get($config-global, "spacing", "unit")} solid transparent;
  124. content: "";
  125. display: block;
  126. margin-left: #{map-deep-get($config-global, "spacing", "unit")};
  127. width: #{map-deep-get($config-global, "spacing", "unit")};
  128. }
  129. }
  130. & li {
  131. & > a {
  132. background: #{map-deep-get($config-global, "color", "primary", "default")};
  133. color: #{map-deep-get($config-global, "color", "background", "default")};
  134. }
  135. &:hover > a,
  136. &.focus > a,
  137. &.current-menu-item > a {
  138. background: #{map-deep-get($config-global, "color", "primary", "hover")};
  139. }
  140. }
  141. }
  142. }
  143. .social-navigation {
  144. align-self: center;
  145. grid-area: social-navigation;
  146. justify-self: flex-end;
  147. }
  148. }
  149. }
  150. // Main Menu
  151. @include media(mobile-only) {
  152. .main-navigation > div > ul > li > a {
  153. line-height: inherit;
  154. }
  155. }
  156. // Social Menu
  157. .social-navigation {
  158. & > div > ul {
  159. flex-wrap: wrap;
  160. }
  161. }
  162. /**
  163. * Site Title
  164. */
  165. .site-description {
  166. color: #{map-deep-get($config-header, "branding", "color", "text")};
  167. }
  168. .site-title + .site-description {
  169. margin-top: -#{map-deep-get($config-global, "spacing", "unit")};
  170. }
  171. /**
  172. * Footer Menu
  173. */
  174. .footer-navigation .footer-menu > li:first-of-type {
  175. margin-left: 0;
  176. }
  177. .footer-navigation .footer-menu > li:last-of-type {
  178. margin-right: 0;
  179. }
  180. /**
  181. * Blocks
  182. */
  183. // Cover & Hero block
  184. .wp-block-cover .wp-block-cover__inner-container,
  185. .wp-block-coblocks-hero .wp-block-coblocks-hero__box {
  186. & > * {
  187. margin-top: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  188. margin-bottom: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
  189. @include media(mobile) {
  190. margin-top: map-deep-get($config-global, "spacing", "vertical");
  191. margin-bottom: map-deep-get($config-global, "spacing", "vertical");
  192. }
  193. &:first-child {
  194. margin-top: 0;
  195. }
  196. &:last-child {
  197. margin-bottom: 0;
  198. }
  199. }
  200. }
  201. // Table block
  202. table,
  203. .wp-block-table {
  204. td,
  205. th {
  206. border-color: #{map-deep-get($config-global, "color", "border", "default")};
  207. }
  208. }
  209. .wp-block-newspack-blocks-homepage-articles {
  210. article {
  211. .cat-links a,
  212. .entry-title a:hover,
  213. .entry-meta a {
  214. text-decoration: none;
  215. }
  216. }
  217. &.image-alignbehind article {
  218. .cat-links a:hover,
  219. .entry-title a:hover,
  220. .entry-meta a:hover {
  221. text-decoration: underline;
  222. }
  223. }
  224. }
  225. .has-background:not(.has-background-background-color),
  226. [class*="background-color"]:not(.has-background-background-color),
  227. [style*="background-color"] {
  228. .wp-block-newspack-blocks-homepage-articles article {
  229. .cat-links a:hover,
  230. .entry-title a:hover,
  231. .entry-meta a:hover {
  232. text-decoration: underline;
  233. }
  234. }
  235. }
  236. /**
  237. * Hentry
  238. */
  239. // Entry Title
  240. .singular .hentry .entry-header .entry-title,
  241. .page-title {
  242. text-align: center;
  243. &:before,
  244. &:after {
  245. background: map-deep-get($config-global, "color", "border", "light");;
  246. height: 1px;
  247. content: "";
  248. display: block;
  249. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  250. @include media(mobile) {
  251. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  252. }
  253. @extend %responsive-alignfull;
  254. }
  255. &:after {
  256. margin-top: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  257. @include media(mobile) {
  258. margin-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  259. }
  260. }
  261. }
  262. // Entry Meta
  263. .entry-header {
  264. .entry-meta {
  265. display: none;
  266. }
  267. }
  268. // Entry Title Link
  269. article .entry-header .entry-title,
  270. .page-title,
  271. .a8c-posts-list .a8c-posts-list-item__title,
  272. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  273. a {
  274. color: inherit;
  275. text-decoration: none;
  276. &:active,
  277. &:focus,
  278. &:hover {
  279. color: #{map-deep-get($config-global, "color", "primary", "default")};
  280. }
  281. }
  282. }
  283. // Remove margin if alignfull is first element
  284. .home.hide-homepage-title {
  285. .hentry .entry-content {
  286. & > *:first-child {
  287. &.alignfull {
  288. margin-top: 0;
  289. @include media(mobile) {
  290. margin-top: 0;
  291. }
  292. }
  293. }
  294. }
  295. }
  296. /**
  297. * Comments
  298. */
  299. .comment {
  300. .avatar {
  301. border-radius: 50%;
  302. }
  303. }
  304. .comment-respond {
  305. .form-submit {
  306. display: flex;
  307. justify-content: flex-end;
  308. }
  309. }
  310. /**
  311. * Widgets
  312. */
  313. .widget-area {
  314. max-width: 100%;
  315. width: 100%;
  316. & > *:last-child {
  317. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  318. }
  319. .widget-title,
  320. .widgettitle {
  321. font-size: #{map-deep-get($config-global, "font", "size", "md")};
  322. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  323. &:empty {
  324. display: none;
  325. }
  326. }
  327. @include media(laptop) {
  328. display: flex;
  329. flex-wrap: wrap;
  330. justify-content: space-between;
  331. .widget {
  332. width: calc(50% - #{map-deep-get($config-global, "spacing", "horizontal")})
  333. }
  334. & > *:nth-child(2) {
  335. margin-top: 0;
  336. }
  337. }
  338. @include media(desktop) {
  339. .widget {
  340. width: calc(33.3333% - #{1.333 * map-deep-get($config-global, "spacing", "horizontal")})
  341. }
  342. & > *:nth-child(3) {
  343. margin-top: 0;
  344. }
  345. }
  346. }
  347. .widget_calendar,
  348. .widget_calendar {
  349. caption {
  350. font-weight: bold;
  351. }
  352. td,
  353. th {
  354. text-align: center;
  355. }
  356. }
  357. .widget_archive,
  358. .widget_categories,
  359. .widget_links,
  360. .widget_meta,
  361. .widget_nav_menu,
  362. .widget_pages,
  363. .widget_recent_comments,
  364. .widget_recent_entries,
  365. .widget_rss,
  366. .widget_rss_links,
  367. .widget_top-posts,
  368. .widget_authors,
  369. .widget_jp_blogs_i_follow,
  370. .widget_top-click,
  371. .widget_upcoming_events_widget {
  372. ul {
  373. border-bottom: 1px solid map-deep-get($config-global, "color", "border", "default");
  374. list-style: none;
  375. padding-left: 0;
  376. }
  377. li {
  378. border-top: 1px solid map-deep-get($config-global, "color", "border", "default");
  379. padding: #{0.25 * map-deep-get($config-global, "spacing", "vertical")} 0;
  380. }
  381. }
  382. .widget_categories .children,
  383. .widget_nav_menu .sub-menu,
  384. .widget_pages .children {
  385. border-bottom: 0;
  386. margin-bottom: #{-0.25 * map-deep-get($config-global, "spacing", "vertical")};
  387. margin-top: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  388. padding-left: map-deep-get($config-global, "spacing", "horizontal");
  389. }
  390. .widget_recent_entries .post-date {
  391. display: block;
  392. }
  393. .widget_rss {
  394. cite,
  395. .rssSummary,
  396. .rss-date {
  397. display: block;
  398. }
  399. }
  400. .widget_search {
  401. input[type="search"] {
  402. display: block;
  403. margin-bottom: #{0.25 * map-deep-get($config-global, "spacing", "vertical")};
  404. width: 100%;
  405. }
  406. }
  407. // Updates the Mobile Navigation to be next to the site title.
  408. @import "../../varia/sass/components/header/_site-mobile-nav-side";