dropbutton.css

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/css/classy/components/dropbutton.css
  2. 11.x core/misc/dialog/off-canvas/css/dropbutton.css
  3. 11.x core/themes/olivero/css/components/dropbutton.css
  4. 11.x core/themes/stable9/css/core/dropbutton/dropbutton.css
  5. 11.x core/themes/claro/css/components/dropbutton.css
  6. 11.x core/themes/starterkit_theme/css/components/dropbutton.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/components/dropbutton.css
  2. 9 core/misc/dropbutton/dropbutton.css
  3. 9 core/themes/olivero/css/components/dropbutton.css
  4. 9 core/themes/stable9/css/core/dropbutton/dropbutton.css
  5. 9 core/themes/seven/css/classy/components/dropbutton.css
  6. 9 core/themes/claro/css/components/dropbutton.css
  7. 9 core/themes/bartik/css/classy/components/dropbutton.css
  8. 9 core/themes/stable/css/core/dropbutton/dropbutton.css
  9. 9 core/themes/starterkit_theme/css/components/dropbutton.css
  10. 9 core/themes/classy/css/components/dropbutton.css
  11. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/dropbutton.css
  12. 8.9.x core/misc/dropbutton/dropbutton.css
  13. 8.9.x core/themes/seven/css/classy/components/dropbutton.css
  14. 8.9.x core/themes/claro/css/components/dropbutton.css
  15. 8.9.x core/themes/bartik/css/classy/components/dropbutton.css
  16. 8.9.x core/themes/stable/css/core/dropbutton/dropbutton.css
  17. 8.9.x core/themes/classy/css/components/dropbutton.css
  18. 10 core/profiles/demo_umami/themes/umami/css/classy/components/dropbutton.css
  19. 10 core/misc/dialog/off-canvas/css/dropbutton.css
  20. 10 core/misc/dropbutton/dropbutton.css
  21. 10 core/themes/olivero/css/components/dropbutton.css
  22. 10 core/themes/stable9/css/core/dropbutton/dropbutton.css
  23. 10 core/themes/claro/css/components/dropbutton.css
  24. 10 core/themes/starterkit_theme/css/components/dropbutton.css

Base styles for dropbuttons.

File

core/misc/dropbutton/dropbutton.css

View source
  1. /**
  2. * @file
  3. * Base styles for dropbuttons.
  4. */
  5. /**
  6. * When a dropbutton has only one option, it is simply a button.
  7. */
  8. .dropbutton-wrapper,
  9. .dropbutton-wrapper div {
  10. box-sizing: border-box;
  11. }
  12. .js .dropbutton-wrapper,
  13. .js .dropbutton-widget {
  14. position: relative;
  15. display: block;
  16. }
  17. @media screen and (max-width: 600px) {
  18. .js .dropbutton-wrapper {
  19. width: 100%;
  20. }
  21. }
  22. /* Splitbuttons */
  23. @media screen and (min-width: 600px) {
  24. .form-actions .dropbutton-wrapper {
  25. float: left; /* LTR */
  26. }
  27. [dir="rtl"] .form-actions .dropbutton-wrapper {
  28. float: right;
  29. }
  30. }
  31. .js .form-actions .dropbutton-widget {
  32. position: static;
  33. }
  34. .js td .dropbutton-multiple .dropbutton-widget {
  35. position: absolute;
  36. }
  37. .js td .dropbutton-wrapper {
  38. min-height: 2em;
  39. }
  40. .js td .dropbutton-multiple {
  41. max-width: 100%;
  42. margin-right: 2em; /* LTR */
  43. padding-right: 10em; /* LTR */
  44. }
  45. [dir="rtl"].js td .dropbutton-multiple {
  46. margin-right: 0;
  47. margin-left: 2em;
  48. padding-right: 0;
  49. padding-left: 10em;
  50. }
  51. .js td .dropbutton-multiple .dropbutton-action a,
  52. .js td .dropbutton-multiple .dropbutton-action input,
  53. .js td .dropbutton-multiple .dropbutton-action button {
  54. width: auto;
  55. }
  56. /* UL styles are over-scoped in core, so this selector needs weight parity. */
  57. .js .dropbutton-widget .dropbutton {
  58. overflow: hidden;
  59. margin: 0;
  60. padding: 0;
  61. list-style-type: none;
  62. list-style-image: none;
  63. }
  64. .js .dropbutton li,
  65. .js .dropbutton a {
  66. display: block;
  67. outline: none;
  68. }
  69. .js .dropbutton li:hover,
  70. .js .dropbutton li:focus,
  71. .js .dropbutton a:hover,
  72. .js .dropbutton a:focus {
  73. outline: initial;
  74. }
  75. /**
  76. * The dropbutton styling.
  77. *
  78. * A dropbutton is a widget that displays a list of action links as a button
  79. * with a primary action. Secondary actions are hidden behind a click on a
  80. * twisty arrow.
  81. *
  82. * The arrow is created using border on a zero-width, zero-height span.
  83. * The arrow inherits the link color, but can be overridden with border colors.
  84. */
  85. .js .dropbutton-multiple .dropbutton-widget {
  86. padding-right: 2em; /* LTR */
  87. }
  88. .js[dir="rtl"] .dropbutton-multiple .dropbutton-widget {
  89. padding-right: 0;
  90. padding-left: 2em;
  91. }
  92. .dropbutton-multiple.open,
  93. .dropbutton-multiple.open .dropbutton-widget {
  94. max-width: none;
  95. }
  96. .dropbutton-multiple.open {
  97. z-index: 100;
  98. }
  99. .dropbutton-multiple .dropbutton .secondary-action {
  100. display: none;
  101. }
  102. .dropbutton-multiple.open .dropbutton .secondary-action {
  103. display: block;
  104. }
  105. .dropbutton-toggle {
  106. position: absolute;
  107. top: 0;
  108. right: 0; /* LTR */
  109. bottom: 0;
  110. display: block;
  111. width: 2em;
  112. white-space: nowrap;
  113. text-indent: 110%;
  114. }
  115. [dir="rtl"] .dropbutton-toggle {
  116. right: auto;
  117. left: 0;
  118. }
  119. .dropbutton-toggle button {
  120. display: block;
  121. width: 100%;
  122. height: 100%;
  123. margin: 0;
  124. padding: 0;
  125. cursor: pointer;
  126. border: 0;
  127. background: none;
  128. }
  129. .dropbutton-toggle button:hover,
  130. .dropbutton-toggle button:focus {
  131. outline: initial;
  132. }
  133. .dropbutton-arrow {
  134. position: absolute;
  135. top: 50%;
  136. right: 40%; /* 0.6667em; */ /* LTR */
  137. display: block;
  138. overflow: hidden;
  139. width: 0;
  140. height: 0;
  141. margin-top: -0.1666em;
  142. border-width: 0.3333em 0.3333em 0;
  143. border-style: solid;
  144. border-right-color: transparent;
  145. border-bottom-color: transparent;
  146. border-left-color: transparent;
  147. line-height: 0;
  148. }
  149. [dir="rtl"] .dropbutton-arrow {
  150. right: auto;
  151. left: 0.6667em;
  152. }
  153. .dropbutton-multiple.open .dropbutton-arrow {
  154. top: 0.6667em;
  155. border-top-color: transparent;
  156. border-bottom: 0.3333em solid;
  157. }

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