_extra-child-theme.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. /**
  2. * Extra Child Theme Styles
  3. *
  4. * 1. General Helper Styles
  5. * 2. Header
  6. * 3. Main Wrapper and Content
  7. * 4. Navigation Menu
  8. * 5. Archive Pagination and Post Navigation
  9. * 6. Block Specific Styles
  10. * 6.1. Column Block
  11. * 6.2. Quote Block
  12. * 6.3. Hero Block and Cover Block
  13. * 6.4. File Block
  14. * 6.5. Latest Comments Block
  15. * 6.6. Button Block
  16. * 6.7. Posts List Block
  17. * 6.8. Search Block
  18. * 7. Widgets
  19. */
  20. $color_background: #{map-deep-get($config-global, "color", "background", "default")};
  21. $color_background_light: #{map-deep-get($config-global, "color", "background", "light")};
  22. $color_foreground: #{map-deep-get($config-global, "color", "foreground", "default")};
  23. $color_primary: #{map-deep-get($config-global, "color", "primary", "default")};
  24. $color_secondary: #{map-deep-get($config-global, "color", "secondary", "default")};
  25. $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "hover")};
  26. $spacing_horizontal: #{map-deep-get($config-global, "spacing", "horizontal")};
  27. $spacing_vertical: #{map-deep-get($config-global, "spacing", "vertical")};
  28. $font_size_xs: #{map-deep-get($config-global, "font", "size", "xs")};
  29. $font_size_md: #{map-deep-get($config-global, "font", "size", "md")};
  30. $font_size_base: #{map-deep-get($config-global, "font", "size", "base")};
  31. $font_size_lg: #{map-deep-get($config-global, "font", "size", "lg")};
  32. $font_size_xl: #{map-deep-get($config-global, "font", "size", "xl")};
  33. $font_family_code: #{map-deep-get($config-global, "font", "family", "code")};
  34. $font_line_height_body: #{map-deep-get($config-global, "font", "line-height", "body")};
  35. $button_line_height: #{map-deep-get($config-button, "font", "line-height")};
  36. $button_font_weight: #{map-deep-get($config-button, "font", "weight")};
  37. $button_font_size: #{map-deep-get($config-button, "font", "size")};
  38. $button_spacing_vertical: #{map-deep-get($config-button, "padding", "vertical")};
  39. $button_spacing_horizontal: #{map-deep-get($config-button, "padding", "horizontal")};
  40. $button_color_hover: #{map-deep-get($config-button, "color", "text-hover")};
  41. $button_background_hover: #{map-deep-get($config-button, "color", "background-hover")};
  42. $font_size_widget_title: #{map-deep-get($config-heading, "font", "size", "h4")};
  43. /**
  44. * 1. General Styles
  45. */
  46. h1,
  47. h2,
  48. h3,
  49. h4,
  50. h5,
  51. h6 {
  52. color: $color_primary;
  53. }
  54. a {
  55. text-decoration: none;
  56. .wp-block-group &,
  57. .wp-block-cover &,
  58. .wp-block-cover-image &,
  59. .wp-block-media-text &,
  60. p:not(.site-title) & {
  61. text-decoration: underline;
  62. &.wp-block-button__link,
  63. &:hover {
  64. text-decoration: none;
  65. }
  66. }
  67. }
  68. .has-background {
  69. a {
  70. color: currentColor;
  71. }
  72. }
  73. /**
  74. * 2. Header
  75. */
  76. #masthead {
  77. border-bottom: 1px solid $color_background_light;
  78. background: $color_background;
  79. -webkit-transition: all .25s ease-in-out;
  80. -moz-transition: all .25s ease-in-out;
  81. transition: all .25s ease-in-out;
  82. width: 100%;
  83. .site-header-wrapper {
  84. display: flex;
  85. flex-wrap: wrap;
  86. position: relative;
  87. z-index: 1;
  88. -webkit-align-items: center;
  89. -ms-flex-align: center;
  90. align-items: center;
  91. .site-branding {
  92. -webkit-transition: margin-top .25s ease-in-out;
  93. -moz-transition: margin-top .25s ease-in-out;
  94. transition: margin-top .25s ease-in-out;
  95. margin-right: auto;
  96. .site-description {
  97. display: none;
  98. }
  99. .site-title {
  100. a {
  101. text-decoration: none;
  102. }
  103. }
  104. .site-logo {
  105. margin-bottom: $spacing_horizontal;
  106. }
  107. }
  108. .site-menu {
  109. display: block;
  110. -webkit-flex: 0 1 auto;
  111. -ms-flex: 0 1 auto;
  112. flex: 0 1 auto;
  113. @include media(mobile-only) {
  114. width: 100%;
  115. }
  116. }
  117. .main-navigation {
  118. > ul {
  119. > li {
  120. &.current-menu-item {
  121. a {
  122. border-color: $color_secondary;
  123. border-style: solid;
  124. border-width: 0 0 .125em;
  125. color: $color_primary_hover;
  126. }
  127. }
  128. }
  129. }
  130. ul {
  131. li {
  132. &.current-menu-item {
  133. > a {
  134. border-color: $color_secondary;
  135. border-style: solid;
  136. border-width: 0 0 .125em;
  137. color: $color_primary_hover;
  138. }
  139. }
  140. a {
  141. &::after {
  142. color: $color_primary_hover;
  143. }
  144. }
  145. ul {
  146. color: $color_background_light;
  147. li {
  148. border-bottom: 1px solid;
  149. margin: 0;
  150. &:first-child {
  151. border-top: 1px solid;
  152. }
  153. &.current-menu-item {
  154. a {
  155. border: none;
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. @include media(mobile) {
  164. .main-navigation {
  165. > ul {
  166. > li {
  167. &:first-child {
  168. margin-left: 0;
  169. }
  170. }
  171. }
  172. ul {
  173. li {
  174. margin: 0 .75em;
  175. &:first-child {
  176. margin-left: 0;
  177. }
  178. &:hover {
  179. ul {
  180. left: auto;
  181. right: 0;
  182. }
  183. }
  184. a {
  185. padding: .25em 0;
  186. }
  187. ul {
  188. li {
  189. a {
  190. padding: .75em;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. @include media(mobile) {
  201. .site-header {
  202. padding-right: $spacing_vertical;
  203. padding-left: $spacing_vertical;
  204. position: fixed;
  205. z-index: 9999;
  206. }
  207. }
  208. @include media(mobile-only) {
  209. .site-title,
  210. .site-description {
  211. font-size: $font_size_xl;
  212. hyphens: auto;
  213. }
  214. }
  215. /**
  216. * 4. Navigation
  217. */
  218. /**
  219. * 4.1 Main Navigation
  220. */
  221. @include media(mobile-only) {
  222. #toggle-menu {
  223. position: absolute;
  224. top: 0;
  225. right: 0;
  226. }
  227. }
  228. /**
  229. * 4.2 Social Navigation
  230. */
  231. .social-links-menu {
  232. display: flex;
  233. flex-wrap: wrap;
  234. justify-content: flex-end;
  235. }
  236. @include media(mobile-only) {
  237. .social-links-menu {
  238. justify-content: center;
  239. }
  240. }
  241. /**
  242. * 5. Archive Pagination and Post Navigation
  243. */
  244. /**
  245. * 6. Block Specific Styles
  246. */
  247. /**
  248. * 6.1. Column Block
  249. */
  250. /**
  251. * 6.2. Quote Block
  252. */
  253. .wp-block-quote,
  254. .wp-block-quote[style*="text-align:center"],
  255. .wp-block-quote[style*="text-align:right"] {
  256. border: 1px solid $color_background_light;
  257. padding: $spacing_horizontal;
  258. &.is-style-large {
  259. p {
  260. line-height: $font_line_height_body;
  261. }
  262. }
  263. p {
  264. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  265. font-size: $font_size_md;
  266. line-height: $font_line_height_body;
  267. }
  268. cite {
  269. color: inherit;
  270. font-size: $font_size_md;
  271. }
  272. }
  273. /**
  274. * 6.3. Hero Block and Cover Block
  275. */
  276. /**
  277. * 6.4. File Block
  278. */
  279. .wp-block-file {
  280. a {
  281. &.wp-block-file__button {
  282. line-height: $button_line_height;
  283. cursor: pointer;
  284. font-weight: $button_font_weight;
  285. @include font-family( map-deep-get($config-button, "font", "family") );
  286. // font-size: $button_font_size;
  287. padding: $button_spacing_vertical $button_spacing_horizontal;
  288. display: inline-block;
  289. &:focus,
  290. &:hover {
  291. color: $button_color_hover;
  292. background-color: $button_background_hover;
  293. opacity: 1;
  294. }
  295. }
  296. }
  297. }
  298. /**
  299. * 6.5. Latest Comments Block
  300. */
  301. .wp-block-latest-comments {
  302. .wp-block-latest-comments__comment-meta {
  303. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  304. }
  305. }
  306. /**
  307. * 6.6. Button Block
  308. * 6.7. Posts List Block
  309. * 6.8. Search Block
  310. */
  311. .wp-block-button, .a8c-posts-list {
  312. &.minimal {
  313. a {
  314. background: 0 0;
  315. border: 2px solid;
  316. }
  317. }
  318. }
  319. button,
  320. .button,
  321. input[type="submit"],
  322. .wp-block-button__link,
  323. .wp-block-file__button,
  324. .a8c-posts-list__view-all {
  325. border: 0;
  326. border-radius: 5em;
  327. text-transform: uppercase;
  328. &.has-background {
  329. &:focus,
  330. &:hover,
  331. &:visited {
  332. opacity: .8;
  333. }
  334. }
  335. }
  336. .wp-block-coblocks-hero__box,
  337. .wp-block-cover__inner-container,
  338. .wp-block-columns,
  339. .wp-block-group {
  340. .wp-block-latest-posts {
  341. border-bottom: 1px solid $color_background_light;
  342. > li {
  343. border-top: 1px solid $color_background_light;
  344. margin: 0;
  345. padding-top: $spacing_horizontal;
  346. padding-bottom: $spacing_horizontal;
  347. > a {
  348. font-size: $font_size_base;
  349. font-weight: normal;
  350. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  351. line-height: $font_line_height_body;
  352. }
  353. > time {
  354. &.wp-block-latest-posts__post-date {
  355. font-size: $font_size_base;
  356. }
  357. }
  358. }
  359. }
  360. }
  361. /**
  362. * 7. Widgets
  363. */
  364. .site-footer {
  365. .widget-area {
  366. .widget-title {
  367. font-size: $font_size_widget_title;
  368. margin-bottom: .857em;
  369. }
  370. }
  371. }
  372. /**
  373. * 6.9. Code, Pre Blocks
  374. */
  375. .wp-block-code {
  376. code {
  377. font-family: $font_family_code;
  378. font-size: $font_size_base;
  379. }
  380. }
  381. .wp-block-preformatted,
  382. .wp-block-verse {
  383. font-family: $font_family_code;
  384. font-size: $font_size_base;
  385. }