dropbutton.base.css

Base styles for dropbuttons.

File

drupal/core/misc/dropbutton/dropbutton.base.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. -moz-box-sizing: border-box;
  11. -webkit-box-sizing: border-box;
  12. box-sizing: border-box;
  13. }
  14. .js .dropbutton-wrapper {
  15. display: block;
  16. min-height: 2em;
  17. position: relative;
  18. }
  19. .js .dropbutton-wrapper,
  20. .js .dropbutton-widget {
  21. max-width: 100%;
  22. }
  23. .js .dropbutton-widget {
  24. position: absolute;
  25. }
  26. /* UL styles are over-scoped in core, so this selector needs weight parity. */
  27. .js .dropbutton-widget .dropbutton {
  28. list-style-image: none;
  29. list-style-type: none;
  30. margin: 0;
  31. overflow: hidden;
  32. padding: 0;
  33. }
  34. .js .dropbutton li,
  35. .js .dropbutton a {
  36. display: block;
  37. }
  38. /**
  39. * The dropbutton styling.
  40. *
  41. * A dropbutton is a widget that displays a list of action links as a button
  42. * with a primary action. Secondary actions are hidden behind a click on a
  43. * twisty arrow.
  44. *
  45. * The arrow is created using border on a zero-width, zero-height span.
  46. * The arrow inherits the link color, but can be overridden with border colors.
  47. */
  48. .js .dropbutton-multiple .dropbutton-widget {
  49. padding-right: 2em; /* LTR */
  50. }
  51. .dropbutton-multiple.open,
  52. .dropbutton-multiple.open .dropbutton-widget {
  53. max-width: none;
  54. }
  55. .dropbutton-multiple.open {
  56. z-index: 100;
  57. }
  58. .dropbutton-multiple .dropbutton .secondary-action {
  59. display: none;
  60. }
  61. .dropbutton-multiple.open .dropbutton .secondary-action {
  62. display: block;
  63. }
  64. .dropbutton-toggle {
  65. bottom: 0;
  66. display: block;
  67. position: absolute;
  68. right: 0; /* LTR */
  69. text-indent: 110%;
  70. top: 0;
  71. white-space: nowrap;
  72. width: 2em;
  73. }
  74. .dropbutton-toggle button {
  75. background: none;
  76. border: 0;
  77. cursor: pointer;
  78. display: block;
  79. height: 100%;
  80. margin: 0;
  81. padding: 0;
  82. width: 100%;
  83. }
  84. .dropbutton-arrow {
  85. border-bottom-color: transparent;
  86. border-left-color: transparent;
  87. border-right-color: transparent;
  88. border-style: solid;
  89. border-width: 0.3333em 0.3333em 0;
  90. display: block;
  91. height: 0;
  92. line-height: 0;
  93. position: absolute;
  94. right: 40%; /* 0.6667em; */ /* LTR */
  95. top: 50%;
  96. margin-top: -0.1666em;
  97. width: 0;
  98. overflow: hidden;
  99. }
  100. .dropbutton-multiple.open .dropbutton-arrow {
  101. border-bottom: 0.3333em solid;
  102. border-top-color: transparent;
  103. top: 0.6667em;
  104. }