details.pcss.css

Same filename in this branch
  1. 10 core/themes/olivero/css/components/details.pcss.css
  2. 10 core/themes/claro/css/components/details.pcss.css
Same filename in other branches
  1. 9 core/themes/olivero/css/components/details.pcss.css
  2. 9 core/themes/claro/css/components/details.pcss.css
  3. 8.9.x core/themes/claro/css/components/details.pcss.css
  4. 11.x core/misc/dialog/off-canvas/css/details.pcss.css
  5. 11.x core/themes/olivero/css/components/details.pcss.css
  6. 11.x core/themes/claro/css/components/details.pcss.css

Visual styling for summary and details in the off-canvas dialog.

@internal

File

core/misc/dialog/off-canvas/css/details.pcss.css

View source
  1. /**
  2. * @file
  3. * Visual styling for summary and details in the off-canvas dialog.
  4. *
  5. * @internal
  6. */
  7. #drupal-off-canvas-wrapper {
  8. --off-canvas-details-border-width: 0;
  9. --off-canvas-details-border-color: none;
  10. --off-canvas-details-background-color: #474747;
  11. --off-canvas-details-text-color: #ddd;
  12. --off-canvas-details-summary-border: none;
  13. --off-canvas-details-summary-padding: 10px 20px;
  14. --off-canvas-details-summary-font-size: 14px;
  15. --off-canvas-details-summary-background-color: #333;
  16. --off-canvas-details-summary-background-color-hover: #222;
  17. --off-canvas-details-summary-text-color: #eee;
  18. --off-canvas-details-summary-text-color-hover: #fff;
  19. & details {
  20. margin: var(--off-canvas-vertical-spacing-unit) calc(-1 * var(--off-canvas-padding)); /* Cancel out the padding of the parent. */
  21. padding: 0 var(--off-canvas-padding);
  22. color: var(--off-canvas-details-text-color);
  23. border: solid var(--off-canvas-details-border-color) var(--off-canvas-details-border-width);
  24. background: var(--off-canvas-details-background-color);
  25. & + details {
  26. margin-top: calc(-1 * var(--off-canvas-details-border-width));
  27. }
  28. }
  29. & summary {
  30. margin: 0 calc(-1 * var(--off-canvas-padding));
  31. padding: var(--off-canvas-details-summary-padding);
  32. color: var(--off-canvas-details-summary-text-color);
  33. border: var(--off-canvas-details-summary-border);
  34. background-color: var(--off-canvas-details-summary-background-color);
  35. font-size: var(--off-canvas-details-summary-font-size);
  36. &:hover {
  37. color: var(--off-canvas-details-summary-text-color-hover);
  38. background-color: var(--off-canvas-details-summary-background-color-hover);
  39. }
  40. &:focus {
  41. outline-offset: -4px; /* Ensure focus doesn't get cut off. */
  42. }
  43. & a {
  44. color: var(--off-canvas-details-text-color);
  45. &:hover {
  46. color: var(--off-canvas-details-summary-text-color-hover);
  47. }
  48. }
  49. }
  50. & .details-wrapper {
  51. padding: var(--off-canvas-vertical-spacing-unit) 0;
  52. }
  53. }

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