mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
150 lines
3.0 KiB
SCSS
150 lines
3.0 KiB
SCSS
|
//
|
||
|
// Dropdown Styles
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
// Wrapper
|
||
|
// Does nothing yet...
|
||
|
.dropdown {}
|
||
|
|
||
|
// List
|
||
|
.dropdown-menu {
|
||
|
background: #fff;
|
||
|
box-shadow: rgba(0,0,0,0.5) 0 1px 15px;
|
||
|
display: inline-block;
|
||
|
border-radius: 2px;
|
||
|
padding: 0.5rem 0;
|
||
|
margin: 0;
|
||
|
position: relative;
|
||
|
font-size: 1.4rem;
|
||
|
|
||
|
// Dropdown Resets - This means we can use any element
|
||
|
li {
|
||
|
list-style: none;
|
||
|
}
|
||
|
} // .dropdown-menu
|
||
|
|
||
|
.dropdown-menu {
|
||
|
|
||
|
&[class*='triangle-'] {
|
||
|
&:before {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
border-style: solid;
|
||
|
border-color: #fff transparent;
|
||
|
display: block;
|
||
|
width: 0;
|
||
|
} // :before
|
||
|
|
||
|
&:after {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
width: 20px;
|
||
|
height: 20px;
|
||
|
background: #fff;
|
||
|
transform: rotate(45deg);
|
||
|
box-shadow: rgba(0,0,0,0.1) 0 0 5px 5px;
|
||
|
z-index: -1;
|
||
|
} // :after
|
||
|
} // &[class*='triangle-']
|
||
|
|
||
|
// Bottom
|
||
|
&[class*='triangle-bottom'] {
|
||
|
&:before {
|
||
|
border-width: 10px 10px 0 10px;
|
||
|
bottom: -10px;
|
||
|
}
|
||
|
&:after {
|
||
|
bottom: -5px;
|
||
|
}
|
||
|
}
|
||
|
&.triangle-bottom {
|
||
|
&:before {
|
||
|
left: 50%;
|
||
|
margin-left: -10px;
|
||
|
}
|
||
|
&:after {
|
||
|
left: 50%;
|
||
|
margin-left: -10px;
|
||
|
}
|
||
|
} // &.triangle-bottom
|
||
|
|
||
|
// Top
|
||
|
&[class*='triangle-top'] {
|
||
|
&:before {
|
||
|
border-width: 0 10px 10px 10px;
|
||
|
top: -10px;
|
||
|
}
|
||
|
&:after {
|
||
|
top: -5px;
|
||
|
}
|
||
|
}
|
||
|
&.triangle-top {
|
||
|
&:before {
|
||
|
left: 50%;
|
||
|
margin-left: -10px;
|
||
|
}
|
||
|
&:after {
|
||
|
left: 50%;
|
||
|
margin-left: -10px;
|
||
|
}
|
||
|
} // &.triangle-top
|
||
|
|
||
|
// Top & Bottom Sides
|
||
|
&.triangle-top-left,
|
||
|
&.triangle-bottom-left {
|
||
|
&:before {
|
||
|
left: 2rem;
|
||
|
}
|
||
|
&:after {
|
||
|
left: 2rem;
|
||
|
}
|
||
|
} // &.triangle-bottom-left
|
||
|
&.triangle-top-right,
|
||
|
&.triangle-bottom-right {
|
||
|
&:before {
|
||
|
right: 2rem;
|
||
|
}
|
||
|
&:after {
|
||
|
right: 2rem;
|
||
|
}
|
||
|
} // &.triangle-bottom-right
|
||
|
|
||
|
} // .dropdown-menu
|
||
|
|
||
|
// List Item
|
||
|
.dropdown-item {
|
||
|
color: #000;
|
||
|
display: block;
|
||
|
width: 100%;
|
||
|
padding: 0.7rem 3.5rem;
|
||
|
|
||
|
&:not(.divider):hover,
|
||
|
&:not(.divider):focus {
|
||
|
background: #f6f6f6;
|
||
|
}
|
||
|
|
||
|
&[class*='icon-'] {
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
&[class*='icon-']:before {
|
||
|
position: absolute;
|
||
|
left: 1.5rem;
|
||
|
font-size: 1.2rem;
|
||
|
line-height: 1.2;
|
||
|
}
|
||
|
|
||
|
&.divider {
|
||
|
position: relative;
|
||
|
height: 1.5rem;
|
||
|
&:before {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
top: 0.7rem;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 1px;
|
||
|
background: #eee;
|
||
|
} // :before
|
||
|
} // .divider
|
||
|
} // .dropdown-item
|