_style.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. .wp-block-newspack-blocks-homepage-articles {
  2. &.image-aligntop {
  3. .post-thumbnail {
  4. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  5. }
  6. }
  7. &.image-alignleft {
  8. .post-thumbnail {
  9. margin-right: #{map-deep-get($config-global, "spacing", "vertical")};
  10. }
  11. }
  12. &.image-alignright {
  13. .post-thumbnail {
  14. margin-left: #{map-deep-get($config-global, "spacing", "vertical")};
  15. }
  16. }
  17. &.image-alignbehind .post-has-image .entry-wrapper {
  18. padding: #{map-deep-get($config-global, "spacing", "vertical")};
  19. }
  20. &.is-grid article {
  21. margin-top: 0;
  22. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  23. @include media(mobile) {
  24. margin-bottom: #{3 * map-deep-get($config-global, "spacing", "vertical")};
  25. }
  26. }
  27. .article-section-title {
  28. font-size: #{map-deep-get($config-global, "font", "size", "base")};
  29. margin-bottom: #{0.5 * map-deep-get($config-global, "spacing", "vertical")};
  30. & + article {
  31. margin-top: 0;
  32. }
  33. }
  34. article {
  35. display: block;
  36. /* Vertical margins logic between posts */
  37. margin-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  38. margin-bottom: #{2 * map-deep-get($config-global, "spacing", "vertical")};
  39. @include media(mobile) {
  40. margin-top: #{3 * map-deep-get($config-global, "spacing", "vertical")};
  41. margin-bottom: #{3 * map-deep-get($config-global, "spacing", "vertical")};
  42. }
  43. &:first-child {
  44. margin-top: 0;
  45. }
  46. &:last-child {
  47. margin-bottom: #{3 * map-deep-get($config-global, "spacing", "vertical")};
  48. }
  49. .post-thumbnail img {
  50. width: auto;
  51. }
  52. .entry-wrapper > * {
  53. /* Vertical margins logic between post details */
  54. margin-top: #{map-deep-get($config-global, "spacing", "unit")};
  55. margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
  56. &:first-child {
  57. margin-top: 0;
  58. }
  59. &:last-child {
  60. margin-bottom: 0;
  61. }
  62. }
  63. .entry-title {
  64. a {
  65. color: #{map-deep-get($config-global, "color", "primary", "default")};
  66. .has-background:not(.has-background-background-color) &,
  67. [class*="background-color"]:not(.has-background-background-color) &,
  68. [style*="background-color"] & {
  69. color: currentColor;
  70. }
  71. &:hover {
  72. color: #{map-deep-get($config-global, "color", "primary", "hover")};
  73. text-decoration: underline;
  74. .has-background:not(.has-background-background-color) &,
  75. [class*="background-color"]:not(.has-background-background-color) &,
  76. [style*="background-color"] & {
  77. color: currentColor;
  78. }
  79. }
  80. }
  81. }
  82. .more-link {
  83. @include media(mobile) {
  84. margin-top: #{map-deep-get($config-global, "spacing", "unit")};
  85. }
  86. }
  87. .entry-meta,
  88. .cat-links {
  89. color: #{map-deep-get($config-global, "color", "foreground", "light")};
  90. font-size: #{map-deep-get($config-global, "font", "size", "sm")};
  91. .has-background:not(.has-background-background-color) &,
  92. [class*="background-color"]:not(.has-background-background-color) &,
  93. [style*="background-color"] & {
  94. color: currentColor;
  95. }
  96. > span > * {
  97. vertical-align: top;
  98. }
  99. .byline:not(:last-child) {
  100. margin-right: #{map-deep-get($config-global, "spacing", "unit")};
  101. }
  102. .published + .updated {
  103. display: none;
  104. }
  105. a {
  106. color: currentColor;
  107. text-decoration: underline;
  108. &:hover,
  109. &:active {
  110. color: #{map-deep-get($config-global, "color", "primary", "hover")};
  111. text-decoration: none;
  112. .has-background:not(.has-background-background-color) &,
  113. [class*="background-color"]:not(.has-background-background-color) &,
  114. [style*="background-color"] & {
  115. color: currentColor;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. button[data-load-more-btn],
  123. .button {
  124. // Extend button style
  125. @extend %button-style;
  126. display: inline-block;
  127. .has-background:not(.has-background-background-color) &,
  128. [class*="background-color"]:not(.has-background-background-color) &,
  129. [style*="background-color"] & {
  130. background-color: transparent;
  131. border: 2px solid currentColor;
  132. color: currentColor;
  133. }
  134. }