Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

titlebar.pcss.css

Styling for the titlebar within the off-canvas dialog.

@internal

File

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

View source
  1. /**
  2. * @file
  3. * Styling for the titlebar within the off-canvas dialog.
  4. *
  5. * @internal
  6. */
  7. #drupal-off-canvas-wrapper {
  8. --off-canvas-title-padding: calc(3 * var(--off-canvas-vertical-spacing-unit));
  9. --off-canvas-title-background-color: #2d2d2d;
  10. --off-canvas-title-text-color: #fff;
  11. --off-canvas-title-font-size: 16px;
  12. & .ui-dialog-titlebar {
  13. position: relative;
  14. margin: 0 calc(-1 * var(--off-canvas-padding));
  15. padding: var(--off-canvas-title-padding) 50px;
  16. color: var(--off-canvas-title-text-color);
  17. background-color: var(--off-canvas-title-background-color);
  18. font-family: var(--off-canvas-title-font-family);
  19. font-size: var(--off-canvas-title-font-size);
  20. font-weight: bold;
  21. /* The pencil icon. */
  22. &::before {
  23. position: absolute;
  24. top: 0;
  25. inset-inline-start: 1em;
  26. display: block;
  27. width: 20px;
  28. height: 100%;
  29. content: "";
  30. background-color: currentColor;
  31. mask-image: url(../../../icons/ffffff/pencil.svg);
  32. mask-repeat: no-repeat;
  33. mask-size: contain;
  34. mask-position: center;
  35. @media (forced-colors: active) {
  36. background-color: canvastext;
  37. }
  38. }
  39. }
  40. /* Close button. */
  41. & .ui-dialog-titlebar-close {
  42. position: absolute;
  43. top: 50%;
  44. inset-inline: auto 10px;
  45. overflow: hidden;
  46. width: 30px;
  47. height: 30px;
  48. cursor: pointer;
  49. transform: translateY(-50%);
  50. text-indent: -9999px;
  51. color: inherit;
  52. border: 1px solid transparent;
  53. background-color: transparent;
  54. appearance: none;
  55. &:focus {
  56. outline: solid 2px currentColor;
  57. outline-offset: 2px;
  58. }
  59. /* The plus icon. */
  60. &::before,
  61. &::after {
  62. position: absolute;
  63. top: calc(50% - 1px);
  64. left: 50%;
  65. width: 50%;
  66. height: 0;
  67. content: "";
  68. border-top: solid 2px currentColor;
  69. }
  70. &::before {
  71. transform: translate(-50%, 50%) rotate(-45deg);
  72. }
  73. &::after {
  74. transform: translate(-50%, 50%) rotate(45deg);
  75. }
  76. /* Hide the default jQuery UI dialog close button. */
  77. & .ui-icon {
  78. display: none;
  79. }
  80. }
  81. }

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal