annotate core/misc/dialog/off-canvas.dropbutton.css @ 19:fa3358dc1485 tip

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