mf-styling
Version:
css as used for mf apps
240 lines (204 loc) • 4 kB
CSS
:root {
--dropdown-border-color: rgba(27 31 35 15%);
--dropdown-hover-background-color: var(--nav-background-color);
}
.dropdown {
position: relative;
}
.dropdown-caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
content: "";
border-top-style: solid;
border-top-width: 4px;
border-right: 4px solid transparent;
border-bottom: 0 solid transparent;
border-left: 4px solid transparent;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 100;
width: 160px;
padding-top: 4px;
padding-bottom: 4px;
margin-top: 2px;
list-style: none;
background-color: #fff;
background-clip: padding-box;
border: 1px solid var(--dropdown-border-color);
border-radius: 4px;
box-shadow: 0 1px 15px var(--dropdown-border-color);
}
.dropdown-menu ::after,
.dropdown-menu ::before {
position: absolute;
display: inline-block;
content: "";
}
.dropdown-menu ::before {
border: 8px solid transparent;
border-bottom-color: var(--dropdown-border-color);
}
.dropdown-menu ::after {
border: 7px solid transparent;
border-bottom-color: #fff;
}
.dropdown-menu > ul {
list-style: none;
}
.dropdown-menu-no-overflow {
width: auto;
}
.dropdown-item {
display: block;
padding: 4px 0 2px 8px;
overflow: hidden;
color: #24292e;
text-overflow: ellipsis;
white-space: nowrap;
}
.dropdown-menu-no-overflow .dropdown-item {
padding: 4px 16px;
overflow: visible;
text-overflow: inherit;
}
.dropdown-item:focus,
.dropdown-item:hover {
color: #fff;
text-decoration: none;
background-color: var(--dropdown-hover-background-color);
outline: none;
}
.dropdown-item[aria-checked="false"] {
display: none;
}
.dropdown-item.btn-link,
.dropdown-signout {
width: 100%;
text-align: left;
}
.dropdown-signout {
background: none;
border: 0;
}
.dropdown-divider {
display: block;
height: 0;
margin: 8px 0;
border-top: 1px solid #e1e4e8;
}
.dropdown-header {
padding: 4px 16px;
font-size: 12px;
color: #d1d5da;
}
.dropdown-menu-w {
top: 0;
right: 100%;
left: auto;
width: auto;
margin-top: 0;
margin-right: 8px;
}
.dropdown-menu-w ::before {
top: 10px;
right: -16px;
left: auto;
border-color: transparent transparent transparent var(--dropdown-border-color);
}
.dropdown-menu-w ::after {
top: 11px;
right: -14px;
left: auto;
border-color: transparent transparent transparent #fff;
}
.dropdown-menu-e {
top: 0;
left: 100%;
width: auto;
margin-top: 0;
margin-left: 8px;
}
.dropdown-menu-e ::before {
top: 8px;
left: -16px;
border-color: transparent var(--dropdown-border-color) transparent transparent;
}
.dropdown-menu-e ::after {
top: 11px;
left: -14px;
border-color: transparent #fff transparent transparent;
}
.dropdown-menu-ne {
top: auto;
bottom: 100%;
left: 0;
margin-bottom: 3px;
}
.dropdown-menu-ne ::after,
.dropdown-menu-ne ::before {
top: auto;
right: auto;
}
.dropdown-menu-ne ::before {
bottom: -8px;
left: 9px;
border-top: 8px solid var(--dropdown-border-color);
border-right: 8px solid transparent;
border-bottom: 0;
border-left: 8px solid transparent;
}
.dropdown-menu-ne ::after {
bottom: -7px;
left: 10px;
border-top: 7px solid #fff;
border-right: 7px solid transparent;
border-bottom: 0;
border-left: 7px solid transparent;
}
.dropdown-menu-s {
right: 50%;
left: auto;
transform: translateX(50%);
}
.dropdown-menu-s ::before {
top: -16px;
right: 50%;
transform: translateX(50%);
}
.dropdown-menu-s ::after {
top: -14px;
right: 50%;
transform: translateX(50%);
}
.dropdown-menu-sw {
right: 0;
left: auto;
}
.dropdown-menu-sw ::before {
top: -16px;
right: 9px;
left: auto;
}
.dropdown-menu-sw ::after {
top: -14px;
right: 10px;
left: auto;
}
.dropdown-menu-se ::before {
top: -16px;
left: 9px;
}
.dropdown-menu-se ::after {
top: -14px;
left: 10px;
}
/*
.dropdown-trigger {
background-image: url("images/down.svg");
}
*/