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

305 lines
7.1 KiB
SCSS
Raw Permalink Normal View History

2020-04-06 14:28:15 +00: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 17:12:34 +00: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 14:28:15 +00:00
/* border etc */
.button, .dropdownArrow {
text-align: center;
border: .05em solid var(--menu-bar-button-border);
2020-04-06 14:28:15 +00:00
border-radius: $border_radius_small;
background-color: var(--menu-bar-button-background);
2020-04-06 14:28:15 +00: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 14:28:15 +00:00
}
&.activated {
background-color: var(--menu-bar-button-background-activated);
border-color: var(--menu-bar-button-border-activated);
2020-04-06 14:28:15 +00:00
&:hover {
background-color: var(--menu-bar-button-background-activated-hover);
border-color: var(--menu-bar-button-border-activated-hover);
2020-04-06 14:28:15 +00:00
}
&.theme-red {
background-color: var(--menu-bar-button-background-activated-red);
border-color: var(--menu-bar-button-border-activated-red);
2020-04-06 14:28:15 +00: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 14:28:15 +00: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;
2020-09-28 07:37:48 +00:00
flex-grow: 0;
flex-shrink: 0;
2020-04-06 14:28:15 +00:00
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 17:12:34 +00:00
color: var(--menu-bar-dropdown);
2020-04-06 14:28:15 +00:00
2020-07-20 17:12:34 +00:00
background-color: var(--menu-bar-dropdown-background);
2020-04-06 14:28:15 +00:00
align-items: center;
2020-07-20 17:12:34 +00:00
border: .05em solid var(--menu-bar-dropdown-border);
2020-04-06 14:28:15 +00:00
border-radius: 0 $border_radius_middle $border_radius_middle $border_radius_middle;
width: 20em; /* fallback */
2020-04-06 14:28:15 +00:00
width: max-content;
max-width: 30em;
2020-04-06 14:28:15 +00:00
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;
}
.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;
display: flex;
flex-direction: column;
justify-content: center;
2020-04-06 14:28:15 +00:00
}
.arrow {
margin-right: .5em;
}
&.title {
color: #557edc;
.entryName {
margin-left: .25em;
}
}
2020-04-06 14:28:15 +00:00
&: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 17:12:34 +00:00
background-color: var(--menu-bar-dropdown-hover-background);
2020-04-06 14:28:15 +00: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 17:12:34 +00:00
background-color: var(--menu-bar-dropdown-arrow-background);
border-color: var(--menu-bar-dropdown-arrow);
2020-04-06 14:28:15 +00: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;
}
}
2020-09-28 07:37:48 +00:00
.arrow {
display: inline-block;
border: solid black;
border-width: 0 .2em .2em 0;
padding: .21em;
height: .5em;
width: .5em;
&.right {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
&.left {
transform: rotate(135deg);
-webkit-transform: rotate(135deg);
}
&.up {
transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
}
&.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
}
.iconContainer {
margin-right: .25em;
display: flex;
flex-direction: column;
2020-04-06 14:28:15 +00:00
}