text-content.pcss.css

Same filename in other branches
  1. 9 core/themes/olivero/css/components/text-content.pcss.css
  2. 10 core/themes/olivero/css/components/text-content.pcss.css

Text Content.

File

core/themes/olivero/css/components/text-content.pcss.css

View source
  1. /**
  2. * @file
  3. * Text Content.
  4. */
  5. @import "../base/media-queries.pcss.css";
  6. .text-content,
  7. .cke_editable {
  8. color: var(--color-text-neutral-medium);
  9. font-family: var(--font-serif);
  10. line-height: var(--sp1-5);
  11. /*
  12. @todo
  13. text-decoration-thickness is supported by FF & Safari
  14. text-underline-offset is supported by Safari
  15. text-decoration-color supported by Chrome, FF, & Safari
  16. */
  17. & a:where(:not(.button)) {
  18. color: var(--color-text-primary-medium);
  19. text-decoration-color: currentColor;
  20. text-decoration-thickness: 2px;
  21. overflow-wrap: break-word;
  22. @supports (box-shadow: none) {
  23. transition: box-shadow 0.3s cubic-bezier(0.55, 0.085, 0, 0.99);
  24. text-decoration: none;
  25. box-shadow: inset 0 -2px 0 0 var(--color--primary-50);
  26. &:hover {
  27. text-decoration: underline;
  28. color: var(--color--black);
  29. box-shadow: inset 0 -2em 0 0 var(--color--primary-80);
  30. text-decoration-color: var(--color--primary-80);
  31. }
  32. }
  33. }
  34. & p {
  35. margin-block-start: var(--sp);
  36. margin-block-end: var(--sp);
  37. &:first-child {
  38. margin-block-start: 0;
  39. }
  40. &:last-child {
  41. margin-block-end: 0;
  42. }
  43. @media (--md) {
  44. margin-block-start: var(--sp2);
  45. margin-block-end: var(--sp2);
  46. }
  47. }
  48. & code {
  49. background-color: var(--color--gray-100);
  50. }
  51. & pre code {
  52. display: block;
  53. overflow: auto;
  54. padding-block: var(--sp);
  55. padding-inline-start: var(--sp);
  56. padding-inline-end: var(--sp);
  57. color: var(--color-text-neutral-soft);
  58. }
  59. & blockquote {
  60. position: relative;
  61. margin-block: var(--sp2);
  62. margin-inline-start: 0;
  63. margin-inline-end: 0;
  64. padding-inline-start: var(--sp2);
  65. letter-spacing: -0.01em;
  66. font-family: var(--font-serif);
  67. font-size: 21px;
  68. line-height: var(--sp2);
  69. &::before {
  70. position: absolute;
  71. inset-block-start: 0;
  72. inset-inline-start: 0;
  73. content: "\201C";
  74. color: var(--color--primary-60);
  75. font-size: 54px;
  76. }
  77. &::after {
  78. position: absolute;
  79. inset-block-end: 0;
  80. inset-inline-start: 0;
  81. width: var(--sp0-5);
  82. height: calc(100% - 30px);
  83. margin-inline-start: 4px;
  84. content: "";
  85. background: var(--color--gray-100);
  86. }
  87. @media (--grid-md) {
  88. font-size: 32px;
  89. line-height: var(--sp3);
  90. }
  91. @media (--lg) {
  92. font-size: 40px;
  93. line-height: var(--sp3-5);
  94. }
  95. }
  96. @media (--grid-md) {
  97. font-size: 18px;
  98. line-height: var(--sp2);
  99. }
  100. }
  101. /**
  102. * Special colors for footer that has a dark background.
  103. */
  104. .site-footer .text-content {
  105. color: inherit;
  106. & * {
  107. color: inherit;
  108. }
  109. & a {
  110. text-decoration: underline;
  111. color: var(--color--white);
  112. box-shadow: none;
  113. &:hover {
  114. text-decoration: none;
  115. color: var(--color--white);
  116. box-shadow: none;
  117. }
  118. }
  119. }
  120. /**
  121. * Decrease font-size for blockquote placed in sidebar region.
  122. */
  123. .region--sidebar .text-content blockquote {
  124. @media (--lg) {
  125. font-size: 24px;
  126. line-height: var(--sp2);
  127. }
  128. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.