1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
2022-07-08 13:06:05 +01:00

286 lines
7.8 KiB
SCSS

/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
.button {
@include disable-selection;
}
#red-ui-header {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 40px;
background: var(--red-ui-header-background);
box-sizing: border-box;
padding: 0px 0px 0px 20px;
color: var(--red-ui-header-menu-color);
font-size: 14px;
span.red-ui-header-logo {
float: left;
margin-top: 5px;
font-size: 30px;
line-height: 30px;
text-decoration: none;
white-space: nowrap;
span {
vertical-align: middle;
font-size: 16px !important;
&:not(:first-child) {
margin-left: 5px;
}
}
img {
height: 18px;
}
a {
color: inherit;
&:hover {
text-decoration: none;
}
}
}
.red-ui-header-toolbar {
padding: 0;
margin: 0;
list-style: none;
float: right;
> li {
display: inline-block;
padding: 0;
margin: 0;
position: relative;
}
}
.button {
min-width: 20px;
text-align: center;
line-height: 40px;
display: inline-block;
font-size: 20px;
padding: 0px 12px;
text-decoration: none;
color: var(--red-ui-header-menu-color);
margin: auto 5px;
vertical-align: middle;
border-left: 2px solid var(--red-ui-header-background);
border-right: 2px solid var(--red-ui-header-background);
&:hover {
border-color: var(--red-ui-header-menu-item-hover);
}
&:active, &.active {
background: var(--red-ui-header-button-background-active);
}
&:focus {
outline: none;
}
}
.button-group {
display: inline-block;
margin: auto 15px;
vertical-align: middle;
clear: both;
& > a {
display: inline-block;
position: relative;
float: left;
line-height: 22px;
font-size: 14px;
text-decoration: none;
padding: 4px 8px;
margin: 0;
}
}
.red-ui-deploy-button {
background: var(--red-ui-deploy-button-background);
color: var(--red-ui-deploy-button-color);
&:hover {
background: var(--red-ui-deploy-button-background-hover);
}
&:focus {
outline: none;
}
&:active {
background: var(--red-ui-deploy-button-background-active);
color: var(--red-ui-deploy-button-color-active);
}
}
.red-ui-deploy-button-spinner {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
text-align: center;
img {
opacity: 0.8;
height: 100%;
}
}
#red-ui-header-button-deploy {
padding: 4px 12px;
&.disabled {
cursor: default;
background: var(--red-ui-deploy-button-background-disabled);
color: var(--red-ui-deploy-button-color-disabled);
.red-ui-deploy-button-content>img {
opacity: 0.3;
}
&+ #red-ui-header-button-deploy-options {
background: var(--red-ui-deploy-button-background-disabled);
color: var(--red-ui-deploy-button-color-active);
}
&+ #red-ui-header-button-deploy-options:hover {
background: var(--red-ui-deploy-button-background-disabled-hover);
}
&+ #red-ui-header-button-deploy-options:active {
background: var(--red-ui-deploy-button-background-disabled);
}
}
.red-ui-deploy-button-content>img {
margin-right: 8px;
}
}
.red-ui-deploy-button-group.open {
#red-ui-header-button-deploy-options {
background: var(--red-ui-header-button-background-active) !important;
}
}
li.open .button {
background: var(--red-ui-header-button-background-active);
border-color: var(--red-ui-header-button-background-active);
}
ul.red-ui-menu-dropdown {
background: var(--red-ui-header-menu-background);
border: 1px solid var(--red-ui-header-menu-background);
width: 260px !important;
margin-top: 0;
li a {
color: var(--red-ui-header-menu-color);
padding: 3px 10px 3px 30px;
img {
max-width: 100%;
margin-right: 10px;
padding: 4px;
border: 3px solid transparent;
}
.red-ui-popover-key {
color: var(--red-ui-header-menu-color-disabled) !important;
border-color: var(--red-ui-header-menu-color-disabled) !important;
}
&.active img {
border: 3px solid var(--red-ui-header-menu-item-border-active);
}
span.red-ui-menu-label-container {
width: 180px;
vertical-align: top;
display: inline-block;
text-indent: 0px;
}
span.red-ui-menu-label {
font-size: 14px;
text-indent: 0px;
}
span.red-ui-menu-sublabel {
color: var(--red-ui-header-menu-sublabel-color);
font-size: 13px;
display: block;
text-indent: 0px;
}
}
> li > a:hover,
> li.open > a,
> li > a:focus,
> li:hover > a,
> li:focus > a {
background: var(--red-ui-header-menu-item-hover) !important;
}
li.red-ui-menu-divider {
background: var(--red-ui-headerMenuItemDivider);
}
li.disabled a {
color: var(--red-ui-header-menu-color-disabled);
}
> li.disabled > a:hover,
> li.disabled > a:focus {
background: none !important;
}
}
.red-ui-menu-dropdown-submenu>a:before {
border-right-color: var(--red-ui-headerMenuCaret);
margin-left: -25px !important;
}
/* Deploy menu customisations */
ul#red-ui-header-button-deploy-options-submenu {
width: 300px !important;
li a {
padding: 10px 30px;
color: var(--red-ui-header-menu-heading-color);
span.red-ui-menu-label {
font-size: 16px;
display: inline-block;
text-indent: 0px;
}
> i.fa {
display: none;
}
}
}
/* User menu customisations */
#usermenu-item-username > .red-ui-menu-label {
color: var(--red-ui-header-menu-heading-color);
}
#red-ui-header-button-user .user-profile {
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
display: inline-block;
width: 40px;
height: 35px;
vertical-align: middle;
}
}
@media only screen and (max-width: 450px) {
span.red-ui-header-logo > span {
display: none;
}
}