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