_extra-child-theme.scss 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. /**
  2. * Extra Child Theme Styles
  3. */
  4. $color_background: map-deep-get($config-global, "color", "background", "default");
  5. $color_primary: map-deep-get($config-global, "color", "primary", "default");
  6. $color_primary_hover: map-deep-get($config-global, "color", "primary", "hover");
  7. $spacing_horizontal: map-deep-get($config-global, "spacing", "horizontal");
  8. $spacing_vertical: map-deep-get($config-global, "spacing", "vertical");
  9. /**
  10. * Elements
  11. */
  12. html {
  13. // Set mobile font-size
  14. font-size: #{map-deep-get($config-global, "font", "size", "root")};
  15. font-weight: 300;
  16. }
  17. body {
  18. font-weight: 300;
  19. }
  20. b, strong {
  21. font-weight: 700;
  22. }
  23. a {
  24. text-decoration-color: $color_primary_hover;
  25. &:hover,
  26. &:focus {
  27. text-decoration: none;
  28. }
  29. .site-header &:hover,
  30. .site-header &:focus {
  31. background: $color_background;
  32. }
  33. }
  34. /**
  35. * Components
  36. */
  37. .site-title,
  38. .site-description {
  39. color: $color_primary;
  40. text-transform: uppercase;
  41. line-height: 1;
  42. max-width: 100%;
  43. a {
  44. color: currentColor;
  45. padding-left: 5px;
  46. padding-right: 5px;
  47. margin-left: -5px;
  48. margin-right: 5px;
  49. }
  50. }
  51. .main-navigation > div > ul > li > a,
  52. .entry-content a {
  53. text-decoration: underline;
  54. text-decoration-color: $color_primary_hover;
  55. &:hover {
  56. text-decoration: none;
  57. }
  58. }
  59. .main-navigation > div > ul > li > a,
  60. .social-navigation > div > ul > li > a,
  61. .footer-navigation .footer-menu > li > a {
  62. padding-left: 0;
  63. padding-right: 0;
  64. }
  65. .main-navigation {
  66. text-transform: uppercase;
  67. }
  68. .sticky-post {
  69. text-transform: uppercase;
  70. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  71. }
  72. #main .page-header {
  73. margin-top: $spacing_vertical;
  74. .page-title {
  75. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  76. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  77. font-weight: 500;
  78. text-transform: uppercase;
  79. line-height: 1;
  80. }
  81. }
  82. .entry-title,
  83. .author-bio .author-title,
  84. .post-navigation .post-title,
  85. .comment-reply-title {
  86. font-size: #{map-deep-get($config-heading, "font", "size", "h2")};
  87. letter-spacing: #{map-deep-get($config-heading, "font", "letter-spacing", "h2")};
  88. line-height: 1;
  89. text-transform: uppercase;
  90. }
  91. .entry-meta,
  92. .entry-footer {
  93. text-transform: uppercase;
  94. font-weight: 500;
  95. letter-spacing: .1em;
  96. & > span {
  97. display: inline;
  98. }
  99. a {
  100. text-decoration-color: currentColor;
  101. }
  102. }
  103. .nav-links .meta-nav {
  104. text-transform: uppercase;
  105. font-weight: 500;
  106. letter-spacing: .1em;
  107. }
  108. .post-navigation .post-title {
  109. font-weight: 300;
  110. }
  111. .footer-navigation,
  112. .footer-navigation .footer-menu a {
  113. font-weight: 500;
  114. text-transform: uppercase;
  115. text-decoration-color: currentColor;
  116. }
  117. .site-info a {
  118. text-decoration-color: currentColor;
  119. }
  120. .imprint {
  121. font-weight: 500;
  122. }
  123. .has-drop-cap:not(:focus):first-letter {
  124. color: $color_primary;
  125. }
  126. /**
  127. * Blocks
  128. */
  129. // Button
  130. button,
  131. .button,
  132. input[type="submit"],
  133. a.wp-block-button__link,
  134. a.wp-block-file__button {
  135. font-weight: 800;
  136. text-transform: uppercase;
  137. text-decoration: none;
  138. }
  139. // Cover
  140. .wp-block-cover,
  141. .wp-block-cover-image {
  142. .wp-block-cover__inner-container,
  143. .wp-block-cover-image-text,
  144. .wp-block-cover-text {
  145. a {
  146. text-decoration-color: currentColor;
  147. &:hover,
  148. &:active, {
  149. background-color: transparent;
  150. }
  151. }
  152. }
  153. }
  154. // Latest Post
  155. .wp-block-latest-posts > li > a {
  156. text-transform: uppercase;
  157. }
  158. .wp-block-newspack-blocks-homepage-articles article .entry-title {
  159. text-transform: none;
  160. }
  161. .wp-block-newspack-blocks-homepage-articles article .entry-title a {
  162. text-decoration-color: $color_primary_hover;
  163. &:hover,
  164. &:focus {
  165. text-decoration: none;
  166. }
  167. }
  168. @include media(mobile-only) {
  169. .site-header {
  170. position: relative;
  171. .site-branding {
  172. padding-right: (3.5 * $spacing_vertical);
  173. }
  174. }
  175. .site-title,
  176. .site-description {
  177. font-size: #{map-deep-get($config-global, "font", "size", "lg")};
  178. hyphens: auto;
  179. }
  180. #toggle-menu {
  181. position: absolute;
  182. top: (0.5 * $spacing_vertical);
  183. right: (0.5 * $spacing_vertical);
  184. }
  185. }
  186. @include media(mobile) {
  187. // Revise header width
  188. .site-header.alignfull {
  189. align-items: flex-end;
  190. display: flex;
  191. flex-wrap: wrap;
  192. justify-content: space-between;
  193. max-width: 100vw;
  194. padding-left: #{2 * $spacing_horizontal};
  195. padding-right: #{2 * $spacing_horizontal};
  196. margin-bottom: 0;
  197. width: 100%;
  198. z-index: 10;
  199. }
  200. .site-branding {
  201. margin-bottom: 0;
  202. flex: 6 1 70%;
  203. }
  204. .main-navigation {
  205. align-self: flex-start;
  206. flex: 1 1 auto;
  207. margin: 0;
  208. }
  209. .social-navigation {
  210. margin: 0;
  211. width: auto;
  212. }
  213. .main-navigation > div > ul {
  214. display: inherit;
  215. }
  216. .main-navigation > div > ul > li > .sub-menu {
  217. left: inherit;
  218. right: 0;
  219. }
  220. .wp-block-columns.alignfull {
  221. padding-left: #{2 * $spacing_horizontal};
  222. padding-right: #{2 * $spacing_horizontal};
  223. }
  224. }
  225. @include media(tablet) {
  226. .site-header.alignfull {
  227. position: fixed;
  228. }
  229. .site-branding {
  230. position: relative;
  231. z-index: 99;
  232. }
  233. .main-navigation,
  234. .social-navigation {
  235. margin-top: 0;
  236. }
  237. .main-navigation {
  238. z-index: 999;
  239. }
  240. .social-navigation {
  241. position: fixed;
  242. left: #{2 * $spacing_horizontal};
  243. bottom: #{2 * $spacing_horizontal};
  244. z-index: 888;
  245. & > div > ul {
  246. flex-direction: column-reverse;
  247. }
  248. }
  249. .main-navigation > div > ul {
  250. display: block;
  251. }
  252. .content-area {
  253. margin-top: #{10 * $spacing_horizontal};
  254. position: relative;
  255. z-index: 2;
  256. .hide-homepage-header & {
  257. margin-top: 0;
  258. }
  259. }
  260. .nav-links {
  261. display: block;
  262. }
  263. .nav-links .nav-next,
  264. .nav-links .nav-previous {
  265. max-width: 100%;
  266. margin-bottom: #{$spacing_vertical};
  267. }
  268. .nav-links .nav-next {
  269. text-align: left;
  270. }
  271. }
  272. @include media(desktop) {
  273. }
  274. /**
  275. * AMP Support
  276. */
  277. html[amp] {
  278. @include media( tablet ) {
  279. .site-header {
  280. position: sticky;
  281. top: 0;
  282. }
  283. .logged-in .site-header {
  284. top: 32px;
  285. }
  286. .content-area {
  287. margin: 0;
  288. }
  289. }
  290. @media screen and ( max-width: 782px ) {
  291. .logged-in .site-header {
  292. top: 46px;
  293. }
  294. }
  295. }
  296. /**
  297. * Search block
  298. */
  299. .wp-block-search {
  300. &.wp-block-search__button-inside {
  301. .wp-block-search__inside-wrapper{
  302. border-radius: 9999px;
  303. }
  304. .wp-block-search__input {
  305. background: transparent;
  306. }
  307. }
  308. .wp-block-search__button{
  309. border-radius: 9999px;
  310. &.has-icon {
  311. min-width: calc(2* #{map-deep-get($config-elements, "form", "padding")} + #{map-deep-get($config-global, "font", "size", "base")} + 4px);
  312. min-height: calc(2* #{map-deep-get($config-elements, "form", "padding")} + #{map-deep-get($config-global, "font", "size", "base")} + 4px);
  313. }
  314. }
  315. .wp-block-search__input {
  316. margin-right: calc( .1 * #{map-deep-get($config-button, "padding", "horizontal")} );
  317. border-radius: 9999px;
  318. }
  319. }