_extra-child-theme.scss 12 KB

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