_extra-child-theme.scss 9.8 KB

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