silverstripe-betternavigator/scss/betternavigator.scss

325 lines
6.3 KiB
SCSS
Raw Normal View History

/**
* Better navigator styles
*/
@import "_iconsprite";
// Variables
$black: #000;
$white: #FFF;
$textColor: $white;
2023-07-31 03:36:05 +02:00
$contentColor: #595D61;
$contentBackground: #CFD8DE;
$buttonColor: #313639;
2023-07-31 03:36:05 +02:00
$buttonColorDisabled: #51565A;
$buttonBackground: #ECEFF2;
$buttonBackgroundDisabled: #C6D3DA;
$buttonBorder: #A3AAAF;
$liveColor: #4A831C;
$stageColor: #C0462B;
$archiveColor: #6F6F6F;
// Icons
span[class^='bn-icon'],
span[class*=' bn-icon']{
2014-08-13 02:41:18 +02:00
display: inline-block;
}
.bn-icon-close {
@extend .svg-images--bn-icon--close;
@extend .svg-images--bn-icon--close-dims;
transform: scale(0.8);
margin: -3px -6px 0 0;
}
.bn-icon-cog {
@extend .svg-images--bn-icon--cog;
@extend .svg-images--bn-icon--cog-dims;
}
.bn-icon-db {
@extend .svg-images--bn-icon--db;
@extend .svg-images--bn-icon--db-dims;
transform: scale(0.8);
}
.bn-icon-edit {
@extend .svg-images--bn-icon--edit;
@extend .svg-images--bn-icon--edit-dims;
transform: scale(0.9);
}
.bn-icon-flush {
@extend .svg-images--bn-icon--flush;
@extend .svg-images--bn-icon--flush-dims;
transform: scale(0.8);
}
.bn-icon-info {
@extend .svg-images--bn-icon--info;
@extend .svg-images--bn-icon--info-dims;
transform: scale(0.8);
}
.bn-icon-tick {
@extend .svg-images--bn-icon--tick;
@extend .svg-images--bn-icon--tick-dims;
transform: scale(0.85);
}
.bn-icon-tools {
@extend .svg-images--bn-icon--tools;
@extend .svg-images--bn-icon--tools-dims;
transform: scale(0.9);
}
.bn-icon-user {
@extend .svg-images--bn-icon--user;
@extend .svg-images--bn-icon--user-dims;
}
.bn-icon-view {
@extend .svg-images--bn-icon--view;
@extend .svg-images--bn-icon--view-dims;
transform: scale(0.95);
}
// Container
2014-08-13 02:41:18 +02:00
#BetterNavigator {
2015-12-18 00:58:50 +01:00
position: fixed;
z-index: 99999;
max-height: 100%;
overflow: auto;
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
2015-12-18 01:42:25 +01:00
line-height: 16px;
2015-12-18 00:58:50 +01:00
text-align: left;
2015-12-18 01:42:25 +01:00
a {
text-decoration: none;
}
form {
display:none;
}
// Toggle states
2015-12-18 00:58:50 +01:00
&.collapsed {
2015-12-18 01:42:25 +01:00
box-shadow: 0px 0px 3px rgba(0,0,0,0.5);
&.translucent {
opacity: 0.5;
transition: opacity 250ms;
&:hover {
opacity: 1;
}
}
2015-12-18 00:58:50 +01:00
#BetterNavigatorStatus {
border-width: 1px;
padding: 10px 15px 8px 35px;
2015-12-18 00:58:50 +01:00
}
#BetterNavigatorContent {
display: none;
}
}
&.right-top {
right: 0;
top: 0;
&.collapsed {
transform-origin: right top;
transform: rotate(90deg) translate(100%, 0);
}
}
&.right-bottom {
right: 0;
bottom: 0;
&.collapsed {
transform-origin: right bottom;
transform: rotate(90deg) translate(0, 100%);
}
}
&.left-bottom {
left: 0;
bottom: 0;
&.collapsed {
transform-origin: left bottom;
transform: rotate(90deg) translate(-100%, 0);
}
}
&.left-top {
left: 0;
top: 0;
&.collapsed {
transform-origin: left top;
transform: rotate(90deg) translate(0, -100%);
}
}
2014-08-13 02:41:18 +02:00
}
// Status
2015-12-18 01:42:25 +01:00
2014-08-13 02:41:18 +02:00
#BetterNavigatorStatus {
color: $textColor;
2015-12-18 01:42:25 +01:00
background: $archiveColor;
border: 1px solid mix($black, $archiveColor, 10%);
border-width: 0;
2015-12-18 00:58:50 +01:00
text-transform: uppercase;
cursor: pointer;
padding: 10px 15px 8px;
font-weight: bold;
2023-07-31 03:36:05 +02:00
transition: 100ms background-color ease-in-out;
font-size: 14px;
margin: 0;
#BetterNavigatorStatusButton {
appearance: none;
width: 100%;
height: 38px;
position: absolute;
top: 0;
left: 0;
border: 0;
background: transparent;
text-align: left;
padding: 2px 14px 0;
}
2015-12-18 00:58:50 +01:00
.bn-icon-cog {
margin: -4px 8px -2px -4px;
2015-12-18 00:58:50 +01:00
}
.bn-icon-close {
float: right;
}
.bn-icon-cog,
.bn-icon-close {
opacity: .7;
}
&:hover,
&:focus-visible {
background: mix($black, $archiveColor, 5%);
2015-12-18 00:58:50 +01:00
.bn-icon-cog,
.bn-icon-close {
opacity: 1;
}
}
2015-12-18 01:42:25 +01:00
&.Live {
background: $liveColor;
border-color: mix($black, $liveColor, 10%);
2015-12-18 01:42:25 +01:00
&:hover {
background: mix($black, $liveColor, 5%);
2015-12-18 01:42:25 +01:00
}
}
2015-12-18 02:25:04 +01:00
&.Draft {
2015-12-18 01:42:25 +01:00
background: $stageColor;
border-color: mix($black, $stageColor, 10%);
2015-12-18 01:42:25 +01:00
&:hover {
background: mix($black, $stageColor, 5%);
2015-12-18 01:42:25 +01:00
}
}
2014-08-13 02:41:18 +02:00
}
// Content
2014-08-13 02:41:18 +02:00
#BetterNavigatorContent {
2015-12-18 00:58:50 +01:00
padding: 6px;
color: $contentColor;
background: $contentBackground;
border: 1px solid mix($black, $contentBackground, 10%);
2015-12-18 01:42:25 +01:00
border-width: 0 0 1px 1px;
min-width: 140px;
2023-07-31 03:36:05 +02:00
transition: 100ms background-color ease-in-out;
2015-12-18 00:58:50 +01:00
.bn-heading {
text-transform: uppercase;
font-size: 11px;
margin: 8px 0 4px 0;
font-weight: normal;
2015-12-18 00:58:50 +01:00
}
span[class^='bn-icon'],
span[class*=' bn-icon'] {
2015-12-18 00:58:50 +01:00
margin: -2px 5px -3px -2px;
}
a,
.bn-disabled {
2015-12-18 00:58:50 +01:00
display: block;
background: $buttonBackground;
color: $buttonColor;
2015-12-18 00:58:50 +01:00
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
border-radius: 5px;
border-bottom: 1px solid $buttonBorder;
2015-12-18 00:58:50 +01:00
margin: 0 0 4px 0;
padding: 6px 10px 5px 10px;
line-height: 16px;
font-weight: bold;
.light {
font-weight: normal;
}
}
a:focus-visible,
2023-07-31 03:36:05 +02:00
a:hover {
background: $white;
color: $black;
2015-12-18 00:58:50 +01:00
}
2023-07-31 03:36:05 +02:00
a:active {
background: mix($black, $buttonBackground, 10%);
border-color: mix($white, $buttonBorder, 10%);
}
.bn-disabled {
background: $buttonBackgroundDisabled;
color: $buttonColorDisabled;
2015-12-18 00:58:50 +01:00
cursor: default;
pointer-events: none;
2015-12-18 00:58:50 +01:00
}
2023-07-31 03:36:05 +02:00
.bn-links {
margin: 0;
padding: 0;
list-style-type: none;
2023-07-31 03:36:05 +02:00
> :last-child {
margin-bottom: 0;
}
}
2014-08-13 02:41:18 +02:00
}
// Some help for debugging info
2014-08-13 02:41:18 +02:00
body > p.message {
2015-12-18 00:58:50 +01:00
text-align: left;
background: #fff;
color: #222;
padding: 10px 20px;
margin: 0;
border-bottom: 1px solid #ccc;
border-left: 5px solid #1d8aff;
}