views-exposed-form.pcss.css

Same filename in other branches
  1. 9 core/themes/claro/css/components/views-exposed-form.pcss.css
  2. 8.9.x core/themes/claro/css/components/views-exposed-form.pcss.css
  3. 11.x core/themes/claro/css/components/views-exposed-form.pcss.css

Visual styles for views exposed form.

File

core/themes/claro/css/components/views-exposed-form.pcss.css

View source
  1. /**
  2. * @file
  3. * Visual styles for views exposed form.
  4. */
  5. /**
  6. * Use flexbox and some margin resets to make the fields + actions go inline.
  7. *
  8. * For (at least) Media Library, this file is typically inserted by AJAX add_css
  9. * command when the dialog is opened. The AJAX add_css command always adds the
  10. * missing-but-required CSS assets to the beginning of the HTML . Because
  11. * of this, we cannot rely on the expected loading order of the CSS assets.
  12. * This is why we have to double these selectors: we have to get the expected
  13. * output even for the Media Library modal.
  14. *
  15. * @todo Remove double selectors after https://www.drupal.org/node/1461322
  16. * has been resolved.
  17. */
  18. .views-exposed-form {
  19. &.views-exposed-form {
  20. display: flex;
  21. flex-wrap: wrap;
  22. margin-block: var(--space-l);
  23. padding: var(--space-xs) var(--space-l) var(--space-l) var(--space-l);
  24. border: var(--details-border-size) solid var(--details-border-color);
  25. border-radius: var(--details-border-size-radius);
  26. background-color: var(--color-white);
  27. box-shadow: var(--details-box-shadow);
  28. }
  29. }
  30. .views-exposed-form--preview {
  31. &.views-exposed-form--preview {
  32. margin-top: 0;
  33. }
  34. }
  35. .views-exposed-form__item {
  36. &.views-exposed-form__item {
  37. max-width: 100%;
  38. margin-block: var(--space-s) 0;
  39. margin-inline: 0 var(--space-xs);
  40. }
  41. }
  42. .views-exposed-form__item--preceding-actions {
  43. &.views-exposed-form__item--preceding-actions {
  44. margin-inline-end: var(--space-m);
  45. }
  46. }
  47. .views-exposed-form__item--actions {
  48. &.views-exposed-form__item--actions .button {
  49. margin-block: 0;
  50. &:last-child {
  51. margin-inline-end: 0;
  52. }
  53. }
  54. }
  55. .views-exposed-form .form-item--no-label,
  56. .views-exposed-form__item.views-exposed-form__item.views-exposed-form__item--actions {
  57. /* Line height of a label + existing margin for the element + margin for label */
  58. margin-top: calc(var(--line-height-form-label) + var(--space-s) + var(--space-xs));
  59. }

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