You are here

dropbutton.css in Drupal 9

Dropbutton styles.

File

core/themes/olivero/css/components/dropbutton.css
View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Dropbutton styles.
  10. */
  11. .dropbutton-wrapper.open {
  12. position: relative;
  13. z-index: 100; /* Ensure this appears above all other dropbuttons. */
  14. filter: drop-shadow(0 2px 2px #e3e3e5);
  15. }
  16. [dir="ltr"] .dropbutton-widget {
  17. padding-right: 1.6875rem;
  18. }
  19. [dir="rtl"] .dropbutton-widget {
  20. padding-left: 1.6875rem;
  21. }
  22. .dropbutton-widget {
  23. position: relative;
  24. width: 12.5rem;
  25. height: 1.6875rem;
  26. border-radius: 0.1875rem
  27. }
  28. @supports ((width: -webkit-max-content) or (width: max-content)) {
  29. .dropbutton-widget {
  30. width: -webkit-max-content;
  31. width: max-content
  32. }
  33. }
  34. [dir="ltr"] .dropbutton-single .dropbutton-widget {
  35. padding-right: 0;
  36. }
  37. [dir="rtl"] .dropbutton-single .dropbutton-widget {
  38. padding-left: 0;
  39. }
  40. [dir="ltr"] .dropbutton {
  41. margin-left: 0;
  42. }
  43. [dir="rtl"] .dropbutton {
  44. margin-right: 0;
  45. }
  46. [dir="ltr"] .dropbutton {
  47. padding-left: 0;
  48. }
  49. [dir="rtl"] .dropbutton {
  50. padding-right: 0;
  51. }
  52. .dropbutton {
  53. height: 1.6875rem;
  54. margin-top: 0;
  55. margin-bottom: 0;
  56. list-style: none;
  57. font-size: 0.875rem;
  58. }
  59. [dir="ltr"] .dropbutton-toggle button {
  60. right: 0;
  61. }
  62. [dir="rtl"] .dropbutton-toggle button {
  63. left: 0;
  64. }
  65. .dropbutton-toggle button {
  66. position: absolute;
  67. top: 0;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. width: 1.6875rem;
  72. height: 1.6875rem;
  73. padding: 0;
  74. cursor: pointer;
  75. border-color: transparent;
  76. border-radius: 0 0.1875rem 0.1875rem 0; /* LTR */
  77. background: #e3e3e5
  78. }
  79. .dropbutton-toggle button:focus {
  80. outline: solid 2px #0d77b5;
  81. outline-offset: -2px;
  82. }
  83. .dropbutton-toggle button:before {
  84. display: block;
  85. width: 0.5625rem;
  86. height: 0.5625rem;
  87. content: "";
  88. transform: translateY(-25%) rotate(45deg);
  89. border-right: solid 2px #0d77b5;
  90. border-bottom: solid 2px #0d77b5;
  91. }
  92. [dir="rtl"] .dropbutton-toggle button {
  93. border-radius: 0.1875rem 0 0 0.1875rem;
  94. }
  95. [dir="ltr"] .dropbutton-action:first-child {
  96. margin-right: 2px;
  97. }
  98. [dir="rtl"] .dropbutton-action:first-child {
  99. margin-left: 2px;
  100. }
  101. .dropbutton-action:first-child {
  102. border: solid 1px transparent;
  103. border-radius: 0.1875rem 0 0 0.1875rem; /* LTR */
  104. background: #e3e3e5;
  105. }
  106. .dropbutton-action a {
  107. display: flex;
  108. align-items: center;
  109. margin-bottom: -2px; /* Account for borders. */
  110. padding: 0 0.5625rem;
  111. text-decoration: none;
  112. color: #313637;
  113. font-weight: 600
  114. }
  115. .dropbutton-action a:focus {
  116. border: solid 2px #0d77b5;
  117. outline: 0
  118. /* Negate specific IE rules. */
  119. }
  120. @supports (outline-offset: -2px) {
  121. .dropbutton-action a:focus {
  122. border: 0;
  123. outline: solid 2px #0d77b5;
  124. outline-offset: -1px /* Overlap parent container by 1px. */
  125. }
  126. }
  127. .dropbutton-single .dropbutton-action:first-child {
  128. border-right: solid 1px transparent; /* LTR */
  129. border-radius: 0.1875rem;
  130. }
  131. .dropbutton-single .dropbutton-action a {
  132. justify-content: center;
  133. }
  134. [dir="rtl"] .dropbutton-action:first-child {
  135. border: solid 1px transparent;
  136. border-radius: 0 0.1875rem 0.1875rem 0;
  137. }
  138. [dir="rtl"] .dropbutton-single .dropbutton-action:first-child {
  139. border: solid 1px transparent;
  140. }
  141. .secondary-action {
  142. visibility: hidden;
  143. width: calc(100% + 1.6875rem);
  144. border-right: 1px solid #e3e3e5;
  145. border-left: 1px solid #e3e3e5;
  146. background: #fff
  147. }
  148. .secondary-action:last-child {
  149. border-bottom: 1px solid #e3e3e5;
  150. }
  151. .dropbutton-wrapper.open .dropbutton-toggle button:before {
  152. transform: translateY(25%) rotate(225deg);
  153. }
  154. .dropbutton-wrapper.open .dropbutton-widget {
  155. border-radius: 0.1875rem 0.1875rem 0 0;
  156. }
  157. .dropbutton-wrapper.open .secondary-action {
  158. visibility: visible;
  159. }