_blocks.scss 23 KB

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