BetterDiscordApp-v2/client/src/styles/partials/generic/drawers.scss

100 lines
2.1 KiB
SCSS
Raw Normal View History

.bd-drawer {
2018-02-04 23:47:27 +01:00
margin-bottom: 15px;
2018-08-15 04:03:56 +02:00
.bd-settingsCategory > & {
2018-08-15 11:42:43 +02:00
border-bottom: 1px solid rgba(114, 118, 126, .3);
2018-02-21 16:58:45 +01:00
2018-08-15 11:42:43 +02:00
.bd-drawerContents > .bd-formItem {
&:last-child > .bd-formDivider {
&:last-child {
display: none;
}
}
2018-02-21 16:58:45 +01:00
}
}
2018-08-15 04:03:56 +02:00
.bd-formHeader {
2018-02-04 23:47:27 +01:00
margin-top: 0;
cursor: pointer;
&:hover {
2018-08-15 11:42:43 +02:00
color: rgba(255, 255, 255, .25);
}
}
2018-08-15 04:03:56 +02:00
.bd-drawerOpenButton {
2018-02-04 15:20:57 +01:00
position: relative;
margin-right: 15px;
2018-08-15 11:42:43 +02:00
.bd-chevron1,
.bd-chevron2 {
2018-02-04 15:20:57 +01:00
position: absolute;
}
svg {
2018-08-15 11:42:43 +02:00
transition: transform .5s ease;
transform: none;
}
}
2018-08-15 04:03:56 +02:00
.bd-drawerContentsWrap {
2018-02-12 20:05:28 +01:00
min-height: 5px;
}
2018-08-15 04:03:56 +02:00
.bd-drawerContents {
// margin-top is set in JavaScript when the drawer is animating
// It still needs to be set here for it to animate
2018-08-15 11:42:43 +02:00
transition: transform .2s ease, margin-top .2s ease, opacity .2s ease;
2018-02-04 23:47:27 +01:00
transform: scaleY(0) translateY(0%);
margin-top: -100%;
2018-02-04 23:47:27 +01:00
opacity: 0;
2018-08-15 11:42:43 +02:00
> .bd-formItem {
&:last-child > .bd-formDivider {
&:last-child {
display: none;
}
}
2018-02-04 23:47:27 +01:00
}
}
&.bd-animating,
2018-08-15 04:03:56 +02:00
&:not(.bd-drawerOpen) {
> .bd-drawerContentsWrap {
2018-03-05 22:46:28 +01:00
overflow: hidden;
}
2018-03-05 22:46:28 +01:00
}
2018-08-15 04:03:56 +02:00
&.bd-drawerOpen {
2018-08-15 11:42:43 +02:00
> .bd-drawerHeader {
.bd-drawerOpenButton {
.bd-chevron1 {
svg {
transform: rotate(90deg);
}
2018-02-04 15:20:57 +01:00
}
}
2018-08-15 04:03:56 +02:00
.bd-chevron2 {
2018-02-04 15:20:57 +01:00
margin-left: -4px;
2018-08-15 11:42:43 +02:00
2018-02-04 15:20:57 +01:00
svg {
2018-08-15 11:42:43 +02:00
transform: rotate(270deg);
2018-02-04 15:20:57 +01:00
}
}
}
2018-08-15 04:03:56 +02:00
> .bd-drawerContentsWrap > .bd-drawerContents {
2018-02-04 23:47:27 +01:00
transform: scaleY(1) translateY(0%);
2018-08-15 11:42:43 +02:00
margin-top: 0;
2018-02-04 23:47:27 +01:00
opacity: 1;
&::after {
2018-08-15 11:42:43 +02:00
content: '';
display: block;
margin-top: 15px;
}
}
}
}