_extra-child-theme.scss 8.4 KB

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