_extra-child-theme.scss 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. // @import "";
  5. $spacing_unit: map-deep-get($config-global, "spacing", "unit");
  6. $spacing_horizontal: map-deep-get($config-global, "spacing", "horizontal");
  7. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  8. $header-css-grid-width: calc( 0.5 * (100vw - #{$content-width-lg} - #{8 * $spacing_unit}) );
  9. $primary_color: map-deep-get($config-global, "color", "primary", "default");
  10. a {
  11. text-decoration: none;
  12. }
  13. /**
  14. * Wide Header & Footer
  15. */
  16. #masthead {
  17. margin-left: auto;
  18. margin-right: auto;
  19. padding-bottom: 0;
  20. position: relative;
  21. width: $content-width-flex;
  22. @include media(mobile) {
  23. width: $content-width-sm;
  24. }
  25. @include media(tablet) {
  26. width: $content-width-md;
  27. }
  28. @include media(laptop) {
  29. width: $content-width-lg;
  30. }
  31. @include media(desktop) {
  32. width: calc(#{$content-width-flex} - #{2 * $spacing_vertical});
  33. }
  34. }
  35. /**
  36. * CSS-grid Desktop Menu
  37. */
  38. @include media(mobile) {
  39. .site-header {
  40. align-items: center;
  41. display: grid;
  42. grid-template-columns: 66% auto;
  43. grid-template-rows: auto;
  44. grid-auto-flow: row;
  45. grid-column-gap: $spacing_unit;
  46. grid-template-areas:
  47. "site-branding site-branding"
  48. "site-description site-description"
  49. "main-navigation social-navigation";
  50. &:before,
  51. &:after {
  52. content: none;
  53. display: none;
  54. }
  55. & > * {
  56. margin-top: 0;
  57. margin-bottom: 0;
  58. }
  59. .site-branding {
  60. align-self: baseline;
  61. grid-area: site-branding;
  62. flex: 0 1 25%;
  63. }
  64. .site-logo {
  65. margin-bottom: $spacing_unit;
  66. }
  67. .site-title {
  68. & + .site-description {
  69. margin-top: 0;
  70. }
  71. }
  72. .site-description {
  73. align-self: baseline;
  74. grid-area: site-description;
  75. }
  76. .main-navigation {
  77. align-self: flex-start;
  78. margin-bottom: (2 * $spacing_unit);
  79. grid-area: main-navigation;
  80. justify-self: flex-start;
  81. & > div > ul {
  82. justify-content: flex-start;
  83. margin-left: -#{0.5 * $spacing_horizontal};
  84. margin-right: -#{0.5 * $spacing_horizontal};
  85. & > li {
  86. & > a {
  87. padding: #{0.5 * map-deep-get($config-header, "main-nav", "link-padding")};
  88. }
  89. }
  90. & > .menu-item-has-children > a::after {
  91. font-size: #{0.5 * map-deep-get($config-global, "font", "size", "base")};
  92. }
  93. }
  94. & > div > ul > li:hover,
  95. & > div > ul > li.focus,
  96. & > div > ul > li.current-menu-item {
  97. & > ul {
  98. box-shadow: none;
  99. overflow: hidden;
  100. &:before {
  101. border-bottom: #{0.5 * $spacing_unit} solid #{map-deep-get($config-global, "color", "primary", "default")};
  102. border-left: #{0.5 * $spacing_unit} solid transparent;
  103. border-right: #{0.5 * $spacing_unit} solid transparent;
  104. content: "";
  105. display: block;
  106. margin-left: #{$spacing_unit};
  107. width: #{$spacing_unit};
  108. }
  109. }
  110. & li {
  111. & > a {
  112. background: #{map-deep-get($config-global, "color", "primary", "default")};
  113. color: #{map-deep-get($config-global, "color", "background", "default")};
  114. }
  115. &:hover > a,
  116. &.focus > a,
  117. &.current-menu-item > a {
  118. background: #{map-deep-get($config-global, "color", "primary", "hover")};
  119. }
  120. }
  121. }
  122. }
  123. .social-navigation {
  124. line-height: 1;
  125. align-self: flex-start;
  126. grid-area: social-navigation;
  127. justify-self: flex-end;
  128. }
  129. }
  130. }
  131. @include media(mobile) {
  132. .site-header {
  133. .site-title {
  134. margin-top: 0;
  135. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  136. }
  137. .site-description {
  138. margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
  139. }
  140. &[class*="navigation"] {
  141. margin-bottom: 0;
  142. }
  143. }
  144. }
  145. @include media(desktop) {
  146. .site-header {
  147. grid-template-columns: $header-css-grid-width auto $header-css-grid-width;
  148. grid-template-rows: auto;
  149. grid-auto-flow: row;
  150. grid-column-gap: #{2 * $spacing_unit};
  151. grid-template-areas:
  152. ". main-navigation social-navigation"
  153. "site-branding site-description social-navigation";
  154. }
  155. }
  156. // Social Menu
  157. .social-navigation {
  158. & > div > ul {
  159. flex-wrap: wrap;
  160. }
  161. }
  162. /**
  163. * Site Title
  164. */
  165. .site-title {
  166. font-weight: bold;
  167. word-wrap: break-word;
  168. }
  169. .site-description {
  170. color: #{map-deep-get($config-header, "branding", "color", "text")};
  171. line-height: #{map-deep-get($config-global, "font", "line-height", "heading")};
  172. @include font-family( map-deep-get($config-header, "branding", "description", "font", "family") );
  173. }
  174. .site-title + .site-description {
  175. margin-top: -#{map-deep-get($config-global, "spacing", "unit")};
  176. }
  177. /**
  178. * Content
  179. */
  180. .site-main > article > .entry-header {
  181. margin: #{3 * $spacing_unit} 0 $spacing_unit;
  182. position: relative;
  183. }
  184. @include media(mobile) {
  185. .site-main > article > .entry-header {
  186. margin: #{3 * $spacing_vertical} auto #{2 * $spacing_unit};
  187. }
  188. }
  189. .site-main .page-header {
  190. margin-top: #{3 * $spacing_unit};
  191. }
  192. @include media(mobile) {
  193. .site-main .page-header {
  194. margin-top: #{3 * $spacing_vertical};
  195. }
  196. }
  197. .a8c-posts-list-item__featured span,
  198. .sticky-post {
  199. color: $primary_color;
  200. border: 1px solid currentColor;
  201. background: transparent;
  202. padding-bottom: 3px;
  203. text-transform: uppercase;
  204. }
  205. .entry-title {
  206. font-size: map-deep-get($config-global, "font", "size", "xxxxl");
  207. font-weight: 600;
  208. }
  209. /**
  210. * Blocks
  211. */
  212. .entry .entry-content .wp-block-media-text {
  213. background: #{map-deep-get($config-global, "color", "secondary", "default")};
  214. color: #{map-deep-get($config-global, "color", "background", "default")};
  215. &.is-style-inset-borders:before {
  216. border-color: #{map-deep-get($config-global, "color", "background", "default")};
  217. }
  218. }
  219. .entry-content [class*="__inner-container"] a {
  220. text-decoration: underline;
  221. &:hover {
  222. text-decoration: none;
  223. }
  224. }
  225. /**
  226. * Footer
  227. */
  228. #colophon {
  229. }
  230. .footer-navigation .footer-menu a {
  231. font-size: map-deep-get($config-global, "font", "size", "xs");
  232. }