2015-09-25 13:17:39 +00:00
|
|
|
.dropdown {
|
2022-02-04 11:57:55 +00:00
|
|
|
@include clearfix();
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
input[type='submit'],
|
|
|
|
|
input[type='reset'],
|
|
|
|
|
input[type='button'],
|
|
|
|
|
button,
|
|
|
|
|
.button {
|
|
|
|
|
padding: 0 5em 0 1em;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 3em;
|
|
|
|
|
line-height: 3em;
|
2022-03-15 13:21:06 +00:00
|
|
|
text-align: start;
|
2022-02-04 11:57:55 +00:00
|
|
|
float: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-secondary {
|
|
|
|
|
opacity: 0.8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input[type='submit'],
|
|
|
|
|
input[type='reset'],
|
|
|
|
|
input[type='button'],
|
|
|
|
|
button {
|
|
|
|
|
line-height: inherit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ul {
|
|
|
|
|
@include unlist();
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-default');
|
2022-02-04 11:57:55 +00:00
|
|
|
position: absolute;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
top: 100%;
|
2022-03-15 13:21:06 +00:00
|
|
|
inset-inline-start: -2000px;
|
2022-02-04 11:57:55 +00:00
|
|
|
z-index: 500;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
|
|
li {
|
|
|
|
|
float: none;
|
2022-07-09 06:32:51 +00:00
|
|
|
border-color: theme('colors.white-15');
|
2022-02-04 11:57:55 +00:00
|
|
|
border-style: solid;
|
|
|
|
|
border-width: 1px 0 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
a:focus,
|
|
|
|
|
button:focus {
|
2023-04-19 05:58:14 +00:00
|
|
|
border: 3px solid theme('colors.focus');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-06-27 10:31:52 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
// Media for Windows High Contrast
|
2023-04-19 05:58:14 +00:00
|
|
|
@media (forced-colors: active) {
|
2022-02-04 11:57:55 +00:00
|
|
|
li {
|
|
|
|
|
border-width: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
li:hover {
|
|
|
|
|
border-color: Highlight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
li a,
|
|
|
|
|
li button {
|
2023-04-19 05:58:14 +00:00
|
|
|
border-color: theme('colors.text-button');
|
|
|
|
|
color: theme('colors.text-button');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2020-06-18 12:13:31 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
li a:focus,
|
|
|
|
|
li button:focus {
|
2022-07-09 06:32:51 +00:00
|
|
|
border: 4px solid currentColor;
|
2023-04-19 05:58:14 +00:00
|
|
|
color: theme('colors.text-button');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-04-09 11:00:07 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
a {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
position: relative;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
display: block;
|
2023-04-19 05:58:14 +00:00
|
|
|
color: theme('colors.text-button');
|
2022-02-04 11:57:55 +00:00
|
|
|
padding: 1em;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-hover');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.icon {
|
2022-03-15 13:21:06 +00:00
|
|
|
padding-inline-end: 5em;
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
// stylelint-disable-next-line max-nesting-depth
|
|
|
|
|
&:before,
|
|
|
|
|
&:after {
|
2022-03-15 13:21:06 +00:00
|
|
|
inset-inline-end: 1em;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.shortcut {
|
2022-03-15 13:21:06 +00:00
|
|
|
padding-inline-end: 7em;
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
a,
|
|
|
|
|
input[type='submit'],
|
|
|
|
|
input[type='reset'],
|
|
|
|
|
input[type='button'],
|
|
|
|
|
.button,
|
|
|
|
|
button {
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
-webkit-font-smoothing: auto;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
label {
|
|
|
|
|
padding: 1.3em;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.kbd {
|
|
|
|
|
position: absolute;
|
2022-03-15 13:21:06 +00:00
|
|
|
inset-inline-end: 1em;
|
2022-02-04 11:57:55 +00:00
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 0.8em;
|
2022-07-09 06:32:51 +00:00
|
|
|
color: theme('colors.black-20');
|
2016-02-12 17:29:59 +00:00
|
|
|
}
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.open ul {
|
2022-07-09 06:32:51 +00:00
|
|
|
box-shadow: 0 3px 3px 0 theme('colors.black-20');
|
2022-02-04 11:57:55 +00:00
|
|
|
opacity: 1;
|
2022-03-15 13:21:06 +00:00
|
|
|
inset-inline-start: 0;
|
2022-02-04 11:57:55 +00:00
|
|
|
display: block;
|
|
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.match-width ul {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-width: 110px;
|
2014-06-27 10:31:52 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
li {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.dropup ul {
|
2022-07-09 06:32:51 +00:00
|
|
|
box-shadow: 0 -3px 3px 0 theme('colors.black-20');
|
2022-02-04 11:57:55 +00:00
|
|
|
top: auto;
|
|
|
|
|
bottom: 100%;
|
2020-06-15 11:03:12 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
li {
|
|
|
|
|
border-width: 0 0 1px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dropdown-toggle {
|
2023-04-19 05:58:14 +00:00
|
|
|
color: theme('colors.text-button');
|
|
|
|
|
background-color: theme('colors.surface-button-default');
|
2022-02-04 11:57:55 +00:00
|
|
|
line-height: 2.8em;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
height: 100%;
|
2022-07-09 06:32:51 +00:00
|
|
|
border-inline-start: 1px solid theme('colors.white-15');
|
2022-02-04 11:57:55 +00:00
|
|
|
position: absolute;
|
2022-03-15 13:21:06 +00:00
|
|
|
inset-inline-end: 0;
|
2022-02-04 11:57:55 +00:00
|
|
|
padding: 0 0.5em;
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
&:before,
|
|
|
|
|
&:after {
|
|
|
|
|
margin: 0;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2014-06-27 10:31:52 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&:before {
|
|
|
|
|
width: 1em;
|
|
|
|
|
font-size: 1.2rem;
|
2020-03-12 10:49:20 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&:hover {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-hover');
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2014-04-09 11:00:07 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
svg.icon {
|
|
|
|
|
// TODO: remove svg qualifier once the icon font styles are gone
|
|
|
|
|
@include svg-icon(1.3em);
|
2020-03-12 10:49:20 +00:00
|
|
|
}
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2020-03-12 10:49:20 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.bicolor + .dropdown-toggle {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-hover');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.open .dropdown-toggle {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-hover');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bicolor:hover {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-button-hover');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Styles for dropdowns which are also buttons e.g page editor
|
|
|
|
|
&.dropdown-button {
|
|
|
|
|
// Media for Windows High Contrast
|
2023-04-19 05:58:14 +00:00
|
|
|
@media (forced-colors: active) {
|
2022-02-04 11:57:55 +00:00
|
|
|
button {
|
|
|
|
|
border-color: ActiveText;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button:hover {
|
|
|
|
|
border-color: Highlight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.button.bicolor.button:hover {
|
|
|
|
|
border-color: Highlight;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-26 11:07:37 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.dropdown-toggle {
|
|
|
|
|
border-radius: 0 3px 3px 0;
|
|
|
|
|
// Media for Windows High Contrast
|
2023-04-19 05:58:14 +00:00
|
|
|
@media (forced-colors: active) {
|
2022-02-04 11:57:55 +00:00
|
|
|
background: transparent;
|
|
|
|
|
border: 1px solid ActiveText;
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.dropdown-toggle:hover {
|
|
|
|
|
// Media for Windows High Contrast
|
2023-04-19 05:58:14 +00:00
|
|
|
@media (forced-colors: active) {
|
2022-02-04 11:57:55 +00:00
|
|
|
background-color: transparent;
|
|
|
|
|
border: 1px solid Highlight;
|
|
|
|
|
}
|
2014-05-08 13:26:32 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.open {
|
|
|
|
|
> input[type='button'],
|
|
|
|
|
> input[type='submit'],
|
|
|
|
|
> button,
|
|
|
|
|
> .button {
|
|
|
|
|
border-radius: 3px 3px 0 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dropdown-toggle {
|
|
|
|
|
border-radius: 0 3px 0 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-08 13:43:21 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.dropup.dropdown-button {
|
|
|
|
|
&.open {
|
|
|
|
|
> input[type='button'],
|
|
|
|
|
> input[type='submit'],
|
|
|
|
|
> button,
|
|
|
|
|
> .button {
|
|
|
|
|
border-radius: 0 0 3px 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dropdown-toggle {
|
|
|
|
|
border-radius: 0 0 3px;
|
|
|
|
|
}
|
2014-04-09 11:00:07 +00:00
|
|
|
}
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
2015-09-25 13:17:39 +00:00
|
|
|
.dropdown.white {
|
2022-02-04 11:57:55 +00:00
|
|
|
ul {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.surface-page');
|
2014-04-02 15:48:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
li {
|
2022-07-09 06:32:51 +00:00
|
|
|
border-top: 1px solid theme('colors.black-10');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-04-02 15:48:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
a {
|
2023-04-19 05:58:14 +00:00
|
|
|
color: theme('colors.text-meta');
|
2014-01-24 17:34:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&:hover {
|
2023-04-19 05:58:14 +00:00
|
|
|
background-color: theme('colors.text-context');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
2016-02-17 14:54:54 +00:00
|
|
|
.dropdown.warning {
|
2022-02-04 11:57:55 +00:00
|
|
|
ul {
|
2023-05-25 12:43:45 +00:00
|
|
|
background-color: theme('colors.warning.100');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2016-02-17 14:54:54 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.dropdown-toggle {
|
2023-05-25 12:43:45 +00:00
|
|
|
background-color: theme('colors.warning.100');
|
2022-02-04 11:57:55 +00:00
|
|
|
}
|
2016-02-17 14:54:54 +00:00
|
|
|
}
|
|
|
|
|
|
2015-11-03 12:15:33 +00:00
|
|
|
// Transitions
|
2021-12-23 02:42:22 +00:00
|
|
|
// stylelint-disable-next-line no-duplicate-selectors
|
2015-09-25 13:17:39 +00:00
|
|
|
.dropdown ul {
|
2022-02-04 11:57:55 +00:00
|
|
|
@include transition(opacity 0.2s linear);
|
2015-11-03 12:15:33 +00:00
|
|
|
}
|
2020-06-15 15:13:08 +00:00
|
|
|
|
|
|
|
|
.dropdown-button {
|
2022-02-04 11:57:55 +00:00
|
|
|
.button svg.icon {
|
|
|
|
|
// TODO: leave only class when iconfont styles are removed
|
|
|
|
|
@include svg-icon();
|
|
|
|
|
}
|
2020-06-15 15:13:08 +00:00
|
|
|
}
|