mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-21 00:46:07 +02:00
454 lines
8.2 KiB
SCSS
454 lines
8.2 KiB
SCSS
|
|
/* -------------------------- */
|
|
.cms-content-controls,
|
|
.toolbar--south {
|
|
|
|
/* Styling for icons in controls */
|
|
.icon-view, .preview-selector.dropdown a.chosen-single {
|
|
white-space: nowrap;
|
|
&:before {
|
|
display:inline-block;
|
|
float:left;
|
|
width: 20px;
|
|
overflow: hidden;
|
|
color: $color-text-dark;
|
|
}
|
|
}
|
|
|
|
/* Preview selectors. Overrides default chosen styles and applies its own */
|
|
.preview-selector {
|
|
float:right;
|
|
border-bottom:none;
|
|
position:relative;
|
|
box-shadow: none;
|
|
margin: 2px 0 0 4px;
|
|
padding: 0;
|
|
height: 28px;
|
|
|
|
.chosen-container {
|
|
width: auto !important; //over-ride chosen inline styles for preview selector
|
|
}
|
|
|
|
a.chosen-single {
|
|
width: 28px;
|
|
padding: 6px;
|
|
height: 28px;
|
|
margin: -2px 0 0;
|
|
filter: none; /* remove ie background */
|
|
background: none;
|
|
border: none;
|
|
box-shadow: none;
|
|
border-radius: 3px;
|
|
|
|
&::before {
|
|
font-size: 18px;
|
|
margin-top: -1px;
|
|
margin-left: -1px;
|
|
}
|
|
|
|
&:hover, &.chosen-single-with-drop {
|
|
background-color: darken($color-widget-bg,6%);
|
|
box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 $box-shadow-shine;
|
|
}
|
|
&.chosen-single-with-drop {
|
|
border-radius: 0 0 3px 3px;
|
|
}
|
|
div {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
// Rise up from bottom instead of down from top
|
|
.chosen-drop {
|
|
bottom: 32px !important;
|
|
top: auto !important;
|
|
}
|
|
|
|
// Rise out from right, not from left (this needs to be done only when visible)
|
|
.chosen-with-drop .chosen-drop {
|
|
left: auto !important;
|
|
right: 0 !important;
|
|
width: auto !important;
|
|
}
|
|
|
|
.chosen-drop{
|
|
padding: 0;
|
|
margin-top: -5px;
|
|
|
|
border: 1px solid #aaa;
|
|
border-radius: 3px 3px 0 3px;
|
|
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
|
|
|
|
ul.chosen-results {
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: visible;
|
|
width: 135px;
|
|
|
|
li {
|
|
font-size: 12px;
|
|
line-height: 16px;
|
|
padding: 7px 16px 7px 6px;
|
|
color: $color-text-blue-link;
|
|
border-bottom: 1px solid #DDD;
|
|
background-color: #FFF;
|
|
|
|
&:before {
|
|
margin-right: 2px;
|
|
font-size: 16px;
|
|
}
|
|
&.description {
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
&:before {
|
|
margin-top: 5px;
|
|
}
|
|
}
|
|
&.highlighted, &:hover, &:focus {
|
|
color: $color-text-blue-link;
|
|
filter: none;
|
|
background: lighten($color-widget-bg, 2%);
|
|
text-decoration: none;
|
|
}
|
|
&.first {
|
|
border-radius: 3px 3px 0 0;
|
|
}
|
|
&.last {
|
|
border-bottom: none;
|
|
border-radius: 0 0 0 3px;
|
|
}
|
|
&.restricted { /* disable option (eg.split mode for smaller screen sizes) */
|
|
color: #CCC;
|
|
background-color: #EEE;
|
|
pointer-events: none;
|
|
/*text-decoration: line-through;*/
|
|
&:before {
|
|
opacity: 0.2;
|
|
}
|
|
}
|
|
|
|
/* Description styling */
|
|
span {
|
|
display: block;
|
|
color: lighten($color-text-dark, 30%);
|
|
font-size: 0.85em;
|
|
line-height: 1.1em;
|
|
padding-left: 23px;
|
|
}
|
|
.icon-view {
|
|
margin-right: 4px;
|
|
}
|
|
}
|
|
|
|
li.result-selected {
|
|
background: darken($color-widget-bg, 2%);
|
|
color: $color-text;
|
|
|
|
&.highlighted, &:hover, &:focus {
|
|
background: darken($color-widget-bg, 4%);
|
|
color: $color-text;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-disabled {
|
|
.chosen-drop ul.chosen-results li.font-icon-columns {
|
|
&, &.highlighted, &:hover, &:focus {
|
|
color: $color-text-disabled;
|
|
background: #fff;
|
|
pointer-events: none;
|
|
cursor: default;
|
|
}
|
|
|
|
&::before {
|
|
color: $color-text-disabled;
|
|
}
|
|
}
|
|
}
|
|
|
|
.disabled-tooltip {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 32px;
|
|
background: rgba(255, 255, 255, 0); // Prevent clicking on browsers that do not support pointer-events: none;
|
|
|
|
&::before {
|
|
content: 'Screen size too small';
|
|
text-align: center;
|
|
background: #555;
|
|
color: white;
|
|
padding: 4px 0;
|
|
position: absolute;
|
|
top: -24px;
|
|
left: -1px;
|
|
right: -1px;
|
|
border-radius: 3px 3px 0 0;
|
|
display: none;
|
|
z-index: 2;
|
|
}
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 10px;
|
|
height: 10px;
|
|
transform: rotate(45deg);
|
|
display: none;
|
|
background: #555;
|
|
left: 47%;
|
|
top: -6px;
|
|
}
|
|
|
|
&:hover::after,
|
|
&:hover::before {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
|
|
.cms-preview-states{
|
|
float: right;
|
|
select{
|
|
max-width:150px;
|
|
}
|
|
|
|
&.dropdown{
|
|
max-width:150px;
|
|
a.chosen-single{
|
|
span{
|
|
margin:0;
|
|
}
|
|
}
|
|
.chosen-container{
|
|
max-width:150px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Styling for the preview screen sizes */
|
|
.preview__device {
|
|
height: 100%;
|
|
}
|
|
|
|
.cms-preview {
|
|
background-color: $tab-panel-texture-color;
|
|
border-left: 1px solid $border-color-dark;
|
|
position: relative;
|
|
|
|
.cms-preview-overlay {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.preview-note {
|
|
color: #CDD7DC;
|
|
display: block;
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
height: 82px;
|
|
margin-top: -50px;
|
|
margin-left: -150px; /* half of width */
|
|
position: absolute;
|
|
text-align: center;
|
|
text-shadow: 0 1px 0 #fff;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 300px;
|
|
|
|
span {
|
|
@extend .icon-sprites-64x64;
|
|
@include sprite($sprites-64x64-preview);
|
|
|
|
height: 41px;
|
|
margin: 0 auto 20px;
|
|
width: 50px;
|
|
}
|
|
}
|
|
|
|
.panel {
|
|
position: relative;
|
|
height: calc(100vh - #{$toolbar-total-height});
|
|
|
|
.preview-device-outer {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
.preview-device-inner {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: $white;
|
|
|
|
iframe {
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
width: 100%;
|
|
border: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.mobile,
|
|
&.tablet,
|
|
&.desktop {
|
|
.panel {
|
|
background-color: $tab-panel-texture-color; /* cover website preview icon */
|
|
overflow: auto;
|
|
}
|
|
|
|
.preview__device {
|
|
margin: auto;
|
|
text-align: center;
|
|
height: auto;
|
|
|
|
&::after {
|
|
color: $body-color-lighter;
|
|
position: relative;
|
|
top: -24px;
|
|
transition: all .3s ease-in-out;
|
|
}
|
|
}
|
|
|
|
.preview-device-outer {
|
|
transition: all .3s ease-out;
|
|
border-radius: 7px;
|
|
background: lighten(#D2DBE0, 1%);
|
|
border: 1px solid transparent;
|
|
padding: $spacer-y;
|
|
box-sizing: content-box;
|
|
text-align: left;
|
|
margin: $spacer-y auto #{$spacer-y * 2};
|
|
}
|
|
}
|
|
|
|
&.mobile,
|
|
&.tablet {
|
|
.preview-device-outer {
|
|
transform: rotate(0deg);
|
|
transition: all .3s ease-in;
|
|
overflow: hidden;
|
|
|
|
&::after {
|
|
content: 'Rotate';
|
|
font-size: $font-size-xxs;
|
|
text-transform: uppercase;
|
|
color: darken(#D2DBE0, 25%);
|
|
top: 0;
|
|
right: $spacer-x;
|
|
position: absolute;
|
|
letter-spacing: .5px;
|
|
}
|
|
|
|
&:hover {
|
|
background: darken(#D2DBE0, 10%);
|
|
cursor: pointer;
|
|
}
|
|
|
|
&:hover::after {
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.rotate {
|
|
&::after {
|
|
top: -148px;
|
|
}
|
|
|
|
.preview-device-outer {
|
|
transform: rotate(-90deg);
|
|
|
|
.preview-device-inner {
|
|
transform: rotate(90deg);
|
|
}
|
|
}
|
|
}
|
|
|
|
.preview-device-inner {
|
|
transform: rotate(0deg);
|
|
transition: all .3s ease-out;
|
|
}
|
|
}
|
|
|
|
&.mobile {
|
|
.preview__device {
|
|
min-width: calc(#{$mobile-width} + #{$spacer-x} * 4);
|
|
|
|
&::after {
|
|
content: '#{$mobile-width} x #{$mobile-height}';
|
|
}
|
|
}
|
|
|
|
.preview-device-outer {
|
|
min-height: $mobile-height;
|
|
width: $mobile-width;
|
|
height: $mobile-height;
|
|
text-align: left;
|
|
}
|
|
|
|
.rotate {
|
|
min-width: calc(#{$mobile-height} + #{$spacer-x} * 4);
|
|
|
|
&::after {
|
|
content: '#{$mobile-height} x #{$mobile-width}';
|
|
}
|
|
|
|
.preview-device-inner {
|
|
transform-origin: $mobile-width / 2;
|
|
height: $mobile-width;
|
|
width: $mobile-height;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.tablet {
|
|
.preview__device {
|
|
min-width: calc(#{$tablet-width} + #{$spacer-x} * 4);
|
|
|
|
&::after {
|
|
content: '#{$tablet-width} x #{$tablet-height}';
|
|
}
|
|
}
|
|
|
|
.preview-device-outer {
|
|
min-height: $tablet-height;
|
|
width: $tablet-width;
|
|
height: $tablet-height;
|
|
}
|
|
|
|
.rotate {
|
|
min-width: calc(#{$tablet-height} + #{$spacer-x} * 4);
|
|
|
|
&::after {
|
|
content: '#{$tablet-height} x #{$tablet-width}';
|
|
}
|
|
|
|
.preview-device-inner {
|
|
transform-origin: $tablet-width / 2;
|
|
height: $tablet-width;
|
|
width: $tablet-height;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.desktop {
|
|
.preview__device {
|
|
min-width: calc(#{$desktop-width} + #{$spacer-x} * 4);
|
|
|
|
&::after {
|
|
content: '#{$desktop-width} x #{$desktop-height}';
|
|
}
|
|
}
|
|
|
|
.preview-device-outer {
|
|
min-height: $desktop-height;
|
|
width: $desktop-width;
|
|
height: $desktop-height;
|
|
}
|
|
}
|
|
}
|