123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- .wp-block-latest-posts {
- padding-left: 0;
- // Vertical margins logic
- &:not(.is-grid) > li {
- margin-top: var(--global--spacing-vertical);
- margin-bottom: var(--global--spacing-vertical);
- &:first-child {
- margin-top: 0;
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- &.is-grid > li {
- margin-bottom: var(--global--spacing-vertical);
- &:last-child {
- margin-bottom: 0;
- }
- }
- & > li > * {
- margin-top: calc(0.5 * var(--global--spacing-vertical));
- margin-bottom: calc(0.5 * var(--global--spacing-vertical));
- &:first-child {
- margin-top: 0;
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- // Post title
- & > li > a {
- font-family: var(--latest-posts--title-font-family);
- font-size: var(--latest-posts--title-font-size);
- font-weight: var(--heading--font-weight);
- line-height: var(--global--line-height-heading);
- }
- // Post date
- .wp-block-latest-posts__post-date {
- color: var(--global--color-foreground-low-contrast);
- font-size: var(--global--font-size-xs);
- line-height: var(--global--line-height-body);
- [class*="inner-container"] &,
- .has-background & {
- color: currentColor;
- }
- }
- // Post content
- .wp-block-latest-posts__post-excerpt,
- .wp-block-latest-posts__post-full-content {
- font-family: var(--latest-posts--description-font-family);
- font-size: var(--latest-posts--description-font-size);
- line-height: var(--global--line-height-body);
- }
- }
- @include media(tablet) {
- .wp-block-latest-posts.is-style-seedlet-alternating-grid {
- // Necessary so that the block boundaries are respected.
- overflow: hidden;
- > li {
- width: calc(50% - (0.5 * var(--global--spacing-horizontal)));
- max-width: calc(50% - (0.5 * var(--global--spacing-horizontal)));
- text-align: right;
- &:nth-child(2n + 1) {
- float: right;
- text-align: left;
- }
- }
- &.is-grid {
- display: inherit;
- > li {
- margin-top: var(--global--spacing-vertical);
- margin-right: 0;
- &:first-child {
- margin-top: 0;
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- }
- }
|