off-canvas.dropbutton.css 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. /**
  2. * @file
  3. * Styles for dropbuttons in the off-canvas dialog.
  4. */
  5. #drupal-off-canvas .dropbutton-wrapper,
  6. #drupal-off-canvas .dropbutton-widget {
  7. position: static;
  8. display: block;
  9. transition: none;
  10. -webkit-appearance: none;
  11. -moz-appearance: none;
  12. }
  13. #drupal-off-canvas .dropbutton-widget {
  14. margin: 0;
  15. padding: 0;
  16. cursor: pointer;
  17. transition: background 0.5s ease;
  18. text-align: center;
  19. text-decoration: none;
  20. text-transform: none;
  21. color: #fff;
  22. border: 0;
  23. border-radius: 1em;
  24. background: #277abd;
  25. font-weight: 600;
  26. line-height: normal;
  27. }
  28. #drupal-off-canvas .dropbutton-widget:hover {
  29. background: #2b8bd8;
  30. }
  31. /*
  32. * Style dropbutton single.
  33. */
  34. #drupal-off-canvas .dropbutton-single .dropbutton-action a {
  35. height: 2.2em;
  36. /* Overlap icon for trigger. */
  37. margin-top: -2em;
  38. padding: 0;
  39. cursor: pointer;
  40. }
  41. #drupal-off-canvas .dropbutton-single .dropbutton-action:hover,
  42. #drupal-off-canvas .dropbutton-single .dropbutton-action:focus,
  43. #drupal-off-canvas .dropbutton-single .dropbutton-action a:hover,
  44. #drupal-off-canvas .dropbutton-single .dropbutton-action a:focus {
  45. text-decoration: none;
  46. outline: none;
  47. }
  48. #drupal-off-canvas .dropbutton-widget .dropbutton {
  49. overflow: hidden;
  50. margin: 0;
  51. padding: 0;
  52. }
  53. #drupal-off-canvas .dropbutton li,
  54. #drupal-off-canvas .dropbutton a {
  55. display: block;
  56. width: auto;
  57. padding: 4px 0;
  58. text-align: left;
  59. color: #555;
  60. outline: none;
  61. }
  62. #drupal-off-canvas .dropbutton li:hover,
  63. #drupal-off-canvas .dropbutton li:focus,
  64. #drupal-off-canvas .dropbutton a:hover,
  65. #drupal-off-canvas .dropbutton a:focus {
  66. color: #333;
  67. outline: none;
  68. background: transparent;
  69. }
  70. /*
  71. * Style dropbutton multiple.
  72. */
  73. #drupal-off-canvas .dropbutton-multiple .dropbutton-widget {
  74. width: 2em;
  75. height: 2em;
  76. }
  77. #drupal-off-canvas .dropbutton-multiple .dropbutton-widget:hover {
  78. background-color: #2b8bd8;
  79. }
  80. /* Hide the other actions until the dropbutton is triggered. */
  81. #drupal-off-canvas .dropbutton-multiple .dropbutton .secondary-action {
  82. display: none;
  83. }
  84. /* The toggle to expand the button. */
  85. #drupal-off-canvas .dropbutton-toggle {
  86. position: absolute;
  87. top: 0;
  88. right: 0; /* LTR */
  89. bottom: 0;
  90. display: block;
  91. width: 2em;
  92. white-space: nowrap;
  93. text-indent: 110%;
  94. color: #fff;
  95. }
  96. #drupal-off-canvas .dropbutton-toggle button {
  97. display: block;
  98. width: 100%;
  99. height: 100%;
  100. margin: 0;
  101. padding: 0;
  102. cursor: pointer;
  103. border: 0 solid transparent;
  104. border-top-right-radius: 1em; /* LTR */
  105. border-bottom-right-radius: 1em; /* LTR */
  106. }
  107. #drupal-off-canvas .dropbutton-toggle button:hover,
  108. #drupal-off-canvas .dropbutton-toggle button:focus {
  109. outline: none;
  110. }
  111. /* The toggle arrow. */
  112. #drupal-off-canvas .dropbutton-arrow {
  113. position: absolute;
  114. display: block;
  115. overflow: hidden;
  116. width: 0;
  117. height: 0;
  118. margin-top: 0;
  119. color: #fff;
  120. border-width: 0.3333em 0.3333em 0;
  121. border-style: solid;
  122. border-right-color: transparent;
  123. border-bottom-color: transparent;
  124. border-left-color: transparent;
  125. line-height: 0;
  126. }
  127. #drupal-off-canvas span.dropbutton-arrow {
  128. top: 7px;
  129. right: 7px; /* LTR */
  130. background: transparent;
  131. }
  132. #drupal-off-canvas span.dropbutton-arrow:hover {
  133. background: transparent;
  134. }
  135. #drupal-off-canvas .dropbutton-action > .js-form-submit.form-submit,
  136. #drupal-off-canvas .dropbutton-toggle button {
  137. position: relative;
  138. text-shadow: none;
  139. }
  140. /*
  141. * Dropbuttons when in a table cell.
  142. */
  143. /* Make sure table cell doesn't collapse around absolute positioned dropbutton. */
  144. #drupal-off-canvas td .dropbutton-single {
  145. min-width: 2em;
  146. }
  147. #drupal-off-canvas td .dropbutton-multiple {
  148. min-width: 2em;
  149. margin-right: 0;
  150. margin-left: 0;
  151. padding-right: 0;
  152. padding-left: 0;
  153. border: 0;
  154. }
  155. #drupal-off-canvas td .dropbutton-multiple .dropbutton-action a,
  156. #drupal-off-canvas td .dropbutton-multiple .dropbutton-action input,
  157. #drupal-off-canvas td .dropbutton-multiple .dropbutton-action button {
  158. width: auto;
  159. padding: 0;
  160. font-size: inherit;
  161. }
  162. #drupal-off-canvas td .dropbutton-wrapper {
  163. margin-bottom: 0;
  164. }
  165. /* Push the widget to the right so text expands left. */
  166. #drupal-off-canvas td .dropbutton-widget {
  167. position: absolute;
  168. right: 12px; /* LTR */
  169. padding: 0;
  170. background: #277abd none;
  171. }
  172. /* Push the wrapper to the right edge of the td. */
  173. #drupal-off-canvas td .dropbutton-single,
  174. #drupal-off-canvas td .dropbutton-multiple {
  175. position: relative;
  176. float: right; /* LTR */
  177. min-width: initial;
  178. max-width: initial;
  179. margin-right: 0;
  180. padding-right: 0;
  181. }
  182. #drupal-off-canvas td .dropbutton-widget .dropbutton {
  183. overflow: hidden;
  184. width: 2em;
  185. height: 2em;
  186. margin: 0;
  187. background: transparent;
  188. }
  189. /* Push text out of the way. */
  190. #drupal-off-canvas td .dropbutton-multiple li,
  191. #drupal-off-canvas td .dropbutton-multiple a {
  192. margin-left: -9999px;
  193. background: transparent;
  194. }
  195. #drupal-off-canvas td .dropbutton-multiple.open .dropbutton li,
  196. #drupal-off-canvas td .dropbutton-multiple.open .dropbutton a {
  197. width: auto;
  198. margin-left: 0;
  199. color: #fff;
  200. }
  201. /* Collapse the button to a circle. */
  202. #drupal-off-canvas td .dropbutton-toggle {
  203. width: 2em;
  204. height: 2em;
  205. border-radius: 1em;
  206. }
  207. #drupal-off-canvas td .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  208. border: 0;
  209. background: transparent;
  210. }
  211. /* Prevent list item from expanding its container. */
  212. #drupal-off-canvas td ul.dropbutton li.edit {
  213. width: 2em;
  214. height: 2em;
  215. }
  216. /* Make li text transparent above icon so it's clickable. */
  217. #drupal-off-canvas td .dropbutton-single li.edit.dropbutton-action > a {
  218. z-index: 1;
  219. color: transparent;
  220. }
  221. /* Put pencil icon in place of hidden 'edit' text on single buttons. */
  222. #drupal-off-canvas td .dropbutton-single .edit:before {
  223. display: block;
  224. content: ".";
  225. color: transparent;
  226. background: transparent url(../icons/ffffff/pencil.svg) no-repeat center;
  227. background-size: 14px;
  228. }
  229. /* Dropbutton when triggered expands to show secondary items. */
  230. #drupal-off-canvas .dropbutton-multiple.open {
  231. z-index: 100;
  232. }
  233. /* Create visual separation if there is an adjacent button. */
  234. #drupal-off-canvas .dropbutton-multiple.open .dropbutton-widget {
  235. box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.5);
  236. }
  237. /* Triggered dropbutton expands to show secondary items. */
  238. #drupal-off-canvas .dropbutton-multiple.open,
  239. #drupal-off-canvas .dropbutton-multiple.open .dropbutton-widget {
  240. display: block;
  241. overflow: visible;
  242. width: auto;
  243. min-width: 0;
  244. max-width: none;
  245. height: auto;
  246. padding: 0;
  247. }
  248. /* Triggered dropbutton in td expands to show secondary items. */
  249. #drupal-off-canvas td .dropbutton-multiple.open .dropbutton,
  250. #drupal-off-canvas .dropbutton-multiple.open .dropbutton .secondary-action {
  251. display: block;
  252. width: auto;
  253. height: auto;
  254. padding-right: 1em; /* LTR */
  255. }
  256. [dir="rtl"] #drupal-off-canvas td .dropbutton-multiple.open .dropbutton {
  257. padding-right: inherit;
  258. padding-left: 1em;
  259. }
  260. #drupal-off-canvas .dropbutton-multiple.open .dropbutton li a {
  261. padding: 2px 1em;
  262. }
  263. /* When open, the toggle arrow points upward. */
  264. #drupal-off-canvas .dropbutton-multiple.open span.dropbutton-arrow {
  265. top: 2px;
  266. border-top-color: transparent;
  267. border-bottom: 0.3333em solid;
  268. }