Chris@0: /** Chris@0: * @file Chris@0: * Styles for dropbuttons in the off-canvas dialog. Chris@0: */ Chris@0: Chris@0: #drupal-off-canvas .dropbutton-wrapper, Chris@0: #drupal-off-canvas .dropbutton-widget { Chris@0: -webkit-appearance: none; Chris@0: -moz-appearance: none; Chris@0: display: block; Chris@0: position: static; Chris@0: transition: none; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-widget { Chris@0: margin: 0; Chris@0: padding: 0; Chris@0: border: 0; Chris@0: background: #277abd; Chris@0: border-radius: 1em; Chris@0: font-weight: 600; Chris@0: color: #fff; Chris@0: text-transform: none; Chris@0: text-decoration: none; Chris@0: text-align: center; Chris@0: line-height: normal; Chris@0: cursor: pointer; Chris@0: transition: background 0.5s ease; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-widget:hover { Chris@0: background: #2b8bd8; Chris@0: } Chris@0: Chris@0: /* Chris@0: * Style dropbutton single. Chris@0: */ Chris@0: Chris@0: #drupal-off-canvas .dropbutton-single .dropbutton-action a { Chris@0: padding: 0; Chris@0: /* Overlap icon for trigger. */ Chris@0: margin-top: -2em; Chris@0: height: 2.2em; Chris@0: cursor: pointer; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-single .dropbutton-action:hover, Chris@0: #drupal-off-canvas .dropbutton-single .dropbutton-action:focus, Chris@0: #drupal-off-canvas .dropbutton-single .dropbutton-action a:hover, Chris@0: #drupal-off-canvas .dropbutton-single .dropbutton-action a:focus { Chris@0: text-decoration: none; Chris@0: outline: none; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-widget .dropbutton { Chris@0: margin: 0; Chris@0: overflow: hidden; Chris@0: padding: 0; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton li, Chris@0: #drupal-off-canvas .dropbutton a { Chris@0: display: block; Chris@0: width: auto; Chris@0: padding: 4px 0; Chris@0: text-align: left; Chris@0: color: #555; Chris@0: outline: none; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton li:hover, Chris@0: #drupal-off-canvas .dropbutton li:focus, Chris@0: #drupal-off-canvas .dropbutton a:hover, Chris@0: #drupal-off-canvas .dropbutton a:focus { Chris@0: background: transparent; Chris@0: color: #333; Chris@0: outline: none; Chris@0: } Chris@0: Chris@0: /* Chris@0: * Style dropbutton multiple. Chris@0: */ Chris@0: Chris@0: #drupal-off-canvas .dropbutton-multiple .dropbutton-widget { Chris@0: width: 2em; Chris@0: height: 2em; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-multiple .dropbutton-widget:hover { Chris@0: background-color: #2b8bd8; Chris@0: } Chris@0: Chris@0: /* Hide the other actions until the dropbutton is triggered. */ Chris@0: #drupal-off-canvas .dropbutton-multiple .dropbutton .secondary-action { Chris@0: display: none; Chris@0: } Chris@0: Chris@0: /* The toggle to expand the button. */ Chris@0: #drupal-off-canvas .dropbutton-toggle { Chris@0: position: absolute; Chris@0: top: 0; Chris@0: right: 0; /* LTR */ Chris@0: bottom: 0; Chris@0: display: block; Chris@0: width: 2em; Chris@0: color: #fff; Chris@0: text-indent: 110%; Chris@0: white-space: nowrap; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-toggle button { Chris@0: display: block; Chris@0: height: 100%; Chris@0: width: 100%; Chris@0: margin: 0; Chris@0: padding: 0; Chris@0: border: 0 solid transparent; Chris@0: border-bottom-right-radius: 1em; /* LTR */ Chris@0: border-top-right-radius: 1em; /* LTR */ Chris@0: cursor: pointer; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-toggle button:hover, Chris@0: #drupal-off-canvas .dropbutton-toggle button:focus { Chris@0: outline: none; Chris@0: } Chris@0: Chris@0: /* The toggle arrow. */ Chris@0: #drupal-off-canvas .dropbutton-arrow { Chris@0: position: absolute; Chris@0: display: block; Chris@0: height: 0; Chris@0: width: 0; Chris@0: margin-top: 0; Chris@0: border-bottom-color: transparent; Chris@0: border-left-color: transparent; Chris@0: border-right-color: transparent; Chris@0: border-style: solid; Chris@0: border-width: 0.3333em 0.3333em 0; Chris@0: color: #fff; Chris@0: line-height: 0; Chris@0: overflow: hidden; Chris@0: } Chris@0: #drupal-off-canvas span.dropbutton-arrow { Chris@0: top: 7px; Chris@0: right: 7px; /* LTR */ Chris@0: background: transparent; Chris@0: } Chris@0: #drupal-off-canvas span.dropbutton-arrow:hover { Chris@0: background: transparent; Chris@0: } Chris@0: Chris@0: #drupal-off-canvas .dropbutton-action > .js-form-submit.form-submit, Chris@0: #drupal-off-canvas .dropbutton-toggle button { Chris@0: position: relative; Chris@0: text-shadow: none; Chris@0: } Chris@0: Chris@0: /* Chris@0: * Dropbuttons when in a table cell. Chris@0: */ Chris@0: Chris@0: /* Make sure table cell doesn't collapse around absolute positioned dropbutton. */ Chris@0: #drupal-off-canvas td .dropbutton-single { Chris@0: min-width: 2em; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-multiple { Chris@0: min-width: 2em; Chris@0: padding-right: 0; Chris@0: padding-left: 0; Chris@0: margin-right: 0; Chris@0: margin-left: 0; Chris@0: border: 0; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-multiple .dropbutton-action a, Chris@0: #drupal-off-canvas td .dropbutton-multiple .dropbutton-action input, Chris@0: #drupal-off-canvas td .dropbutton-multiple .dropbutton-action button { Chris@0: width: auto; Chris@0: padding: 0; Chris@0: font-size: inherit; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-wrapper { Chris@0: margin-bottom: 0; Chris@0: } Chris@0: Chris@0: /* Push the widget to the right so text expands left. */ Chris@0: #drupal-off-canvas td .dropbutton-widget { Chris@0: position: absolute; Chris@0: right: 12px; /* LTR */ Chris@0: padding: 0; Chris@0: background: #277abd none; Chris@0: } Chris@0: Chris@0: /* Push the wrapper to the right edge of the td. */ Chris@0: #drupal-off-canvas td .dropbutton-single, Chris@0: #drupal-off-canvas td .dropbutton-multiple { Chris@0: float: right; /* LTR */ Chris@0: padding-right: 0; Chris@0: margin-right: 0; Chris@0: max-width: initial; Chris@0: min-width: initial; Chris@0: position: relative; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-widget .dropbutton { Chris@0: margin: 0; Chris@0: width: 2em; Chris@0: height: 2em; Chris@0: overflow: hidden; Chris@0: background: transparent; Chris@0: } Chris@0: Chris@0: /* Push text out of the way. */ Chris@0: #drupal-off-canvas td .dropbutton-multiple li, Chris@0: #drupal-off-canvas td .dropbutton-multiple a { Chris@0: margin-left: -9999px; Chris@0: background: transparent; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-multiple.open .dropbutton li, Chris@0: #drupal-off-canvas td .dropbutton-multiple.open .dropbutton a { Chris@0: margin-left: 0; Chris@0: width: auto; Chris@0: color: #fff; Chris@0: } Chris@0: Chris@0: /* Collapse the button to a circle. */ Chris@0: #drupal-off-canvas td .dropbutton-toggle { Chris@0: width: 2em; Chris@0: height: 2em; Chris@0: border-radius: 1em; Chris@0: } Chris@0: #drupal-off-canvas td .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button { Chris@0: border: 0; Chris@0: background: transparent; Chris@0: } Chris@0: Chris@0: /* Prevent list item from expanding its container. */ Chris@0: #drupal-off-canvas td ul.dropbutton li.edit { Chris@0: width: 2em; Chris@0: height: 2em; Chris@0: } Chris@0: Chris@0: /* Make li text transparent above icon so it's clickable. */ Chris@0: #drupal-off-canvas td .dropbutton-single li.edit.dropbutton-action > a { Chris@0: color: transparent; Chris@0: z-index: 1; Chris@0: } Chris@0: Chris@0: /* Put pencil icon in place of hidden 'edit' text on single buttons. */ Chris@0: #drupal-off-canvas td .dropbutton-single .edit:before { Chris@0: content: '.'; Chris@0: display: block; Chris@0: color: transparent; Chris@0: background: transparent url(../icons/ffffff/pencil.svg) no-repeat center; Chris@0: background-size: 14px; Chris@0: } Chris@0: Chris@0: /* Dropbutton when triggered expands to show secondary items. */ Chris@0: #drupal-off-canvas .dropbutton-multiple.open { Chris@0: z-index: 100; Chris@0: } Chris@0: Chris@0: /* Create visual separation if there is an adjacent button. */ Chris@0: #drupal-off-canvas .dropbutton-multiple.open .dropbutton-widget { Chris@0: box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.5); Chris@0: } Chris@0: Chris@0: /* Triggered dropbutton expands to show secondary items. */ Chris@0: #drupal-off-canvas .dropbutton-multiple.open, Chris@0: #drupal-off-canvas .dropbutton-multiple.open .dropbutton-widget { Chris@0: display: block; Chris@0: width: auto; Chris@0: height: auto; Chris@0: max-width: none; Chris@0: min-width: 0; Chris@0: padding: 0; Chris@0: overflow: visible; Chris@0: } Chris@0: Chris@0: /* Triggered dropbutton in td expands to show secondary items. */ Chris@0: #drupal-off-canvas td .dropbutton-multiple.open .dropbutton, Chris@0: #drupal-off-canvas .dropbutton-multiple.open .dropbutton .secondary-action { Chris@0: display: block; Chris@0: width: auto; Chris@0: height: auto; Chris@0: padding-right: 1em; /* LTR */ Chris@0: } Chris@0: [dir="rtl"] #drupal-off-canvas td .dropbutton-multiple.open .dropbutton { Chris@0: padding-left: 1em; Chris@0: padding-right: inherit; Chris@0: } Chris@0: #drupal-off-canvas .dropbutton-multiple.open .dropbutton li a { Chris@0: padding: 2px 1em; Chris@0: } Chris@0: Chris@0: /* When open, the toggle arrow points upward. */ Chris@0: #drupal-off-canvas .dropbutton-multiple.open span.dropbutton-arrow { Chris@0: border-bottom: 0.3333em solid; Chris@0: border-top-color: transparent; Chris@0: top: 2px; Chris@0: }