_blocks.scss 22 KB

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