_blocks.scss 23 KB

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