_blocks.scss 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215
  1. /* !Block styles */
  2. .entry .entry-content > *,
  3. .entry .entry-summary > * {
  4. margin: $size__vertical-spacing-unit auto;
  5. max-width: 100%;
  6. @include postContentMaxWidth();
  7. @include media(tablet) {
  8. margin: $size__vertical-spacing-unit auto;
  9. }
  10. > *:first-child {
  11. margin-top: 0;
  12. }
  13. > *:last-child {
  14. margin-bottom: 0;
  15. }
  16. &.alignwide {
  17. margin-left: auto;
  18. margin-right: auto;
  19. clear: both;
  20. @include media(tablet) {
  21. width: 100%;
  22. max-width: 100%;
  23. }
  24. }
  25. &.alignfull {
  26. position: relative;
  27. left: -#{$size__spacing-unit };
  28. width: calc( 100% + (2 * #{$size__spacing-unit}));
  29. max-width: calc( 100% + (2 * #{$size__spacing-unit}));
  30. clear: both;
  31. @include media(tablet) {
  32. margin-top: $size__vertical-spacing-unit;
  33. margin-bottom: $size__vertical-spacing-unit;
  34. left: calc( -12.5% - 75px );
  35. width: calc( 125% + 150px );
  36. max-width: calc( 125% + 150px );
  37. }
  38. }
  39. &.alignleft {
  40. /*rtl:ignore*/
  41. float: left;
  42. max-width: calc(5 * (100vw / 12));
  43. margin-top: 0;
  44. margin-left: 0;
  45. /*rtl:ignore*/
  46. margin-right: $size__spacing-unit;
  47. @include media(tablet) {
  48. max-width: calc(4 * (100vw / 12));
  49. /*rtl:ignore*/
  50. margin-right: calc(2 * #{$size__spacing-unit});
  51. }
  52. }
  53. &.alignright {
  54. /*rtl:ignore*/
  55. float: right;
  56. max-width: calc(5 * (100vw / 12));
  57. margin-top: 0;
  58. margin-right: 0;
  59. /*rtl:ignore*/
  60. margin-left: $size__spacing-unit;
  61. @include media(tablet) {
  62. max-width: calc(4 * (100vw / 12));
  63. margin-right: 0;
  64. /*rtl:ignore*/
  65. margin-left: calc(2 * #{$size__spacing-unit});
  66. }
  67. }
  68. &.aligncenter {
  69. margin-left: auto;
  70. margin-right: auto;
  71. @include postContentMaxWidth();
  72. }
  73. }
  74. /*
  75. * Make sure the first block has margin-top: 0
  76. */
  77. .entry:not(.has-post-thumbnail) .entry-content > :first-child {
  78. margin-top: 0;
  79. }
  80. /*
  81. * Unset nested content selector styles
  82. * - Prevents layout styles from cascading too deeply
  83. * - helps with plugin compatibility
  84. */
  85. .entry .entry-content,
  86. .entry .entry-summary {
  87. .entry-content,
  88. .entry-summary,
  89. .entry {
  90. margin: inherit;
  91. max-width: inherit;
  92. padding: inherit;
  93. @include media(tablet) {
  94. margin: inherit;
  95. max-width: inherit;
  96. padding: inherit;
  97. }
  98. }
  99. }
  100. .entry .entry-content {
  101. //! Paragraphs
  102. p.has-background {
  103. padding: 20px 30px;
  104. }
  105. //! Audio
  106. .wp-block-audio {
  107. width: 100%;
  108. audio {
  109. width: 100%;
  110. }
  111. &.alignleft audio,
  112. &.alignright audio {
  113. max-width: (0.33 * $mobile_width);
  114. @include media(tablet) {
  115. max-width: (0.5 * $tablet_width);
  116. }
  117. @include media(wide) {
  118. max-width: (0.33 * $desktop_width);
  119. }
  120. }
  121. }
  122. //! Button
  123. .wp-block-button {
  124. .wp-block-button__link {
  125. @include button-transition;
  126. border: none;
  127. font-size: $font__size-sm;
  128. font-family: $font__heading;
  129. line-height: $font__line-height-heading;
  130. box-sizing: border-box;
  131. font-weight: bold;
  132. text-decoration: none;
  133. padding: ($size__spacing-unit * .76) $size__spacing-unit;
  134. outline: none;
  135. outline: none;
  136. &:not(.has-background) {
  137. background-color: $color__background-button;
  138. }
  139. &:not(.has-text-color) {
  140. color: white;
  141. }
  142. &:hover {
  143. color: white;
  144. background: $color__background-button-hover;
  145. cursor: pointer;
  146. }
  147. &:focus {
  148. color: white;
  149. background: $color__background-button-hover;
  150. outline: thin dotted;
  151. outline-offset: -4px;
  152. }
  153. }
  154. &:not(.is-style-squared) .wp-block-button__link {
  155. border-radius: 5px;
  156. }
  157. &.is-style-outline .wp-block-button__link,
  158. &.is-style-outline .wp-block-button__link:focus,
  159. &.is-style-outline .wp-block-button__link:active {
  160. @include button-all-transition;
  161. border-width: 2px;
  162. border-style: solid;
  163. &:not(.has-background) {
  164. background: transparent;
  165. }
  166. &:not(.has-text-color) {
  167. color: $color__background-button;
  168. border-color: currentColor;
  169. }
  170. }
  171. &.is-style-outline .wp-block-button__link:hover {
  172. color: white;
  173. border-color: $color__background-button-hover;
  174. &:not(.has-background) {
  175. color: $color__background-button-hover;
  176. }
  177. }
  178. }
  179. //! Latest posts, categories, archives
  180. .wp-block-archives,
  181. .wp-block-categories,
  182. .wp-block-latest-posts {
  183. padding: 0;
  184. list-style: none;
  185. li {
  186. color: $color__text-dark;
  187. font-family: $font__heading;
  188. font-size: calc(#{$font__size_base} * #{$font__size-ratio});
  189. font-weight: bold;
  190. line-height: $font__line-height-heading;
  191. padding-bottom: ( .75 * $size__spacing-unit );
  192. &.menu-item-has-children,
  193. &:last-child {
  194. padding-bottom: 0;
  195. }
  196. a {
  197. text-decoration: none;
  198. }
  199. }
  200. }
  201. .wp-block-archives,
  202. .wp-block-categories {
  203. &.aligncenter {
  204. text-align: center;
  205. }
  206. }
  207. //! Latest categories
  208. .wp-block-categories {
  209. ul {
  210. padding-top: ( .75 * $size__spacing-unit );
  211. }
  212. li ul {
  213. list-style: none;
  214. padding-left: 0;
  215. }
  216. @include nestedSubMenuPadding();
  217. }
  218. //! Latest posts grid view
  219. .wp-block-latest-posts.is-grid {
  220. li {
  221. border-top: 2px solid $color__border;
  222. padding-top: $size__spacing-unit;
  223. margin-bottom: $size__vertical-spacing-unit;
  224. a {
  225. &:after {
  226. content: '';
  227. }
  228. }
  229. &:last-child {
  230. margin-bottom: auto;
  231. a:after {
  232. content: '';
  233. }
  234. }
  235. }
  236. }
  237. //! Latest preformatted text
  238. .wp-block-preformatted {
  239. font-size: $font__size-xs;
  240. line-height: 1.8;
  241. padding: $size__spacing-unit;
  242. }
  243. //! Verse
  244. .wp-block-verse {
  245. font-family: $font__body;
  246. font-size: $font__size_base;
  247. line-height: 1.8;
  248. }
  249. //! Paragraphs
  250. .has-drop-cap {
  251. &:not(:focus):first-letter {
  252. font-family: $font__heading;
  253. font-size: $font__size-xxxl;
  254. line-height: 1;
  255. font-weight: bold;
  256. margin: 0 0.25em 0 0;
  257. }
  258. }
  259. //! Pullquote
  260. .wp-block-pullquote {
  261. border-color: transparent;
  262. border-width: 2px;
  263. padding: $size__spacing-unit;
  264. blockquote {
  265. color: $color__text-main;
  266. border: none;
  267. margin-top: calc(3 * #{$size__vertical-spacing-unit});
  268. margin-bottom: calc(3.33 * #{$size__vertical-spacing-unit});
  269. margin-right: 0;
  270. padding-left: 0;
  271. }
  272. p {
  273. font-size: $font__size-lg;
  274. font-style: italic;
  275. line-height: 1.3;
  276. margin-bottom: 0.5em;
  277. margin-top: 0.5em;
  278. em {
  279. font-style: normal;
  280. }
  281. @include media(tablet) {
  282. font-size: $font__size-xl;
  283. }
  284. }
  285. cite {
  286. display: inline-block;
  287. font-family: $font__heading;
  288. line-height: 1.6;
  289. text-transform: none;
  290. color: $color__text-dark;
  291. /*
  292. * This requires a rem-based font size calculation instead of our normal em-based one,
  293. * because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
  294. */
  295. font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
  296. }
  297. &.alignleft,
  298. &.alignright {
  299. width: 100%;
  300. padding: 0;
  301. blockquote {
  302. margin: $size__vertical-spacing-unit 0;
  303. padding: 0;
  304. text-align: left;
  305. max-width: 100%;
  306. p:first-child {
  307. margin-top: 0;
  308. }
  309. }
  310. }
  311. &.is-style-solid-color {
  312. background-color: $color__link;
  313. padding-left: 0;
  314. padding-right: 0;
  315. @include media(tablet) {
  316. padding-left: 10%;
  317. padding-right: 10%;
  318. }
  319. p {
  320. font-size: $font__size-lg;
  321. line-height: 1.3;
  322. margin-bottom: 0.5em;
  323. margin-top: 0.5em;
  324. @include media(tablet) {
  325. font-size: $font__size-xl;
  326. }
  327. }
  328. a {
  329. color: $color__background-body;
  330. }
  331. cite {
  332. color: inherit;
  333. }
  334. blockquote {
  335. max-width: 100%;
  336. color: $color__background-body;
  337. padding-left: 0;
  338. margin-left: $size__spacing-unit;
  339. margin-right: $size__spacing-unit;
  340. &.has-text-color p,
  341. &.has-text-color a,
  342. &.has-primary-color,
  343. &.has-secondary-color,
  344. &.has-dark-gray-color,
  345. &.has-light-gray-color,
  346. &.has-white-color {
  347. color: inherit;
  348. }
  349. @include media(tablet) {
  350. margin-left: 0;
  351. margin-right: 0;
  352. }
  353. }
  354. &.alignright,
  355. &.alignleft {
  356. @include media(tablet) {
  357. padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
  358. }
  359. }
  360. &.alignfull {
  361. @include media(tablet) {
  362. padding-left: calc(10% + 58px + (2 * #{$size__spacing-unit}));
  363. padding-right: calc(10% + 58px + (2 * #{$size__spacing-unit}));
  364. }
  365. }
  366. }
  367. }
  368. //! Blockquote
  369. .wp-block-quote {
  370. &:not(.is-large),
  371. &:not(.is-style-large) {
  372. border-color: $color__link;
  373. border-width: 2px;
  374. padding-top: 0;
  375. padding-bottom: 0;
  376. }
  377. p {
  378. font-size: 1em;
  379. font-style: normal;
  380. line-height: 1.8;
  381. }
  382. cite {
  383. /*
  384. * This requires a rem-based font size calculation instead of our normal em-based one,
  385. * because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
  386. */
  387. font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
  388. }
  389. &.is-large,
  390. &.is-style-large {
  391. margin: $size__vertical-spacing-unit auto;
  392. padding: 0;
  393. border-left: none;
  394. p {
  395. font-size: $font__size-lg;
  396. line-height: 1.4;
  397. font-style: italic;
  398. }
  399. cite,
  400. footer {
  401. /*
  402. * This requires a rem-based font size calculation instead of our normal em-based one,
  403. * because the cite tag sometimes gets wrapped in a p tag. This is equivalent to $font-size_xs.
  404. */
  405. font-size: calc(1rem / (1.25 * #{$font__size-ratio}));
  406. }
  407. @include media(tablet) {
  408. p {
  409. font-size: $font__size-lg;
  410. }
  411. }
  412. }
  413. }
  414. //! Image
  415. .wp-block-image {
  416. img {
  417. display: block;
  418. }
  419. &.alignfull img {
  420. width: 100vw;
  421. max-width: calc( 100% + (2 * #{$size__spacing-unit}));
  422. @include media(tablet) {
  423. max-width: calc( 125% + 150px );
  424. margin-left: auto;
  425. margin-right: auto;
  426. }
  427. }
  428. }
  429. //! Cover Image
  430. .wp-block-cover-image,
  431. .wp-block-cover {
  432. position: relative;
  433. min-height: 345px;
  434. padding: $size__spacing-unit;
  435. @include media(tablet) {
  436. min-height: 460px;
  437. padding: $size__spacing-unit 10%;
  438. }
  439. .wp-block-cover__inner-container {
  440. padding: 0;
  441. color: #fff;
  442. a {
  443. color: inherit;
  444. }
  445. @include media(tablet) {
  446. max-width: calc(6 * (100vw / 12) - 28px);
  447. }
  448. }
  449. h1 {
  450. font-size: $font__size-xl;
  451. @include media(tablet) {
  452. font-size: $font__size-xxl;
  453. }
  454. }
  455. .wp-block-cover-image-text,
  456. .wp-block-cover-text,
  457. h2 {
  458. font-size: $font__size-lg;
  459. max-width: inherit;
  460. margin: inherit;
  461. text-align: inherit;
  462. padding: 0;
  463. @include media(tablet) {
  464. font-size: $font__size-xl;
  465. }
  466. }
  467. h2 {
  468. &.has-text-align-left {
  469. text-align: left;
  470. }
  471. &.has-text-align-center {
  472. text-align: center;
  473. }
  474. &.has-text-align-right {
  475. text-align: right;
  476. }
  477. }
  478. h3 {
  479. font-size: $font__size-md;
  480. @include media(tablet) {
  481. font-size: $font__size-lg;
  482. }
  483. }
  484. h4 {
  485. font-size: $font__size_base;
  486. @include media(tablet) {
  487. font-size: $font__size-md;
  488. }
  489. }
  490. h5 {
  491. font-size: $font__size-sm;
  492. @include media(tablet) {
  493. font-size: $font__size_base;
  494. }
  495. }
  496. h6 {
  497. font-size: $font__size-xs;
  498. @include media(tablet) {
  499. font-size: $font__size-sm;
  500. }
  501. }
  502. &.alignleft,
  503. &.alignright {
  504. width: 100%;
  505. @include media(tablet) {
  506. padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
  507. }
  508. }
  509. &.alignfull {
  510. .wp-block-cover__inner-container {
  511. max-width: 100%;
  512. @include media(tablet) {
  513. max-width: calc(6 * (100vw / 12) - 28px);
  514. }
  515. }
  516. @include media(tablet) {
  517. padding-left: calc(10% + 58px + (2 * #{$size__spacing-unit}));
  518. padding-right: calc(10% + 58px + (2 * #{$size__spacing-unit}));
  519. .wp-block-cover__inner-container {
  520. padding: 0;
  521. }
  522. }
  523. }
  524. }
  525. //! Galleries
  526. .wp-block-gallery {
  527. list-style-type: none;
  528. padding-left: 0;
  529. .blocks-gallery-image:last-child,
  530. .blocks-gallery-item:last-child {
  531. margin-bottom: 16px;
  532. }
  533. figcaption a {
  534. color: #fff;
  535. }
  536. }
  537. //! Captions
  538. .wp-block-audio figcaption,
  539. .wp-block-video figcaption,
  540. .wp-block-image figcaption,
  541. .wp-block-gallery .blocks-gallery-image figcaption,
  542. .wp-block-gallery .blocks-gallery-item figcaption {
  543. font-size: $font__size-xs;
  544. font-family: $font__heading;
  545. line-height: $font__line-height-pre;
  546. margin: 0;
  547. padding: ( $size__spacing-unit * .5 );
  548. text-align: center;
  549. }
  550. //! Separator
  551. .wp-block-separator,
  552. hr {
  553. background-color: $color__text-main;
  554. border: 0;
  555. height: 3px;
  556. margin: $size__vertical-spacing-unit auto;
  557. max-width: 10rem;
  558. &.is-style-wide {
  559. max-width: 100%;
  560. @include postContentMaxWidth();
  561. }
  562. &.is-style-dots {
  563. max-width: 100%;
  564. @include postContentMaxWidth();
  565. background-color: inherit;
  566. border: inherit;
  567. height: inherit;
  568. text-align: center;
  569. &:before {
  570. color: $color__text-main;
  571. font-size: $font__size-lg;
  572. letter-spacing: $font__size-sm;
  573. padding-left: $font__size-sm;
  574. }
  575. }
  576. /* Remove duplicate rule-line when a separator
  577. * is followed by an H1, or H2 */
  578. & + h1,
  579. & + h2 {
  580. &:before {
  581. display: none;
  582. }
  583. }
  584. }
  585. //! Spacer
  586. .wp-block-spacer {
  587. &.desktop-only {
  588. display: none;
  589. @include media(tablet) {
  590. display: block;
  591. }
  592. }
  593. }
  594. //! Twitter Embed
  595. .wp-block-embed-twitter {
  596. word-break: break-word;
  597. }
  598. //! Table
  599. .wp-block-table {
  600. th,
  601. td {
  602. border-color: $color__text-dark;
  603. }
  604. }
  605. //! File
  606. .wp-block-file {
  607. font-family: $font__heading;
  608. .wp-block-file__button {
  609. display: table;
  610. @include button-transition;
  611. border: none;
  612. border-radius: 5px;
  613. background: $color__background-button;
  614. font-size: $font__size-base;
  615. font-family: $font__heading;
  616. line-height: $font__line-height-heading;
  617. text-decoration: none;
  618. font-weight: bold;
  619. padding: ($size__spacing-unit * .75) $size__spacing-unit;
  620. color: #fff;
  621. margin-left: 0;
  622. margin-top: calc(0.75 * #{$size__vertical-spacing-unit});
  623. @include media(desktop) {
  624. font-size: $font__size-base;
  625. padding: ($size__spacing-unit * .875) ($size__spacing-unit * 1.5);
  626. }
  627. &:hover {
  628. background: $color__background-button-hover;
  629. cursor: pointer;
  630. }
  631. &:focus {
  632. background: $color__background-button-hover;
  633. outline: thin dotted;
  634. outline-offset: -4px;
  635. }
  636. }
  637. }
  638. //! Code
  639. .wp-block-code {
  640. border-radius: 0;
  641. code {
  642. font-size: $font__size-md;
  643. white-space: pre-wrap;
  644. word-break: break-word;
  645. }
  646. }
  647. //! Media & Text
  648. .wp-block-media-text {
  649. background: $color__background-screen;
  650. color: $color__text-main;
  651. overflow: hidden;
  652. position: relative;
  653. &:not(.alignfull) {
  654. border-radius: 4px;
  655. }
  656. .wp-block-media-text__content {
  657. padding-left: 1rem;
  658. padding-right: 1rem;
  659. z-index: 2;
  660. a,
  661. a:hover {
  662. color: inherit;
  663. }
  664. > :first-child {
  665. margin-top: 0.88889rem;
  666. }
  667. > :last-child {
  668. margin-bottom: 0.88889rem;
  669. }
  670. h1,
  671. h2,
  672. h3,
  673. h4,
  674. h5,
  675. h6 {
  676. text-align: left;
  677. }
  678. }
  679. &.has-media-on-the-right.is-stacked-on-mobile {
  680. .wp-block-media-text__media {
  681. grid-row: 1;
  682. }
  683. .wp-block-media-text__content {
  684. grid-row: 2;
  685. }
  686. }
  687. @include media(mobile) {
  688. &:before {
  689. top: 5.6%;
  690. height: 88.8%;
  691. }
  692. &.has-media-on-the-right.is-stacked-on-mobile {
  693. .wp-block-media-text__content {
  694. grid-row: 1;;
  695. }
  696. }
  697. }
  698. @include media(desktop) {
  699. .wp-block-media-text__content {
  700. padding-left: 8%;
  701. padding-right: 8%;
  702. }
  703. }
  704. // Temporary fix for IE 11 for this issue: https://github.com/WordPress/gutenberg/issues/11577
  705. @media all and (-ms-high-contrast:none) {
  706. &:after {
  707. display: table;
  708. content: "";
  709. clear: both;
  710. }
  711. figure {
  712. float: left;
  713. width: 50%;
  714. }
  715. .wp-block-media-text__content {
  716. float: right;
  717. width: 50%;
  718. }
  719. &.has-media-on-the-right figure {
  720. float: right;
  721. }
  722. &.has-media-on-the-right .wp-block-media-text__content {
  723. float: left;
  724. }
  725. }
  726. }
  727. //! Columns
  728. .wp-block-columns {
  729. &.alignfull {
  730. padding-left: $size__spacing-unit;
  731. padding-right: $size__spacing-unit;
  732. }
  733. @include media(tabletalt) {
  734. .wp-block-column {
  735. margin-left: #{0.5 * $size__spacing-unit};
  736. margin-right: #{0.5 * $size__spacing-unit};
  737. &:first-child {
  738. margin-left: 0;
  739. }
  740. &:last-child {
  741. margin-right: 0;
  742. }
  743. }
  744. .wp-block-column > * {
  745. &:first-child {
  746. margin-top: 0;
  747. }
  748. &:last-child {
  749. margin-bottom: 0;
  750. }
  751. }
  752. &.alignfull {
  753. padding-left: calc(2 * #{$size__spacing-unit});
  754. padding-right: calc(2 * #{$size__spacing-unit});
  755. }
  756. }
  757. }
  758. //! Latest Comments
  759. .wp-block-latest-comments {
  760. .wp-block-latest-comments__comment-meta {
  761. font-family: $font__heading;
  762. font-weight: bold;
  763. .wp-block-latest-comments__comment-date {
  764. font-weight: normal;
  765. }
  766. }
  767. .wp-block-latest-comments__comment,
  768. .wp-block-latest-comments__comment-date,
  769. .wp-block-latest-comments__comment-excerpt p {
  770. font-size: inherit;
  771. }
  772. &.has-avatars {
  773. }
  774. &.has-dates {
  775. .wp-block-latest-comments__comment-date {
  776. font-size: $font__size-xs;
  777. }
  778. }
  779. &.has-excerpts {
  780. }
  781. }
  782. //! Font Sizes
  783. .has-small-font-size {
  784. font-size: $font__size-sm;
  785. }
  786. .has-normal-font-size {
  787. font-size: $font__size-md;
  788. }
  789. .has-large-font-size {
  790. font-size: $font__size-lg;
  791. }
  792. .has-huge-font-size {
  793. font-size: $font__size-xl;
  794. }
  795. //! Custom background colors
  796. .has-primary-background-color,
  797. .has-secondary-background-color,
  798. .has-dark-gray-background-color,
  799. .has-light-gray-background-color {
  800. // Use white text against these backgrounds by default.
  801. color: $color__background-body;
  802. p,
  803. h1,
  804. h2,
  805. h3,
  806. h4,
  807. h5,
  808. h6,
  809. a {
  810. color: $color__background-body;
  811. }
  812. }
  813. .has-white-background-color {
  814. color: $color__text-main;
  815. // Use dark gray text against this background by default.
  816. p,
  817. h1,
  818. h2,
  819. h3,
  820. h4,
  821. h5,
  822. h6,
  823. a {
  824. color: $color__text-main;
  825. }
  826. }
  827. .has-primary-background-color,
  828. .wp-block-pullquote.is-style-solid-color.has-primary-background-color {
  829. background-color: $color__link;
  830. }
  831. .has-secondary-background-color,
  832. .wp-block-pullquote.is-style-solid-color.has-secondary-background-color {
  833. background-color: $color__border-link-hover;
  834. }
  835. .has-dark-gray-background-color,
  836. .wp-block-pullquote.is-style-solid-color.has-dark-gray-background-color {
  837. background-color: $color__text-main;
  838. }
  839. .has-light-gray-background-color,
  840. .wp-block-pullquote.is-style-solid-color.has-light-gray-background-color {
  841. background-color: $color__text-dark;
  842. }
  843. .has-white-background-color,
  844. .wp-block-pullquote.is-style-solid-color.has-white-background-color {
  845. background-color: #FFF;
  846. }
  847. //! Custom foreground colors
  848. .has-primary-color,
  849. .wp-block-pullquote.is-style-solid-color blockquote.has-primary-color,
  850. .wp-block-pullquote.is-style-solid-color blockquote.has-primary-color p {
  851. color: $color__link;
  852. }
  853. .has-secondary-color,
  854. .wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color,
  855. .wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color p {
  856. color: $color__border-link-hover;
  857. }
  858. .has-dark-gray-color,
  859. .wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color,
  860. .wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color p {
  861. color: $color__text-main;
  862. }
  863. .has-light-gray-color,
  864. .wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color,
  865. .wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color p {
  866. color: $color__text-dark;
  867. }
  868. .has-white-color,
  869. .wp-block-pullquote.is-style-solid-color blockquote.has-white-color {
  870. color: #FFF;
  871. }
  872. //! Posts List
  873. .a8c-posts-list-item__title,
  874. .a8c-posts-list-item__meta {
  875. a {
  876. text-decoration: none;
  877. }
  878. }
  879. .a8c-posts-list__view-all {
  880. text-decoration: none;
  881. }
  882. .a8c-posts-list-item__title {
  883. a {
  884. color: inherit;
  885. &:hover,
  886. &:focus {
  887. color: $color__text-hover;
  888. }
  889. }
  890. }
  891. .a8c-posts-list-item__meta {
  892. a {
  893. color: inherit;
  894. &:hover,
  895. &:focus {
  896. color: $color__link;
  897. }
  898. }
  899. .a8c-posts-list-item__edit-link {
  900. a {
  901. color: $color__background-body;
  902. }
  903. }
  904. }
  905. .a8c-posts-list {
  906. text-align: center;
  907. }
  908. .a8c-posts-list__item:not(:first-child) {
  909. margin-top: calc(6 * #{$size__spacing-unit});
  910. }
  911. .a8c-posts-list-item__featured {
  912. text-align: center;
  913. span {
  914. background: $color__background-button;
  915. color: #fff;
  916. display: inline-block;
  917. font-size: $font__size-xs;
  918. font-weight: bold;
  919. line-height: 1;
  920. padding: .25rem;
  921. text-transform: uppercase;
  922. z-index: 1;
  923. }
  924. }
  925. .a8c-posts-list-item__post-thumbnail {
  926. margin-bottom: $size__vertical-spacing-unit;
  927. img {
  928. display: block;
  929. }
  930. }
  931. .a8c-posts-list-item__title {
  932. font-size: $font__size-lg;
  933. margin: 0;
  934. @include media(tablet) {
  935. font-size: $font__size-xl;
  936. }
  937. }
  938. .a8c-posts-list-item__meta {
  939. font-size: $font__size-xs;
  940. }
  941. .a8c-posts-list-item__author {
  942. margin-right: calc(.5 * #{$size__spacing-unit});
  943. }
  944. .a8c-posts-list-item__edit-link {
  945. @include button-transition;
  946. background: $color__background-button;
  947. border-radius: 3px;
  948. font-family: $font__heading;
  949. font-weight: 700;
  950. padding: .05rem .4rem;
  951. &:hover,
  952. &:focus {
  953. background: $color__background-button-hover;
  954. cursor: pointer;
  955. }
  956. }
  957. .a8c-posts-list-item__excerpt {
  958. @include postContentMaxWidth();
  959. margin: 0 auto;
  960. text-align: left;
  961. p {
  962. margin: $size__vertical-spacing-unit 0;
  963. }
  964. }
  965. .a8c-posts-list__view-all {
  966. @include button-transition;
  967. background: $color__background-button;
  968. border: none;
  969. border-radius: 5px;
  970. box-sizing: border-box;
  971. color: $color__background-body;
  972. display: inline-block;
  973. font-family: $font__heading;
  974. font-size: $font__size-sm;
  975. font-weight: 700;
  976. line-height: $font__line-height-heading;
  977. margin-top: calc(6 * #{$size__spacing-unit} - #{$size__vertical-spacing-unit});
  978. outline: none;
  979. padding: ( $size__spacing-unit * .76 ) $size__spacing-unit;
  980. vertical-align: bottom;
  981. &:hover {
  982. background: $color__background-button-hover;
  983. cursor: pointer;
  984. }
  985. &:visited {
  986. color: $color__background-body;
  987. text-decoration: none;
  988. }
  989. &:focus {
  990. background: $color__background-button-hover;
  991. outline: thin dotted;
  992. outline-offset: -4px;
  993. }
  994. }
  995. }