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. -webkit-appearance: none;
  8. -moz-appearance: none;
  9. display: block;
  10. position: static;
  11. transition: none;
  12. }
  13. #drupal-off-canvas .dropbutton-widget {
  14. margin: 0;
  15. padding: 0;
  16. border: 0;
  17. background: #277abd;
  18. border-radius: 1em;
  19. font-weight: 600;
  20. color: #fff;
  21. text-transform: none;
  22. text-decoration: none;
  23. text-align: center;
  24. line-height: normal;
  25. cursor: pointer;
  26. transition: background 0.5s ease;
  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. padding: 0;
  36. /* Overlap icon for trigger. */
  37. margin-top: -2em;
  38. height: 2.2em;
  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. margin: 0;
  50. overflow: hidden;
  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. background: transparent;
  67. color: #333;
  68. outline: none;
  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. color: #fff;
  93. text-indent: 110%;
  94. white-space: nowrap;
  95. }
  96. #drupal-off-canvas .dropbutton-toggle button {
  97. display: block;
  98. height: 100%;
  99. width: 100%;
  100. margin: 0;
  101. padding: 0;
  102. border: 0 solid transparent;
  103. border-bottom-right-radius: 1em; /* LTR */
  104. border-top-right-radius: 1em; /* LTR */
  105. cursor: pointer;
  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. height: 0;
  116. width: 0;
  117. margin-top: 0;
  118. border-bottom-color: transparent;
  119. border-left-color: transparent;
  120. border-right-color: transparent;
  121. border-style: solid;
  122. border-width: 0.3333em 0.3333em 0;
  123. color: #fff;
  124. line-height: 0;
  125. overflow: hidden;
  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. padding-right: 0;
  150. padding-left: 0;
  151. margin-right: 0;
  152. margin-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. float: right; /* LTR */
  176. padding-right: 0;
  177. margin-right: 0;
  178. max-width: initial;
  179. min-width: initial;
  180. position: relative;
  181. }
  182. #drupal-off-canvas td .dropbutton-widget .dropbutton {
  183. margin: 0;
  184. width: 2em;
  185. height: 2em;
  186. overflow: hidden;
  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. margin-left: 0;
  198. width: auto;
  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. color: transparent;
  219. z-index: 1;
  220. }
  221. /* Put pencil icon in place of hidden 'edit' text on single buttons. */
  222. #drupal-off-canvas td .dropbutton-single .edit:before {
  223. content: '.';
  224. display: block;
  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. width: auto;
  242. height: auto;
  243. max-width: none;
  244. min-width: 0;
  245. padding: 0;
  246. overflow: visible;
  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-left: 1em;
  258. padding-right: inherit;
  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. border-bottom: 0.3333em solid;
  266. border-top-color: transparent;
  267. top: 2px;
  268. }