_blocks.scss 23 KB

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