_blocks.scss 22 KB

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