discord-client/webpack/scss/dialog.scss

154 lines
2.8 KiB
SCSS

@import 'constants';
#WRAPPER > div.dialog{
display: block;
position: absolute;
top: 0;
left: $menu-width;
width: $dialog-width;
height: 100%;
background-color: $dialog-bg;
/* (1) Container HEADER */
& > div.header{
display: block;
position: absolute;
top: 0;
left: 0;
width: calc( 100% - 2*1em );
height: calc( #{$header-height} - #{$header-height/2} );
border-bottom: #{$bb-height} solid darken($dialog-header-bg, 5%);
box-shadow: 0 #{$bb-offset - $bb-height} 0 darken($dialog-header-bg, 2%);
z-index: 200;
font-weight: bold;
padding: #{$header-height/4} 1em;
}
/* (2) Container BODY */
& > div.body{
display: block;
position: absolute;
top: calc( #{$header-height} + #{$bb-offset} );
left: 0;
width: 100%;
height: calc( 100% - #{$header-height} - #{$bb-offset} );
background-color: $dialog-bg;
color: #72767d;
z-index: 100;
// overflow: hidden;
/* (3) Toggle label */
& div.toggle{
display: block;
width: calc( 100% - 2*.5em );
margin: 0 .5em;
margin-top: 2em;
padding-left: 1em;
background: left center no-repeat;
background-size: auto 60%;
color: #72767d;
font-size: .7em;
letter-spacing: .05em;
font-weight: bold;
text-transform: uppercase;
transition: color .2s ease-in-out;
&:hover{ color: #b9bbbe; }
cursor: pointer;
// when not toggle-active
&[data-toggle],
&[data-toggle='0']{
background-image: url('../asset/svg/arrow.right.svg');
&:hover{ background-image: url('../asset/svg/arrow.right@hover.svg'); }
}
// when toggle-active
&[data-toggle='1']{
background-image: url('../asset/svg/arrow.down.svg');
&:hover{ background-image: url('../asset/svg/arrow.down@hover.svg'); }
}
}
/* (4) UL after toggle label */
& div.toggle + ul,
& div.toggle:not([data-toggle='1']) + ul{
display: none;
/* (5) List items */
li{
display: block;
margin: .1em .5em;
padding: .3em .5em;
padding-left: 1.6em;
border-radius: 3px / 3px;
background-color: transition;
transition: color .2s ease-in-out,
background-color .2s ease-in-out;
cursor: pointer;
&:hover{
color: #ddd;
background-color: #36393f;
}
&.active{
color: #ddd;
background-color: rgba(79,84,92,.6);
}
// {1} Trailing icon //
&:before{
content: '';
display: inline-block;
position: absolute;
margin-left: -1.3em;
width: 1.3em;
height: 1.3em;
background: center center no-repeat;
background-size: auto 80%;
}
// for 'text'
&[data-type='text']:before{ background-image: url('../asset/svg/dialog.text.svg'); }
// for 'voice'
&[data-type='voice']:before{ background-image: url('../asset/svg/dialog.voice.svg'); }
}
}
// when visible
& div.toggle[data-toggle='1'] + ul{ display: block; }
}
}