1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/editor/sass/mixins.scss

159 lines
3.9 KiB
SCSS
Raw Normal View History

2015-04-09 15:46:29 +02:00
/**
2016-08-04 17:49:36 +02:00
* Copyright 2015, 2016 IBM Corp.
2015-04-09 15:46:29 +02:00
*
* 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.
**/
@mixin disable-selection {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
2016-08-04 17:49:36 +02:00
@mixin enable-selection {
-webkit-user-select: auto;
-khtml-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
2015-04-09 15:46:29 +02:00
@mixin component-border {
2015-07-13 12:26:29 +02:00
border: 1px solid $primary-border-color;
2015-07-12 00:43:45 +02:00
box-sizing: border-box;
2015-07-13 16:08:17 +02:00
}
@mixin workspace-button {
2015-07-14 00:21:03 +02:00
@include disable-selection;
2015-07-13 16:08:17 +02:00
box-sizing: border-box;
display: inline-block;
2016-09-19 14:54:23 +02:00
color: $workspace-button-color !important;
2015-07-13 16:08:17 +02:00
background: $workspace-button-background;
border: 1px solid $form-input-border-color;
2015-07-13 16:08:17 +02:00
text-align: center;
margin:0;
text-decoration: none;
2015-07-14 00:21:03 +02:00
cursor:pointer;
2016-09-19 14:54:23 +02:00
2015-07-13 16:08:17 +02:00
&.disabled {
cursor: default;
2016-09-19 14:54:23 +02:00
color: $workspace-button-color-disabled !important;
2015-07-13 16:08:17 +02:00
}
2016-08-04 17:49:36 +02:00
&:hover, &:focus {
2015-07-14 00:21:03 +02:00
text-decoration: none;
2016-08-04 17:49:36 +02:00
}
&:not(.disabled):hover {
2016-09-19 14:54:23 +02:00
color: $workspace-button-color-hover !important;
2015-07-13 16:08:17 +02:00
background: $workspace-button-background-hover;
}
&:not(.disabled):focus {
2016-09-19 14:54:23 +02:00
color: $workspace-button-color-focus !important;
2015-07-13 16:08:17 +02:00
}
&:not(.disabled):active {
2016-09-19 14:54:23 +02:00
color: $workspace-button-color-active !important;
2015-07-13 16:08:17 +02:00
background: $workspace-button-background-active;
text-decoration: none;
2015-07-13 16:08:17 +02:00
}
2016-01-13 00:03:33 +01:00
&.selected:not(.disabled) {
2016-09-19 14:54:23 +02:00
color: $workspace-button-color-selected !important;
2016-01-13 00:03:33 +01:00
background: $workspace-button-background-active;
}
.button-group &:not(:first-child) {
border-left: none;
2016-09-19 14:54:23 +02:00
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.button-group &:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
2016-01-31 23:27:14 +01:00
&:focus {
outline: 1px solid $workspace-button-color-focus-outline;
}
2015-04-09 15:46:29 +02:00
}
2016-10-25 22:15:06 +02:00
.button-group:not(:last-child) {
margin-right: 10px;
}
@mixin workspace-button-toggle {
@include workspace-button;
2016-09-19 14:54:23 +02:00
color: $workspace-button-toggle-color !important;
background:$workspace-button-background-active;
2016-08-13 01:33:41 +02:00
margin-bottom: 1px;
&.selected:not(.disabled) {
2016-09-19 14:54:23 +02:00
color: $workspace-button-toggle-color-selected !important;
background: $workspace-button-background;
border-bottom-width: 2px;
border-bottom-color: $form-input-border-selected-color;
2016-08-13 01:33:41 +02:00
margin-bottom: 0;
2016-10-25 22:15:06 +02:00
cursor: default;
}
2016-09-19 14:54:23 +02:00
&.disabled {
color: $workspace-button-toggle-color-disabled !important;
}
}
2015-07-14 16:59:56 +02:00
@mixin component-footer {
border-top: 1px solid $primary-border-color;
background: #f3f3f3;
text-align: right;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 25px;
line-height: 23px;
padding: 0 10px;
2016-10-25 22:15:06 +02:00
.button-group:not(:last-child) {
margin-right: 5px;
}
2015-07-14 16:59:56 +02:00
}
@mixin component-footer-button {
@include workspace-button;
font-size: 11px;
line-height: 17px;
width: 18px;
height: 18px;
&.text-button {
width: auto;
padding: 0 5px;
}
2015-07-14 16:59:56 +02:00
}
2016-10-25 22:15:06 +02:00
@mixin component-footer-button-toggle {
@include workspace-button-toggle;
font-size: 11px;
line-height: 17px;
height: 18px;
&.text-button {
width: auto;
padding: 0 5px;
}
}
2015-07-18 16:33:31 +02:00
@mixin component-shadow {
border: 1px solid $secondary-border-color;
box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}