silverstripe-framework/scss/GridField.scss
Ingo Schommer bcc73de85e Merge branch '106-add-edit-records-rc'
Conflicts:
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/_style.scss
	admin/templates/Includes/LeftAndMain_EditForm.ss
	css/GridField.css
	filesystem/Folder.php
	forms/gridfield/GridField.php
	forms/gridfield/GridFieldDefaultColumns.php
	forms/gridfield/GridFieldPopupForms.php
2012-02-27 23:58:10 +01:00

249 lines
5.3 KiB
SCSS

/**
* Core styles for the basic GridField form field without any specific style.
*
* @package sapphire
* @subpackage scss
* @todo Add radial gradient to default delete button state
* @todo Create SASS mixin-function to simply swap the from/to, to to/from colours in grsdient mixins?
*/
@import "compass/css3";
@import "compass/css3/images";
@import "compass/css3/text-shadow";
@import "compass/css3/border-radius";
$gf_colour_gradient_light: #B1C0C5;
$gf_colour_gradient_dark: #7F9198;
$gf_colour_base: #95a5ab;
$gf_colour_header_border: #819198;
$gf_colour_subheader: #BAC8CE;
$gf_colour_border: rgba(0,0,0,.1);
$gf_colour_zebra: #F0F4F7;
$gf_colour_font: #666;
$gf_colour_text_shadow: rgba(0,0,0,.3);
$gf_border_radius: 7px;
@mixin box-shadow-none {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.cms {
.ss-gridfield {
& > div {
margin-bottom: 35px;
}
&[data-selectable] {
tr.ui-selected, tr.ui-selecting {
background: #FFFAD6 !important;
}
td {
cursor: pointer;
}
}
}
table.ss-gridfield-table {
display: table;
box-shadow: none;
padding: 0;
border-collapse: separate;
border-bottom: 0 none;
width: 100%;
thead {
color: darken($gf_colour_base, 50%);
background: transparent;
}
tbody {
background: #FFF;
td {
/* Emulate a link by default */
button {
border: none;
background: none;
margin: 0 0 0 2px;
padding: 0;
width: auto;
text-shadow: none;
}
}
}
tfoot {
color: darken($gf_colour_base, 50%);
tr {
td {
background: $gf_colour_base;
padding: .7em;
border-bottom: 1px solid rgba(0,0,0,.1);
}
}
}
tr {
&.title {
@include border-top-radius($gf_border_radius);
th {
position: relative;
background: $gf_colour_gradient_dark;
border-top: 1px solid $gf_colour_border;
padding: 5px;
min-height: 40px;
@include background-image(linear-gradient($gf_colour_gradient_light, $gf_colour_gradient_dark));
@include border-top-radius($gf_border_radius);
@include single-text-shadow($gf_colour_text_shadow, 0px, -1px, 0);
h2{
padding: 0px;
font-size: 16px;
color:#fff;
margin:0;
display:inline;
}
.new{
font-size: 14px;
border-color: $gf_colour_border;
float: right;
}
}
}
&.sortable-header {
background: $gf_colour_subheader;
}
&:hover {
background: #FFFAD6 !important;
}
&:first-child {
background: transparent;
}
&.ss-gridfield-even {
background: $gf_colour_zebra;
&.ss-gridfield-last {
border-bottom: none;
}
}
&.even {
background: $gf_colour_zebra;
}
th {
font-weight: bold;
font-size: 12px;
color: #FFF;
padding: 5px;
border-right: 1px solid $gf_colour_border;
&.main:first-child{
//@include border-top-left-radius($gf_border_radius);
}
&.main:last-child{
//@include border-top-right-radius($gf_border_radius);
}
div {
&.fieldgroup,&.fieldgroup-field {
width: auto;
}
&.fieldgroup {
min-width: 200px;
padding-right:0;
}
}
&.extra,&.action {
padding: 0;
cursor: default;
button,button:hover {
&.ss-ui-button {
margin-left: .9em;
color: #222;
}
}
}
&.main{
border-top: 1px solid $gf_colour_border;
color:#fff;
background: darken($gf_colour_subheader,10%);
border-bottom: 1px solid $gf_colour_border;
span{
@include single-text-shadow($gf_colour_text_shadow, 0px, -1px, 0);
}
}
&.extra {
background: $gf_colour_subheader;
padding: 5px;
border-top: $gf_colour_text_shadow;
span {
width: auto;
display: inline;
position: static;
}
button.ss-ui-button {
padding: .3em;
line-height: 1;
@include box-shadow-none;
position: relative;
border-bottom-width: 0;
@include border-radius(2px, 2px);
}
}
&.action {
border-right: 0;
}
&.first {
@include border-top-left-radius($gf_border_radius);
}
&.last {
@include border-top-right-radius($gf_border_radius);
}
button {
&:hover {
color: #ccc !important; /* Not sure why IE think it needs this */
}
&.ss-gridfield-sort:hover {
color: #fff !important;
@include box-shadow-none;
}
&.ss-gridfield-sort {
background: transparent url(../images/arrows-01.png) no-repeat right 2px;
border:none;
width:100%;
text-align: left;
padding: 4px 0;
@include single-text-shadow($gf_colour_text_shadow, 0px, -1px, 0);
color: #fff;
@include border-radius(0);
}
}
input {
&.ss-gridfield-sort {
padding: 2px;
&:focus {
@include box-shadow-none;
}
}
}
}
td {
border-right: 1px solid $gf_colour_border;
padding: 7px 12px;
color: $gf_colour_font;
&.bottom-all {
@include border-bottom-radius($gf_border_radius);
@include background-image(linear-gradient($gf_colour_gradient_light, $gf_colour_gradient_dark));
}
}
&.last td {
border-bottom: 0 none;
}
}
td:first-child, th:first-child{
border-left: 1px solid $gf_colour_border;
}
}
}