_extra-child-theme.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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. .hide-homepage-header & {
  184. margin: $spacing_unit 0 $spacing_unit;
  185. }
  186. }
  187. @include media(mobile) {
  188. .site-main > article > .entry-header {
  189. margin: #{3 * $spacing_vertical} auto #{2 * $spacing_unit};
  190. .hide-homepage-header & {
  191. margin: #{2 * $spacing_unit} auto #{2 * $spacing_unit};
  192. }
  193. }
  194. }
  195. .site-main .page-header {
  196. margin-top: #{3 * $spacing_unit};
  197. }
  198. @include media(mobile) {
  199. .site-main .page-header {
  200. margin-top: #{3 * $spacing_vertical};
  201. }
  202. }
  203. .a8c-posts-list-item__featured span,
  204. .sticky-post {
  205. color: $primary_color;
  206. border: 1px solid currentColor;
  207. background: transparent;
  208. padding-bottom: 3px;
  209. text-transform: uppercase;
  210. }
  211. .entry-title {
  212. font-size: map-deep-get($config-global, "font", "size", "xxxxl");
  213. font-weight: 600;
  214. }
  215. /**
  216. * Blocks
  217. */
  218. .entry .entry-content .wp-block-media-text {
  219. background: #{map-deep-get($config-global, "color", "secondary", "default")};
  220. color: #{map-deep-get($config-global, "color", "background", "default")};
  221. &.is-style-inset-borders:before {
  222. border-color: #{map-deep-get($config-global, "color", "background", "default")};
  223. }
  224. }
  225. .entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
  226. text-decoration: underline;
  227. &:hover {
  228. text-decoration: none;
  229. }
  230. }
  231. .wp-block-newspack-blocks-homepage-articles {
  232. article {
  233. .cat-links a,
  234. .entry-title a:hover,
  235. .entry-meta a {
  236. text-decoration: none;
  237. }
  238. }
  239. &.image-alignbehind article {
  240. .cat-links a:hover,
  241. .entry-title a:hover,
  242. .more-link:hover,
  243. .entry-meta a:hover {
  244. text-decoration: underline;
  245. }
  246. }
  247. }
  248. .has-background:not(.has-background-background-color),
  249. [class*="background-color"]:not(.has-background-background-color),
  250. [style*="background-color"] {
  251. .wp-block-newspack-blocks-homepage-articles article {
  252. .entry-title a,
  253. .more-link {
  254. text-decoration: none;
  255. }
  256. .cat-links a:hover,
  257. .entry-title a:hover,
  258. .entry-meta a:hover {
  259. text-decoration: underline;
  260. }
  261. }
  262. }
  263. /**
  264. * Footer
  265. */
  266. #colophon {
  267. }
  268. .footer-navigation .footer-menu a {
  269. font-size: map-deep-get($config-global, "font", "size", "xs");
  270. }
  271. // Updates the Mobile Navigation to be next to the site title.
  272. @import "../../varia/sass/components/header/_site-mobile-nav-side";
  273. @include media(mobile-only) {
  274. .mobile-nav-side {
  275. .site-header.has-menu {
  276. .site-branding {
  277. display: contents;
  278. }
  279. }
  280. .main-navigation {
  281. .dropdown-icon {
  282. /* This is fixed the issue when the button changes widths */
  283. font-family: Trebuchet MS, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Tahoma;
  284. }
  285. }
  286. .site-description.site-description {
  287. font-size: map-deep-get($config-global, "font", "size", "root" );
  288. }
  289. }
  290. }