search-results.pcss.css

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

Search results specific styles.

File

core/themes/olivero/css/components/search-results.pcss.css

View source
  1. /**
  2. * @file
  3. * Search results specific styles.
  4. */
  5. @import "../base/media-queries.pcss.css";
  6. .search-results {
  7. margin-block-end: var(--sp2);
  8. padding-block: 0;
  9. padding-inline-start: 0;
  10. padding-inline-end: 0;
  11. list-style: none;
  12. @media (--md) {
  13. margin-block-end: var(--sp3);
  14. }
  15. }
  16. .search-result__title {
  17. margin-block: 0;
  18. margin-inline-start: 0;
  19. margin-inline-end: 0;
  20. color: var(--color-text-neutral-loud);
  21. font-size: 20px;
  22. line-height: var(--line-height-base);
  23. & a {
  24. padding-block-end: 3px;
  25. transition:
  26. background-size 0.2s,
  27. color 0.2s;
  28. text-decoration: none;
  29. background-color: transparent;
  30. background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */
  31. background-repeat: no-repeat;
  32. background-position: bottom left; /* LTR */
  33. background-size: 0 3px;
  34. &:hover {
  35. color: var(--color-text-primary-medium);
  36. }
  37. }
  38. @media (--lg) {
  39. margin-block-end: var(--sp1);
  40. font-size: 30px;
  41. line-height: var(--sp3);
  42. }
  43. }
  44. [dir="rtl"] .search-result__title a {
  45. background-position: bottom right;
  46. }
  47. .search-result__snippet {
  48. padding-block-end: calc(var(--sp1-5) - 2px);
  49. @media (--lg) {
  50. padding-block-end: var(--sp3);
  51. }
  52. }
  53. .search-result__meta {
  54. display: flex;
  55. align-items: center;
  56. margin-block-end: var(--sp1);
  57. color: var(--color-text-neutral-soft);
  58. font-size: 14px;
  59. line-height: var(--sp);
  60. & a {
  61. color: var(--color-text-primary-medium);
  62. font-weight: bold;
  63. }
  64. }
  65. .search-results__item {
  66. position: relative; /* Anchor after pseudo-element. */
  67. margin-block-end: var(--sp1-5);
  68. &::after {
  69. position: absolute;
  70. inset-block-end: 0;
  71. width: var(--sp3);
  72. height: 0;
  73. content: "";
  74. /* Intentionally not using CSS logical properties. */
  75. border-top: solid 2px var(--color--gray-95);
  76. }
  77. &:last-child {
  78. margin-block-end: 0;
  79. }
  80. @media (--lg) {
  81. margin-block-end: var(--sp3);
  82. }
  83. }
  84. .empty-search-results-text {
  85. color: var(--color-text-neutral-loud);
  86. font-family: var(--font-sans);
  87. font-size: 20px;
  88. font-weight: bold;
  89. font-style: normal;
  90. line-height: var(--sp1-5);
  91. margin-block: var(--sp);
  92. @media (--md) {
  93. margin-block: var(--sp2);
  94. font-size: 24px;
  95. line-height: var(--sp2);
  96. }
  97. }

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