_extra-child-theme.scss 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  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. /**
  21. * 1. General Helper Styles
  22. */
  23. body {
  24. font-weight: 300;
  25. }
  26. b,
  27. strong {
  28. font-weight: 700;
  29. }
  30. .home.page.hide-homepage-title {
  31. .site-main {
  32. padding: 0;
  33. article {
  34. .entry-content {
  35. margin-top: 0;
  36. }
  37. }
  38. }
  39. }
  40. a {
  41. text-decoration: none;
  42. }
  43. .entry-content a:link,
  44. .entry-content a:active {
  45. text-decoration: underline;
  46. }
  47. .entry-content a:hover,
  48. .entry-content a:active {
  49. text-decoration: none;
  50. }
  51. .main-navigation {
  52. text-transform: uppercase;
  53. }
  54. .main-navigation > div > ul,
  55. .social-navigation > div > ul,
  56. .pagination .nav-links {
  57. justify-content: center;
  58. }
  59. /**
  60. * 2. Header
  61. */
  62. #masthead {
  63. background-color: #{map-deep-get($config-global, "color", "background", "default")};
  64. padding: 0;
  65. .site-branding {
  66. text-align: center;
  67. background: #{map-deep-get($config-global, "color", "background", "default")};
  68. background-position: center;
  69. background-repeat: no-repeat;
  70. background-size: cover;
  71. text-align: center;
  72. height: 100%;
  73. min-height: 72px;
  74. padding: 3em 0 36px;
  75. }
  76. margin: 0 auto;
  77. .social-navigation {
  78. margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
  79. ul {
  80. li {
  81. a {
  82. color: #{map-deep-get($config-global, "color", "secondary", "default")};
  83. &:hover {
  84. color: #{map-deep-get($config-global, "color", "secondary", "hover")};
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. body:not(.fse-enabled) {
  92. .site-title {
  93. font-size: #{map-deep-get($config-global, "font", "size", "xxl")};
  94. }
  95. .site-description {
  96. color: #{map-deep-get($config-global, "color", "foreground", "default")};
  97. }
  98. }
  99. /**
  100. * 3. Main Wrapper and Content
  101. */
  102. .site {
  103. margin: 0 auto;
  104. padding: 0;
  105. }
  106. .site-content {
  107. background-color: #{map-deep-get($config-global, "color", "background", "default")};
  108. }
  109. #page {
  110. .entry-header,
  111. .page-header,
  112. .entry-footer,
  113. .a8c-posts-list {
  114. text-align: center;
  115. }
  116. .a8c-posts-list-item__excerpt {
  117. text-align: left;
  118. }
  119. }
  120. /**
  121. * 4. Navigation
  122. */
  123. /**
  124. * 4.1 Main Navigation
  125. */
  126. body:not(.fse-enabled) {
  127. #site-navigation,
  128. .main-navigation {
  129. background-color: #{map-deep-get($config-global, "color", "secondary", "default")};
  130. border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  131. margin-left: 0;
  132. margin-right: 0;
  133. text-align: center;
  134. & > div {
  135. text-align: left;
  136. }
  137. &.main-navigation {
  138. & > div {
  139. padding-left: #{map-deep-get($config-global, "spacing", "unit")};
  140. padding-right: #{map-deep-get($config-global, "spacing", "unit")};
  141. }
  142. ul {
  143. li {
  144. &.current-menu-item {
  145. a {
  146. color: #{map-deep-get($config-global, "color", "primary", "default")};
  147. }
  148. }
  149. a {
  150. color: #{map-deep-get($config-global, "color", "background", "default")};
  151. text-decoration: none;
  152. &:hover {
  153. color: #{map-deep-get($config-global, "color", "primary", "default")};
  154. }
  155. }
  156. @include media(mobile) {
  157. padding-left: 0;
  158. padding-right: 0;
  159. list-style-type: disc;
  160. &.current-menu-item {
  161. a {
  162. color: #{map-deep-get($config-global, "color", "primary", "default")};
  163. }
  164. }
  165. a {
  166. color: #{map-deep-get($config-global, "color", "background", "default")};
  167. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  168. &:hover {
  169. color: #{map-deep-get($config-global, "color", "primary", "default")};
  170. }
  171. &::after {
  172. color: #{map-deep-get($config-global, "color", "background", "default")};
  173. content: " \2022";
  174. margin-left: #{map-deep-get($config-global, "spacing", "unit")};
  175. display: inline;
  176. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  177. opacity: 0.58;
  178. }
  179. }
  180. &:last-child {
  181. a {
  182. &::after {
  183. content: "";
  184. margin-left: 0;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. ul {
  191. @include media(mobile) {
  192. background-color: #{map-deep-get($config-global, "color", "background", "default")};
  193. li {
  194. &.current-menu-item {
  195. a {
  196. color: #{map-deep-get($config-global, "color", "secondary", "default")};
  197. }
  198. }
  199. a {
  200. color: #{map-deep-get($config-global, "color", "primary", "default")};
  201. &::after {
  202. content: "";
  203. }
  204. &:hover {
  205. color: #{map-deep-get($config-global, "color", "primary", "hover")};
  206. }
  207. }
  208. &:hover {
  209. background: #{map-deep-get($config-global, "color", "background", "light")};
  210. }
  211. }
  212. }
  213. }
  214. }
  215. .main-menu {
  216. & > li > a {
  217. padding-left: 0;
  218. }
  219. }
  220. #toggle-menu {
  221. border-radius: 0;
  222. width: 100% !important;
  223. text-align: center;
  224. font-size: map-deep-get($config-header, "main-nav", "font", "size");
  225. }
  226. }
  227. }
  228. }
  229. /**
  230. * 4.2 Social Navigation
  231. */
  232. .social-navigation > div > ul {
  233. margin-left: 0;
  234. margin-right: 0;
  235. }
  236. /**
  237. * 5. Archive Pagination and Post Navigation
  238. */
  239. .pagination .nav-links > *,
  240. .post-navigation .post-title {
  241. font-weight: normal;
  242. }
  243. /**
  244. * 6. Block Specific Styles
  245. */
  246. /**
  247. * 6.1. Column Block
  248. */
  249. .wp-block-coblocks-column {
  250. h1,
  251. h2,
  252. h3,
  253. h4,
  254. h5,
  255. h6 {
  256. margin-bottom: 0.857em;
  257. }
  258. a {
  259. color: #{map-deep-get($config-global, "color", "secondary", "default")};
  260. &:hover {
  261. color: #{map-deep-get($config-global, "color", "secondary", "hover")};
  262. }
  263. }
  264. }
  265. /**
  266. * 6.2. Quote Block
  267. */
  268. .wp-block-quote,
  269. .wp-block-quote[style*="text-align:center"],
  270. .wp-block-quote[style*="text-align:right"] {
  271. border: 1px solid #f2f2f2;
  272. padding: #{map-deep-get($config-global, "spacing", "horizontal")};
  273. p {
  274. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  275. }
  276. cite {
  277. color: #{map-deep-get($config-global, "color", "secondary", "default")};
  278. }
  279. }
  280. /**
  281. * 6.3. Hero Block and Cover Block
  282. */
  283. .wp-block-coblocks-hero__box,
  284. .wp-block-cover__inner-container {
  285. padding: #{map-deep-get($config-global, "spacing", "vertical")};
  286. h1,
  287. h2,
  288. h3,
  289. h4,
  290. h5,
  291. h6 {
  292. padding: #{map-deep-get($config-global, "spacing", "horizontal")};
  293. }
  294. p {
  295. padding: #{map-deep-get($config-global, "spacing", "horizontal")};
  296. }
  297. }
  298. /**
  299. * 6.4. File Block
  300. */
  301. .wp-block-file {
  302. a {
  303. &.wp-block-file__button {
  304. text-transform: uppercase;
  305. line-height: #{map-deep-get($config-button, "font", "line-height")};
  306. color: #{map-deep-get($config-button, "color", "text")};
  307. cursor: pointer;
  308. font-weight: #{map-deep-get($config-button, "font", "weight")};
  309. @include font-family( map-deep-get($config-button, "font", "family") );
  310. font-size: #{map-deep-get($config-button, "font", "size")};
  311. background-color: #{map-deep-get($config-button, "color", "background")};
  312. border-radius: #{map-deep-get($config-button, "border-radius")};
  313. border-width: #{map-deep-get($config-button, "border-width")};
  314. padding: #{map-deep-get($config-button, "padding", "vertical")} #{map-deep-get($config-button, "padding", "horizontal")};
  315. display: inline-block;
  316. &:focus,
  317. &:hover,
  318. &:visited {
  319. color: #{map-deep-get($config-button, "color", "text-hover")};
  320. background-color: #{map-deep-get($config-button, "color", "background-hover")};
  321. opacity: 1;
  322. }
  323. }
  324. }
  325. }
  326. /**
  327. * 6.5. Latest Comments Block
  328. */
  329. .wp-block-latest-comments {
  330. .wp-block-latest-comments__comment-meta {
  331. @include font-family( map-deep-get($config-global, "font", "family", "secondary") );
  332. .wp-block-latest-comments__comment-date {
  333. font-size: #{map-deep-get($config-global, "font", "size", "xs")};
  334. }
  335. }
  336. }
  337. /**
  338. * 6.6. Button Block
  339. * 6.7. Posts List Block
  340. * 6.8. Search Block
  341. */
  342. .wp-block-button a.wp-block-button__link,
  343. .a8c-posts-list a.a8c-posts-list__view-all,
  344. .wp-block-search .wp-block-search__button {
  345. text-transform: uppercase;
  346. }
  347. /**
  348. * 7. Widgets
  349. */
  350. .site-footer {
  351. .widget-area {
  352. .widget-title {
  353. margin-bottom: 0.857em;
  354. }
  355. }
  356. }
  357. /**
  358. * 6.1. Blog Posts (Newspack) Block
  359. */
  360. .wp-block-newspack-blocks-homepage-articles {
  361. article {
  362. .entry-title a {
  363. &:active,
  364. &:focus,
  365. &:hover {
  366. text-decoration: none;
  367. }
  368. }
  369. .more-link {
  370. &:active,
  371. &:focus,
  372. &:hover {
  373. color: #{map-deep-get($config-global, "color", "primary", "hover")};
  374. }
  375. }
  376. .cat-links a,
  377. .more-link,
  378. .entry-meta a {
  379. text-decoration: none;
  380. &:active,
  381. &:focus,
  382. &:hover {
  383. text-decoration: underline;
  384. }
  385. }
  386. }
  387. &.image-alignbehind article {
  388. .entry-title a {
  389. &:active,
  390. &:focus,
  391. &:hover {
  392. color: inherit;
  393. text-decoration: underline;
  394. }
  395. }
  396. .more-link {
  397. &:active,
  398. &:focus,
  399. &:hover {
  400. color: inherit;
  401. }
  402. }
  403. }
  404. }
  405. .has-background:not(.has-background-background-color),
  406. [class*="background-color"]:not(.has-background-background-color),
  407. [style*="background-color"] {
  408. .wp-block-newspack-blocks-homepage-articles article {
  409. .entry-title a {
  410. &:active,
  411. &:focus,
  412. &:hover {
  413. text-decoration: underline;
  414. }
  415. }
  416. .more-link {
  417. &:active,
  418. &:focus,
  419. &:hover {
  420. color: inherit;
  421. }
  422. }
  423. }
  424. }
  425. /**
  426. * Search block
  427. */
  428. .wp-block-search {
  429. &.wp-block-search__button-inside {
  430. .wp-block-search__inside-wrapper {
  431. border-radius: #{map-deep-get($config-button, "border-radius")};
  432. }
  433. .wp-block-search__input {
  434. background: transparent;
  435. }
  436. }
  437. .wp-block-search__input {
  438. margin-right: calc(0.1 * #{map-deep-get($config-button, "padding", "horizontal")});
  439. border-radius: #{map-deep-get($config-button, "border-radius")};
  440. }
  441. }