dropbutton.css

Base styles for dropbuttons.

File

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