silverstripe-framework/admin/scss/_menu.scss

206 lines
4.5 KiB
SCSS
Raw Normal View History

/**
* Styles for the left hand side menu
*
* @package sapphire
* @subpackage admin
*/
/** -------------------------------------------------------
* CMS Menu Bar
* -------------------------------------------------------- */
@import "compass/css3";
2011-04-15 01:27:23 +02:00
.cms-menu {
z-index: 10;
background: $color-menu-background;
border-right: 1px solid $color-menu-border;
width: 250px;
overflow: auto;
2011-04-15 01:27:23 +02:00
@include box-shadow($color-shadow-dark, 2px, 0, 6px);
2011-04-15 01:27:23 +02:00
a {
text-decoration: none;
}
2011-05-13 03:30:49 +02:00
.cms-panel-content {
width: 250px; // avoids floating of elements when collapsed
}
// toggled via JS
&.collapsed {
width: 40px;
cursor: auto;
.cms-menu-list {
li span.text {
display: none;
}
li ul {
display: none;
}
}
&.cms-panel .cms-panel-content {
display: block; // override panel defaults
}
}
2011-04-15 01:27:23 +02:00
}
.cms-menu-list {
li {
a {
display: block;
height: 30px;
line-height: 30px;
2011-04-15 01:27:23 +02:00
vertical-align: middle;
font-size: $font-base-size;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-shadow: lighten($color-base, 10%) 1px 1px 0;
color: $color-text-dark;
padding: 5px;
background-color: $color-base;
@include linear-gradient(color-stops(
$color-base,
darken($color-base, 8%)
));
border-top: 1px solid lighten($color-base, 10%);
border-bottom: 1px solid darken($color-base, 20%);
&:hover {
text-decoration: none;
background-color: lighten($color-base, 2%);
border-bottom: 1px solid darken($color-base, 15%);
color: lighten($color-text-dark, 5%);
@include linear-gradient(color-stops(
lighten($color-base, 5%),
$color-base
));
}
&:focus {
border-top: 1px solid darken($color-base, 5%);
text-decoration: none;
background-color: darken($color-base, 5%);
color: lighten($color-text-dark, 10%);
@include linear-gradient(color-stops(
darken($color-base, 10%),
darken($color-base, 5%)
));
}
2011-04-15 01:27:23 +02:00
.icon {
display: block;
float: left;
margin-right: 4px;
2011-04-15 01:27:23 +02:00
@include sprite-background("icons-32.png");
@include sprite-position(1, 1);
}
2011-05-13 07:10:50 +02:00
&:hover .icon {
@include sprite-position(2, 1);
}
2011-04-15 01:27:23 +02:00
.text {
display: block;
}
}
2011-04-15 01:27:23 +02:00
&.current {
a {
color: $color-text-light;
text-shadow: darken($color-menu-button, 20%) 0 -1px 0;
border-top: 1px solid lighten($color-menu-button, 10%);
border-bottom: 1px solid darken($color-menu-button, 20%);
background-color: $color-menu-button;
@include linear-gradient(color-stops(
$color-menu-button,
darken($color-menu-button, 10%)
));
}
2011-04-15 01:27:23 +02:00
ul {
border-top: 1px solid darken($color-menu-button, 20%);
2011-04-15 01:27:23 +02:00
}
2011-05-13 07:10:50 +02:00
a .icon {
@include sprite-position(2, 1);
}
}
ul {
display: none;
}
&.opened ul {
display: block;
}
2011-05-13 07:10:50 +02:00
// nested elements
li {
li {
background-color: darken($color-menu-button, 10%);
a {
font-size: $font-small-size;
padding: 0 10px 0 36px;
height: 32px;
line-height: 32px;
color: lighten($color-menu-button, 45%);
background: none;
border-top: 1px solid $color-menu-button;
border-bottom: 1px solid darken($color-menu-button, 20%);
&.current,
&:hover {
background: darken($color-menu-button, 5%);
border-top: 1px solid darken($color-menu-button, 5%);
color: $color-text-light;
}
&:focus {
background: darken($color-menu-button, 15%);
border-top: 1px solid darken($color-menu-button, 20%);
color: lighten($color-menu-button, 60%);
}
}
&.current a {
font-weight: bold;
color: $color-text-light;
}
&.first a {
border-top: none;
}
2011-04-15 01:27:23 +02:00
}
}
}
2011-05-13 03:30:49 +02:00
li#Menu-CMSMain a .icon {@include sprite-position(1, 1);}
li#Menu-CMSMain.current a .icon, li#Menu-CMSMain a:hover .icon {@include sprite-position(2, 1);}
2011-05-13 07:10:50 +02:00
li#Menu-AssetAdmin a .icon {@include sprite-position(1, 4);}
li#Menu-AssetAdmin.current a .icon, li#Menu-AssetAdmin a:hover .icon {@include sprite-position(2, 4);}
li#Menu-SecurityAdmin a .icon {@include sprite-position(1, 5);}
li#Menu-SecurityAdmin.current a .icon, li#Menu-SecurityAdmin a:hover .icon {@include sprite-position(2, 5);}
li#Menu-CMSPagesController a .icon {@include sprite-position(1, 2);}
li#Menu-CMSPagesController.current a .icon, li#Menu-CMSPagesController a:hover .icon {@include sprite-position(2, 2);}
2011-05-13 03:30:49 +02:00
&.collapsed {
li .text {
display: none;
}
li > li {
display: none;
}
}
2011-04-15 01:27:23 +02:00
}