search-results.pcss.css

Same filename in other branches
  1. 10 core/themes/olivero/css/components/search-results.pcss.css
  2. 11.x 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/variables.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--gray-0);
  21. font-size: 20px;
  22. line-height: var(--line-height-base);
  23. & a {
  24. padding-block-end: 3px;
  25. transition: background-size 0.2s, color 0.2s;
  26. text-decoration: none;
  27. background-color: transparent;
  28. background-image: linear-gradient(var(--color--blue-50), var(--color--blue-50)); /* Two values are needed for IE11 support. */
  29. background-repeat: no-repeat;
  30. background-position: bottom left; /* LTR */
  31. background-size: 0 3px;
  32. &:hover {
  33. color: var(--color--blue-20);
  34. }
  35. }
  36. @media (--lg) {
  37. margin-block-end: var(--sp1);
  38. font-size: 30px;
  39. line-height: var(--sp3);
  40. }
  41. }
  42. [dir="rtl"] .search-result__title a {
  43. background-position: bottom right;
  44. }
  45. .search-result__snippet {
  46. padding-block-end: calc(var(--sp1-5) - 2px);
  47. @media (--lg) {
  48. padding-block-end: var(--sp3);
  49. }
  50. }
  51. .search-result__meta {
  52. display: flex;
  53. align-items: center;
  54. margin-block-end: var(--sp1);
  55. color: var(--color--gray-20);
  56. font-size: 14px;
  57. line-height: var(--sp);
  58. & a {
  59. color: var(--color--blue-20);
  60. font-weight: bold;
  61. }
  62. }
  63. .search-results__item {
  64. position: relative; /* Anchor after pseudo-element. */
  65. margin-block-end: var(--sp1-5);
  66. &:after {
  67. position: absolute;
  68. inset-block-end: 0;
  69. width: var(--sp3);
  70. height: 0;
  71. content: "";
  72. /* Intentionally not using CSS logical properties. */
  73. border-top: solid 2px var(--color--gray-80);
  74. }
  75. &:last-child {
  76. margin-block-end: 0;
  77. }
  78. @media (--lg) {
  79. margin-block-end: var(--sp3);
  80. }
  81. }

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