/** * This file defines common styles for form elements used throughout the CMS interface. * It is an addition to the base styles defined in sapphire/css/Form.css. * * @package sapphire * @subpackage admin */ /** ---------------------------------------------------- * Basic form fields * ---------------------------------------------------- */ form.nostyle { @include clear-form-field-styles(); } .field { display: block; // bottom padding accounts for the border and we have a negative // margin with a postive padding to ensure the bottom border extends // over the edges padding: 0 $grid-horizontal $grid-vertical - 1 $grid-horizontal; margin: 0 $grid-horizontal * -1 $grid-vertical ($grid-horizontal * -1); border-bottom: 1px solid $color-shadow-light; overflow: hidden; &.noLabel { .middleColumn { margin-left: 0; } } label.left { float: left; width: $grid-horizontal * 22; padding: $grid-vertical $grid-horizontal $grid-vertical 0; line-height: $grid-vertical * 2; span { display: block; font-size: $font-base-size - 1; color: lighten($color-text, 25%); @include hide-text-overflow(); } } .middleColumn { margin-left: $grid-horizontal * 23; /* 23 as we lose a column on the field padding */ } input.text, textarea, select { width: 90%; max-width: $grid-horizontal * 64; } input.text, textarea, .TreeDropdownField { background: #fff; border: 1px solid lighten($color-medium-separator, 20%); // remove 1px for the border. padding: ($grid-vertical - 1) ($grid-horizontal - 1); margin: 0; outline: none; @include border-radius(4px); @include background-image(linear-gradient(#efefef, #fff 10%, #fff 90%, #efefef)); &:focus { border: 1px solid $color-medium-separator; } } /* TreeDropdowns */ .TreeDropdownField { padding: 0; .panel { margin-top: $grid-vertical * -0.5; border: 1px solid lighten($color-medium-separator, 20%); border-top: none; @include border-bottom-left-radius(4px); @include border-bottom-right-radius(4px); } } select { margin-top: $grid-vertical; } } /** ---------------------------------------------------- * Buttons * ---------------------------------------------------- */ .cms { input.loading, input.ui-state-default.loading, .ui-widget-content input.ui-state-default.loading, .ui-widget-header input.ui-state-default.loading { padding-left: ($grid-horizontal * 2) - 1; background: $color-widget-bg url(../../images/network-save.gif) no-repeat center left; } .ss-ui-button.ss-ui-action-constructive, .ui-widget-content .ss-ui-button.ss-ui-action-constructive, .ui-widget-header .ss-ui-button.ss-ui-action-constructive { padding-left: ($grid-horizontal * 4) - 1; color: $color-text-light; border-color: $color-button-constructive-border; @include background(image-url("../images/btn_icons_sprite.png") no-repeat 5px 6px, linear-gradient(color-stops( $color-button-constructive-light, $color-button-constructive-dark )) ); background-color: $color-button-constructive-light; @include text-shadow(darken($color-base, 40%) 1px 1px 0); @include box-shadow(darken($color-base, 20%) 1px 1px 2px); } .ss-ui-button.ss-ui-action-constructive.ui-state-hover { @include background(image-url("../images/btn_icons_sprite.png") no-repeat 5px 6px, linear-gradient(color-stops( darken($color-button-constructive-light, 2%), darken($color-button-constructive-dark, 3%) )) ); background-color: $color-button-constructive-dark; @include box-shadow(darken($color-base, 10%) 1px 1px 1px); } .ss-ui-button.ss-ui-action-constructive.cms-page-add-button { background-position: 5px -155px; } .ss-ui-button.ss-ui-action-destructive, .ui-widget-content .ss-ui-button.ss-ui-action-destructive, .ui-widget-header .ss-ui-button.ss-ui-action-destructive { color: $color-button-destructive; background-color: $color-button-generic-light; } .ss-ui-button.ss-ui-action-destructive.delete { padding-left: 23px; color: $color-button-destructive; border-color: $color-button-generic-border; @include background(image-url("../images/btn_icons_sprite.png") no-repeat 5px -26px, linear-gradient(color-stops( $color-button-generic-light, $color-button-generic-dark )) ); @include text-shadow(none); @include box-shadow(darken($color-base, 2%) 1px 1px 2px); } .ss-ui-button.ss-ui-action-destructive.delete.ui-state-hover { @include background(image-url("../images/btn_icons_sprite.png") no-repeat 5px -26px, linear-gradient(color-stops( darken($color-button-generic-light, 2%), darken($color-button-generic-dark, 3%) )) ); background-color: $color-button-generic-dark; @include box-shadow(darken($color-base, 10%) 1px 1px 1px); } .ss-ui-button.ss-ui-action-minor, .ui-widget-content .ss-ui-button.ss-ui-action-minor .ui-widget-header .ss-ui-button.ss-ui-action-minor { background: none; padding: 0; border: 0; color: $color-text-dark; text-decoration: underline; } } /** ---------------------------------------------------- * Grouped form fields * ---------------------------------------------------- */ .fieldgroup { .fieldgroup-field { float: left; display: block; width: $grid-horizontal * 23; padding-right: $grid-horizontal; &.odd { } &.even { } } } /** ---------------------------------------------------- * Checkbox Field * ---------------------------------------------------- */ .field { &.checkbox { padding-left: $grid-horizontal * 24; margin-bottom: $grid-vertical; } } /** ---------------------------------------------------- * Optionsets and Checkboxsets * ---------------------------------------------------- */ .optionset { overflow: hidden; padding-bottom: 8px; li { float: left; display: block; width: $grid-horizontal * 27; padding: $grid-vertical $grid-horizontal 0; line-height: $grid-vertical * 2; list-style: none; position: relative; input { position: absolute; top: $grid-vertical + 1; // used to get the input off the edge, the overflow left: 2px; // hidden crops the glow. margin: 0; } label { display: block; cursor: pointer; padding: 0 0 0 $grid-vertical * 2; } } } /** ---------------------------------------------------- * HTML Text * ---------------------------------------------------- */ .htmleditor { label { display: block; float: none; padding-bottom: 10px; } .middleColumn { margin-left: 0px; clear: left; } } .action-hidden { display: none; }