mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-13 14:39:52 +03:00
6dabb84e0a
closes https://github.com/TryGhost/Ghost/issues/8269 - swaps the usage of our custom `gh-dropdown` component in the user menu dropdown for the `ember-wormhole` based `ember-basic-dropdown` that is used elsewhere in the app and will fully replace `gh-dropdown` in the future - adds `gh-basic-dropdown` component that extends from `ember-basic-dropdown` and hooks into our `dropdown` service so that we can programatically close dropdowns from disparate areas of the app - modifies the `body-event-listener` mixin to pass the click event through to it's consumers - modifies the `bodyClick` handler in the `dropdown` service to check if the click actually originated from an ember-basic-dropdown element - this body click handler will go away once we've fully switched to `gh-basic-dropdown` - adds `ember-native-dom-helpers` to provide consistency between acceptance and integration tests (this is the start of another refactor, eventually this addon will disappear as part of ember's [grand testing unification project](https://github.com/rwjblue/rfcs/blob/42/text/0000-grand-testing-unification.md))
156 lines
3.1 KiB
CSS
156 lines
3.1 KiB
CSS
/* Dropdowns
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.ember-basic-dropdown-content {
|
|
z-index: 1100;
|
|
}
|
|
|
|
.dropdown {
|
|
position: relative;
|
|
z-index: 1100;
|
|
}
|
|
|
|
.dropdown-toggle:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
float: left;
|
|
margin: 2px 0 0;
|
|
padding: 10px;
|
|
min-width: 200px;
|
|
background-color: #fff;
|
|
background-clip: padding-box;
|
|
border-radius: 4px;
|
|
box-shadow: 0 0 0 1px rgba(99,114,130,0.16), 0 8px 16px rgba(27,39,51,0.08);
|
|
list-style: none;
|
|
text-align: left;
|
|
text-transform: none;
|
|
font-size: 1.4rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.dropdown-menu.pull-right {
|
|
right: 0;
|
|
left: auto;
|
|
}
|
|
|
|
.dropdown-menu .divider {
|
|
overflow: hidden;
|
|
margin: 8px 0;
|
|
height: 1px;
|
|
background: color(#dfe1e3 lightness(+5%));
|
|
}
|
|
|
|
.dropdown-menu li {
|
|
margin: 0;
|
|
}
|
|
|
|
.dropdown-menu > li > a,
|
|
.dropdown-menu > li > button {
|
|
display: flex;
|
|
align-items: center;
|
|
clear: both;
|
|
padding: 6px 10px;
|
|
width: 100%;
|
|
border-radius: 3px;
|
|
color: color(var(--darkgrey) lightness(+20%));
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
font-size: 1.3rem;
|
|
line-height: 1em;
|
|
font-weight: normal;
|
|
transition: none;
|
|
}
|
|
|
|
.dropdown-menu i {
|
|
margin-right: 10px;
|
|
font-size: 14px;
|
|
line-height: 1em;
|
|
}
|
|
|
|
@media (max-width: 500px) {
|
|
.dropdown-menu > li > a,
|
|
.dropdown-menu > li > button {
|
|
padding: 7px 8px;
|
|
font-size: 1.5rem;
|
|
}
|
|
.dropdown-menu i {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
|
|
|
|
/* States
|
|
/* ---------------------------------------------------------- */
|
|
|
|
/* Hover/Focus */
|
|
.dropdown-menu > li > a:hover,
|
|
.dropdown-menu > li > a:focus,
|
|
.dropdown-menu > li > button:hover,
|
|
.dropdown-menu > li > button:focus {
|
|
background: color(var(--blue) alpha(-85%));
|
|
color: var(--darkgrey);
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Active */
|
|
.dropdown-menu > .active > a,
|
|
.dropdown-menu > .active > a:hover,
|
|
.dropdown-menu > .active > a:focus,
|
|
.dropdown-menu > .active > button,
|
|
.dropdown-menu > .active > button:hover,
|
|
.dropdown-menu > .active > button:focus {
|
|
outline: 0;
|
|
background-color: var(--blue);
|
|
color: #fff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Disabled */
|
|
.dropdown-menu > .disabled > a,
|
|
.dropdown-menu > .disabled > a:hover,
|
|
.dropdown-menu > .disabled > a:focus,
|
|
.dropdown-menu > .disabled > button,
|
|
.dropdown-menu > .disabled > button:hover,
|
|
.dropdown-menu > .disabled > button:focus {
|
|
color: var(--midgrey);
|
|
}
|
|
|
|
.dropdown-menu > .disabled > a:hover,
|
|
.dropdown-menu > .disabled > a:focus,
|
|
.dropdown-menu > .disabled > button:hover,
|
|
.dropdown-menu > .disabled > button:focus {
|
|
background-color: transparent;
|
|
background-image: none;
|
|
text-decoration: none;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
|
|
/* Open / Close
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.open > .dropdown-menu {
|
|
display: block;
|
|
}
|
|
|
|
.open > a {
|
|
outline: 0;
|
|
}
|
|
|
|
.closed > .dropdown-menu {
|
|
display: none;
|
|
}
|
|
|
|
|
|
/* Selectize
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.selectize-dropdown {
|
|
z-index: 200;
|
|
}
|