silverstripe-framework/admin/scss/_menu.scss

498 lines
8.0 KiB
SCSS
Raw Normal View History

/**
* Styles for the left hand side menu and header for the admin panels.
*
* Take into consideration CSS selector performance.
*
* @package framework
* @subpackage admin
*/
.cms-logo-header {
position: relative !important;
top:auto !important;
height:auto !important;
padding: 0;
line-height: 24px;
background-color: $color-brand-bg;
span {
color: $color-text-light;
display: block;
padding-left:26px;
a {
color: white;
display: inline;
}
}
}
.cms-logo {
2016-03-02 05:42:00 +01:00
box-shadow: inset 0 -1px darken($color-brand-bg, 4%);
overflow: hidden;
2016-03-02 05:42:00 +01:00
padding: $grid-y*1.5 8px;
2012-07-04 05:02:34 +02:00
position: relative;
vertical-align: middle;
font-size: $font-base-size;
2016-03-02 05:42:00 +01:00
transition: padding .2s;
2016-02-18 05:33:47 +01:00
min-height: 52px;
transition: padding .2s;
.version {
display: none;
}
2016-03-02 05:42:00 +01:00
a {
2012-07-04 05:02:34 +02:00
position: absolute;
top: $grid-y;
bottom: $grid-y;
display: block;
width: 24px;
background: $application-logo-small no-repeat center center;
text-indent: -9999em;
padding: 0 1px;
}
span {
font-weight: bold;
font-size: $font-base-size;
line-height: 16px;
2015-06-24 01:42:24 +02:00
padding: 6px 0;
margin-left: 32px;
}
}
.cms-login-status {
padding: $grid-y*1.5 8px;
line-height: 16px;
font-size: $font-base-size - 1;
2016-03-02 05:42:00 +01:00
min-height: 28px;
transition: padding .2s;
.logout-link {
float: left;
2015-08-25 05:03:29 +02:00
font-size: 16px;
2016-02-18 05:33:47 +01:00
height: 28px;
2015-08-25 05:03:29 +02:00
padding: 6px 8px 6px 5px;
opacity: .9;
color: #fff;
2015-06-24 01:42:24 +02:00
&:hover, &:focus{
2015-08-25 05:03:29 +02:00
opacity: 1;
text-decoration: none;
}
}
2015-06-24 01:42:24 +02:00
span {
2015-08-28 02:01:27 +02:00
padding: 6px 0 6px 26px;
2015-06-24 01:42:24 +02:00
}
}
2011-04-15 01:27:23 +02:00
.cms-menu {
z-index: 80;
2016-03-02 05:42:00 +01:00
background: $color-theme-bg;
width: ($grid-x * 20);
2016-03-02 05:42:00 +01:00
.cms-menu-list {
margin: $grid-y * 1.5 0 0 0;
}
2011-04-15 01:27:23 +02:00
a {
text-decoration: none;
}
2011-05-13 03:30:49 +02:00
.cms-panel-content {
width: ($grid-x * 20);
overflow-x: hidden;
overflow-y: auto;
position: relative !important;
top:auto !important;
left:auto !important;
2016-03-02 05:42:00 +01:00
box-shadow: inset #C1C7CC -1px 0 0
2011-05-13 03:30:49 +02:00
}
2011-05-13 03:30:49 +02:00
&.collapsed {
2016-03-02 05:42:00 +01:00
width: ($grid-x * 7.5) !important; // Using important because JavaScript is overriding this value
2011-05-13 03:30:49 +02:00
cursor: auto;
z-index: 1000;
.cms-panel-header {
width: 30px;
span {
display: none;
}
}
2011-05-13 03:30:49 +02:00
.cms-menu-list {
overflow-x: hidden;
overflow-y: auto;
2016-03-02 05:42:00 +01:00
li {
width: 100%;
float: left;
ul {
2016-03-02 05:42:00 +01:00
display: none;
}
2011-05-13 03:30:49 +02:00
}
2016-02-18 05:33:47 +01:00
}
2016-02-18 05:33:47 +01:00
span.text {
display: none;
}
2016-03-02 05:42:00 +01:00
.cms-login-status,
.cms-logo {
2016-02-18 05:33:47 +01:00
height: 52px;
padding: 12px 18px 11px;
2016-03-02 05:42:00 +01:00
span {
display: none;
}
}
2011-05-13 03:30:49 +02:00
&.cms-panel .cms-panel-content {
display: block; // override panel defaults
}
2015-05-19 03:43:43 +02:00
.ss-ui-button.sticky-toggle {
width: 50%;
}
2016-03-02 05:42:00 +01:00
.cms-menu-list li a {
padding-left: 18px;
padding-right: 18px;
}
.ss-ui-button.sticky-toggle {
background-position: 12px center;
}
2015-05-19 03:43:43 +02:00
}
.cms-panel-toggle {
2016-03-02 05:42:00 +01:00
height: 52px;
2015-05-19 03:43:43 +02:00
a,
a.toggle-expand {
float: right;
2016-03-02 05:42:00 +01:00
width: 50%;
padding-top: 16px;
padding-bottom: 16px;
2015-05-19 03:43:43 +02:00
}
}
.ss-ui-button.sticky-toggle {
float: left;
2016-03-02 05:42:00 +01:00
width: 52px;
height: 52px;
2015-05-19 03:43:43 +02:00
margin: 0;
2016-03-02 05:42:00 +01:00
padding: $grid-x;
2015-05-19 03:43:43 +02:00
text-indent: -999em;
background-color: transparent;
background-image: url(../images/sticky-toggle-off.png);
background-repeat: no-repeat;
2016-03-02 05:42:00 +01:00
background-position: 16px center;
2015-05-19 03:43:43 +02:00
border: 0;
2016-03-02 05:42:00 +01:00
transition: position .2s;
2015-05-19 03:43:43 +02:00
&:hover {
2016-02-10 23:13:32 +01:00
box-shadow: 0 0 0;
2015-05-19 03:43:43 +02:00
}
&.active {
background-image: url(../images/sticky-toggle-on.png);
}
.ui-button-text {
padding: 0;
}
// When the button is hovered, show the status indicator
&:hover {
+ .sticky-status-indicator {
display: block;
2016-03-02 05:42:00 +01:00
padding: 3px 3px 0;
2015-05-19 03:43:43 +02:00
}
}
}
.sticky-status-indicator {
display: none;
position: absolute;
top: -22px;
left: 2px;
font-size: 9px;
color: #555d60;
text-transform: uppercase;
2016-03-02 05:42:00 +01:00
}
// Sub menu (will also be available for profile)
.toggle-children {
display: inline-block;
float: right;
width: 20px;
height: 100%;
cursor: pointer;
padding-top: 17px;
}
.child-flyout-indicator,
.toggle-children-icon {
background-image: none;
border-color: darken(#ccdce6, 25%);
border-style: solid;
border-width: 0 1px 1px 0;
width: 8px;
height: 8px;
position: absolute;
margin-top: 3px;
right: 8px;
z-index: 2;
-ms-transform: rotate(-45deg); /* IE 9 */
-webkit-transform: rotate(-45deg); /* Chrome, Safari, Opera */
transform: rotate(-45deg);
// display: none; /* To be shown by javascript, see LeftAndMain.Panel.js */
}
.opened .toggle-children-icon {
margin-top: 1px;
}
&.collapsed .child-flyout-indicator {
margin-top: -29px;
2011-05-13 03:30:49 +02:00
}
2011-04-15 01:27:23 +02:00
}
.cms-menu-list {
2016-03-02 05:42:00 +01:00
a:focus,
a:active {
text-decoration: none;
}
2011-04-15 01:27:23 +02:00
li {
2016-03-02 05:42:00 +01:00
line-height: 18px; /* new v4 global line-height */
2011-04-15 01:27:23 +02:00
a {
display: block;
line-height: $grid-y * 2;
2016-02-18 05:33:47 +01:00
min-height: 50px;
font-size: $font-base-size;
2016-03-02 05:42:00 +01:00
color: $color-text-default;
padding: (2 * $grid-y + 1) 5px (2 * $grid-y + 1) 8px;
background-color: $base-menu-bg;
cursor: pointer;
position: relative;
2016-03-02 05:42:00 +01:00
transition: padding .2s;
text-decoration: none;
box-shadow: inset $color-separator -1px 0 0;
&:hover {
text-decoration: none;
background-color: $base-menu;
color: darken($color-text-dark, 5%);
}
&:focus,
&:active {
background-color: $base-menu;
text-decoration: none;
}
.icon {
display: block;
position: absolute;
top: 50%;
margin-left: $grid-x / 2;
margin-top: -8px;
opacity: 0.7;
2011-04-15 01:27:23 +02:00
}
2011-04-15 01:27:23 +02:00
.text {
display: block;
margin-left: 30px;
}
2016-03-02 05:42:00 +01:00
span.toggle-children {
top: 0;
2011-04-15 01:27:23 +02:00
}
2016-03-02 05:42:00 +01:00
}
2016-03-02 05:42:00 +01:00
.icon {
display: block;
position: absolute;
top: 50%;
margin-left: $grid-x / 2;
margin-top: -8px;
opacity: 0.7;
}
2016-03-02 05:42:00 +01:00
&.current { //need to apply current stlye to flyout also (at least line height)
&>a {
background-color: $base-menu;
.toggle-children {
.toggle-children-icon {
@extend .icon-sprites-32x32;
@include sprite($sprites-32x32-menu-arrow-down);
}
}
}
2016-03-02 05:42:00 +01:00
a {
background-color: $base-menu;
}
ul {
border-top: none;
display: block;
2011-04-15 01:27:23 +02:00
}
li {
2016-03-02 05:42:00 +01:00
background-color: $base-menu-bg;
2016-03-02 05:42:00 +01:00
a {
&.current,
&:hover {
2016-03-02 05:42:00 +01:00
background-color: $base-menu;
}
2016-03-02 05:42:00 +01:00
}
2016-03-02 05:42:00 +01:00
}
}
2016-03-02 05:42:00 +01:00
// Has sub menu
&.children {
.no-icon.text {
margin-left: 30px;
}
// Sub menu
ul li a {
font-size: 12px;
line-height: 18px;
height: 18px;
padding-top: 11px;
padding-bottom: 11px;
color: lighten($color-text-default, 10%);
background-color: $base-menu-bg;
span.text {
margin-left: 23px;
}
2016-03-02 05:42:00 +01:00
}
2016-03-02 05:42:00 +01:00
&.current {
> a {
background-color: transparent;
&:hover {
background-color: lighten($base-menu, 3%);
}
}
2011-04-15 01:27:23 +02:00
}
2016-03-02 05:42:00 +01:00
&.opened {
a:hover {
background-color: lighten($base-menu, 3%);
}
.current a {
background-color: $base-menu;
}
.opened .toggle-children-icon {
transform: rotate(45deg);
}
}
}
/* Style applied to the menu flyout only when the collapsed setting */
2016-03-02 05:42:00 +01:00
.collapsed-flyout {
left: 59px;
margin-top: -52px;
position: fixed;
width: 160px;
z-index: 1;
display: none;
.icon {
display: none;
}
li {
a {
2016-03-02 05:42:00 +01:00
background: $base-menu-bg;
box-shadow: none;
padding: 10px 0;
height: 40px;
2016-03-02 05:42:00 +01:00
line-height: 18px;
&:hover,
&:active {
background: lighten($base-menu, 3%);
}
}
2016-03-02 05:42:00 +01:00
&.children a {
font-size: 13px;
height: 18px;
cursor: default;
}
2016-03-02 05:42:00 +01:00
&.current {
a {
background-color: $base-menu;
}
&.children a {
background-color: $base-menu-bg;
}
}
}
}
2011-04-15 01:27:23 +02:00
}
2011-05-13 03:30:49 +02:00
&.collapsed {
2016-03-02 05:42:00 +01:00
.toggle-children {
2011-05-13 03:30:49 +02:00
display: none;
}
2016-03-02 05:42:00 +01:00
.opened {
ul.collapsed-flyout {
border-radius: 0px 2px 2px 0px ;
border: 1px solid #d2d5d8;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
li {
&.clone {
a {
padding: 15px 0 15px 70px;
margin-left: -60px;
margin-right: 0px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
2016-03-02 05:42:00 +01:00
span.text {
margin-left: -10px;
}
}
}
a span.text {
display: block;
margin-left: 0;
}
}
}
.child-flyout-indicator {
position: fixed;
left: 196px;
transform: rotate(45deg);
margin-top: -33px;
}
}
2011-05-13 03:30:49 +02:00
}
2016-02-18 05:33:47 +01:00
}