TeaWeb/shared/js/ui/frames/control-bar/button.scss

275 lines
6.6 KiB
SCSS
Raw Normal View History

2020-04-06 16:28:15 +02:00
@import "../../../../css/static/properties";
@import "../../../../css/static/mixin";
/* Variables */
html:root {
--menu-bar-button-background: #454545;
--menu-bar-button-background-hover: #393c43;
--menu-bar-button-background-activated: #2f3841;
--menu-bar-button-background-activated-red: #412f2f;
--menu-bar-button-background-activated-hover: #263340;
--menu-bar-button-background-activated-red-hover: #402626;
--menu-bar-button-border: #454545;
--menu-bar-button-border-hover: #4a4c55;
--menu-bar-button-border-activated: #005fa1;
--menu-bar-button-border-activated-red: #a10000;
--menu-bar-button-border-activated-hover: #005fa1;
--menu-bar-button-border-activated-red-hover: #a10000;
2020-07-20 19:12:34 +02:00
--menu-bar-dropdown: #c4c5c5;
--menu-bar-dropdown-border: #2c2525;
--menu-bar-dropdown-background: #2d3032;
--menu-bar-dropdown-hover-background: #252729;
--menu-bar-dropdown-arrow-background: #393c43;
--menu-bar-dropdown-arrow: #4a4c55;
}
2020-04-06 16:28:15 +02:00
/* border etc */
.button, .dropdownArrow {
text-align: center;
border: .05em solid var(--menu-bar-button-border);
2020-04-06 16:28:15 +02:00
border-radius: $border_radius_small;
background-color: var(--menu-bar-button-background);
2020-04-06 16:28:15 +02:00
&:hover {
background-color: var(--menu-bar-button-background-hover);
border-color: var(--menu-bar-button-border-hover);
/* box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19); */
2020-04-06 16:28:15 +02:00
}
&.activated {
background-color: var(--menu-bar-button-background-activated);
border-color: var(--menu-bar-button-border-activated);
2020-04-06 16:28:15 +02:00
&:hover {
background-color: var(--menu-bar-button-background-activated-hover);
border-color: var(--menu-bar-button-border-activated-hover);
2020-04-06 16:28:15 +02:00
}
&.theme-red {
background-color: var(--menu-bar-button-background-activated-red);
border-color: var(--menu-bar-button-border-activated-red);
2020-04-06 16:28:15 +02:00
&:hover {
background-color: var(--menu-bar-button-background-activated-red-hover);
border-color: var(--menu-bar-button-border-activated-red-hover);
2020-04-06 16:28:15 +02:00
}
}
}
@include transition(background-color $button_hover_animation_time ease-in-out, border-color $button_hover_animation_time ease-in-out);
:global(.icon_em) {
font-size: 1.5em;
}
}
.button {
display: flex;
flex-direction: row;
justify-content: center;
height: 2em;
width: 2em;
cursor: pointer;
align-items: center;
margin-right: 5px;
margin-left: 5px;
&.buttonHostbutton {
img {
min-width: 1.5em;
max-width: 1.5em;
height: 1.5em;
width: 1.5em;
}
overflow: hidden;
padding: .25em;
}
}
.buttonDropdown {
height: 100%;
position: relative;
.buttons {
height: 2em;
align-items: center;
display: flex;
flex-direction: row;
.dropdownArrow {
height: 2em;
display: inline-flex;
justify-content: space-around;
width: 1.5em;
cursor: pointer;
border-radius: 0 $border_radius_small $border_radius_small 0;
align-items: center;
border-left: 0;
}
.button {
margin-right: 0;
}
&:hover {
.button, .dropdownArrow {
background-color: #393c43;
border-color: #4a4c55;
}
.button {
border-right-color: transparent;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
}
}
.dropdown {
display: none;
position: absolute;
margin-left: 5px;
2020-07-20 19:12:34 +02:00
color: var(--menu-bar-dropdown);
2020-04-06 16:28:15 +02:00
2020-07-20 19:12:34 +02:00
background-color: var(--menu-bar-dropdown-background);
2020-04-06 16:28:15 +02:00
align-items: center;
2020-07-20 19:12:34 +02:00
border: .05em solid var(--menu-bar-dropdown-border);
2020-04-06 16:28:15 +02:00
border-radius: 0 $border_radius_middle $border_radius_middle $border_radius_middle;
width: 15em; /* fallback */
width: max-content;
max-width: 25em;
z-index: 1000;
/*box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);*/
&:global(.right) {
right: 0;
}
:global {
.icon, .icon-container, .icon_em {
vertical-align: middle;
margin-right: 5px;
}
2020-04-06 16:29:40 +02:00
.icon-empty, .icon_empty {
2020-04-06 16:28:15 +02:00
flex-shrink: 0;
flex-grow: 0;
height: 16px;
width: 16px;
}
}
.dropdownEntry {
position: relative;
display: flex;
flex-direction: row;
cursor: pointer;
padding: 1px 2px 1px 4px;
align-items: center;
justify-content: stretch;
.entryName {
flex-grow: 1;
flex-shrink: 1;
vertical-align: text-top;
margin-right: .5em;
}
.icon, .arrow {
flex-grow: 0;
flex-shrink: 0;
}
.arrow {
margin-right: .5em;
}
&:first-of-type {
border-radius: .1em .1em 0 0;
}
&:last-of-type {
border-radius: 0 0 .1em .1em;
}
> .dropdown {
margin-left: 0;
}
&:hover {
2020-07-20 19:12:34 +02:00
background-color: var(--menu-bar-dropdown-hover-background);
2020-04-06 16:28:15 +02:00
> .dropdown {
display: block;
margin-left: 0;
left: 100%;
top: 0;
}
}
}
&.displayLeft {
margin-left: -179px;
border-radius: $border_radius_middle 0 $border_radius_middle $border_radius_middle;
}
}
&.dropdownDisplayed {
> .dropdown {
display: block;
}
.button, .dropdown-arrow {
2020-07-20 19:12:34 +02:00
background-color: var(--menu-bar-dropdown-arrow-background);
border-color: var(--menu-bar-dropdown-arrow);
2020-04-06 16:28:15 +02:00
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.button {
border-right-color: transparent;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
}
hr {
margin-top: 5px;
margin-bottom: 5px;
}
}
.buttonBookmarks {
.dropdown {
width: 300px;
}
}