Use SCSS instead of LESS

Convert all of Horizon's styles from LESS to SCSS, and use pyscss and
django_pyscss to compile them.

This lets us continue with the upgrade to Bootstrap 3, and the use of
django_pyscss also lets us include horizon's style files, with all the
variables, in plugins style files.

This partially implements the blueprint bootstrap-update.

Change-Id: I1bc9b4ded5de2393c8e57e5286b1da373673789d
Closes-bug: #1260675
This commit is contained in:
Radomir Dopieralski 2014-04-25 15:37:48 +02:00
parent 6a08a25113
commit 27e29250a9
56 changed files with 2097 additions and 2423 deletions

View File

@ -182,13 +182,13 @@ In this template, redefine ``block css``. (Don't forget to include
{% load compress %}
{% compress css %}
<link href='{{ STATIC_URL }}my_custom_dashboard/less/my_custom_dashboard.less' type='text/less' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}my_custom_dashboard/scss/my_custom_dashboard.scss' type='text/scss' media='screen' rel='stylesheet' />
{% endcompress %}
{% endblock %}
The custom stylesheets then reside in the dashboard's own ``static`` folder
``openstack_dashboard/dashboards/my_custom_dashboard/static/
my_custom_dashboard/less/my_custom_dashboard.less``.
my_custom_dashboard/scss/my_custom_dashboard.scss``.
All dashboard's templates have to inherit from dashboard's base.html::

View File

@ -133,7 +133,8 @@ STATICFILES_FINDERS = (
)
COMPRESS_PRECOMPILERS = (
('text/less', ('lesscpy {infile}')),
('text/less', 'lesscpy {infile}'),
('text/scss', 'django_pyscss.compressor.DjangoScssFilter'),
)
COMPRESS_CSS_FILTERS = (
@ -153,6 +154,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django_pyscss',
'compressor',
'horizon',
'openstack_auth',

View File

@ -180,4 +180,4 @@
cursor: pointer;
width: 16px;
height: 16px;
}
}

View File

@ -1,70 +0,0 @@
// ALERT STYLES
// ------------
// Base alert styles
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: @baseLineHeight;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
background-color: @warningBackground;
border: 1px solid @warningBorder;
.border-radius(4px);
}
.alert,
.alert-heading {
color: @warningText;
}
// Adjust close link position
.alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: 18px;
}
// Alternate styles
// ----------------
.alert-success {
background-color: @successBackground;
border-color: @successBorder;
}
.alert-success,
.alert-success .alert-heading {
color: @successText;
}
.alert-danger,
.alert-error {
background-color: @errorBackground;
border-color: @errorBorder;
}
.alert-danger,
.alert-error,
.alert-danger .alert-heading,
.alert-error .alert-heading {
color: @errorText;
}
.alert-info {
background-color: @infoBackground;
border-color: @infoBorder;
}
.alert-info,
.alert-info .alert-heading {
color: @infoText;
}
// Block alerts
// ------------------------
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p,
.alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}

View File

@ -1,62 +0,0 @@
/*!
* Bootstrap v2.0.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
// CSS Reset
@import "reset.less";
// Core variables and mixins
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less";
// Grid system and page structure
@import "scaffolding.less";
@import "grid.less";
@import "layouts.less";
// Base CSS
@import "type.less";
@import "code.less";
@import "forms.less";
@import "tables.less";
// Components: common
@import "sprites.less";
@import "dropdowns.less";
@import "wells.less";
@import "component-animations.less";
@import "close.less";
// Components: Buttons & Alerts
@import "buttons.less";
@import "button-groups.less";
@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
// Components: Nav
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";
// Components: Popovers
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
// Components: Misc
@import "thumbnails.less";
@import "labels.less";
@import "progress-bars.less";
@import "accordion.less";
@import "carousel.less";
@import "hero-unit.less";
// Utility classes
@import "utilities.less"; // Has to be last to override when necessary

View File

@ -1,22 +0,0 @@
// BREADCRUMBS
// -----------
.breadcrumb {
padding: 7px 14px;
margin: 0 0 @baseLineHeight;
#gradient > .vertical(@white, #f5f5f5);
border: 1px solid #ddd;
.border-radius(3px);
.box-shadow(inset 0 1px 0 @white);
li {
display: inline-block;
text-shadow: 0 1px 0 @white;
}
.divider {
padding: 0 5px;
color: @grayLight;
}
.active a {
color: @grayDark;
}
}

View File

@ -1,8 +0,0 @@
// GRID SYSTEM
// -----------
// Fixed (940px)
#gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
// Fluid (940px)
#fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth);

View File

@ -1,32 +0,0 @@
// LABELS
// ------
// Base
.label {
padding: 2px 4px 3px;
font-size: @baseFontSize * .85;
font-weight: bold;
color: @white;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
background-color: @grayLight;
.border-radius(3px);
}
// Hover state
.label:hover {
color: @white;
text-decoration: none;
}
// Colors
.label-important { background-color: @errorText; }
.label-important:hover { background-color: darken(@errorText, 10%); }
.label-warning { background-color: @orange; }
.label-warning:hover { background-color: darken(@orange, 10%); }
.label-success { background-color: @successText; }
.label-success:hover { background-color: darken(@successText, 10%); }
.label-info { background-color: @infoText; }
.label-info:hover { background-color: darken(@infoText, 10%); }

View File

@ -1,590 +0,0 @@
// Mixins.less
// Snippets of reusable CSS to develop faster and keep code readable
// -----------------------------------------------------------------
// UTILITY MIXINS
// --------------------------------------------------
// Clearfix
// --------
// For clearing floats like a boss h5bp.com/q
.clearfix {
*zoom: 1;
&:before,
&:after {
display: table;
content: "";
}
&:after {
clear: both;
}
}
// Webkit-style focus
// ------------------
.tab-focus() {
// Default
outline: thin dotted #333;
// Webkit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
// Center-align a block level element
// ----------------------------------
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// IE7 inline-block
// ----------------
.ie7-inline-block() {
*display: inline; /* IE7 inline-block hack */
*zoom: 1;
}
// IE7 likes to collapse whitespace on either side of the inline-block elements.
// Ems because we're attempting to match the width of a space character. Left
// version is for form buttons, which typically come after other elements, and
// right version is for icons, which come before. Applying both is ok, but it will
// mean that space between those elements will be .6em (~2 space characters) in IE7,
// instead of the 1 space in other browsers.
.ie7-restore-left-whitespace() {
*margin-left: .3em;
&:first-child {
*margin-left: 0;
}
}
.ie7-restore-right-whitespace() {
*margin-right: .3em;
&:last-child {
*margin-left: 0;
}
}
// Sizing shortcuts
// -------------------------
.size(@height: 5px, @width: 5px) {
width: @width;
height: @height;
}
.square(@size: 5px) {
.size(@size, @size);
}
// Placeholder text
// -------------------------
.placeholder(@color: @placeholderText) {
:-moz-placeholder {
color: @color;
}
::-webkit-input-placeholder {
color: @color;
}
}
// Text overflow
// -------------------------
// Requires inline-block or block for proper styling
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// FONTS
// --------------------------------------------------
#font {
#family {
.serif() {
font-family: Georgia, "Times New Roman", Times, serif;
}
.sans-serif() {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.monospace() {
font-family: Menlo, Monaco, "Courier New", monospace;
}
}
.shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
}
.serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .sans-serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .monospace;
#font > .shorthand(@size, @weight, @lineHeight);
}
}
// GRID SYSTEM
// --------------------------------------------------
// Site container
// -------------------------
.container-fixed() {
width: @gridRowWidth;
margin-left: auto;
margin-right: auto;
.clearfix();
}
// Le grid system
// -------------------------
#gridSystem {
// Setup the mixins to be used
.columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
}
.offset(@gridColumnWidth, @gridGutterWidth, @columns) {
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
}
.gridColumn(@gridGutterWidth) {
float: left;
margin-left: @gridGutterWidth;
}
// Take these values and mixins, and make 'em do their thang
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
// Row surrounds the columns
.row {
margin-left: @gridGutterWidth * -1;
.clearfix();
}
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
[class*="span"] {
#gridSystem > .gridColumn(@gridGutterWidth);
}
// Default columns
.span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
.span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
.span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
.span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
.span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
.span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
.span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
.span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
.span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
.span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
.span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
.span12,
.container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
// Offset column options
.offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); }
.offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); }
.offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); }
.offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); }
.offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); }
.offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); }
.offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); }
.offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); }
.offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); }
.offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); }
.offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); }
}
}
// Fluid grid system
// -------------------------
#fluidGridSystem {
// Setup the mixins to be used
.columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
}
.gridColumn(@fluidGridGutterWidth) {
float: left;
margin-left: @fluidGridGutterWidth;
}
// Take these values and mixins, and make 'em do their thang
.generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
// Row surrounds the columns
.row-fluid {
width: 100%;
.clearfix();
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
> [class*="span"] {
#fluidGridSystem > .gridColumn(@fluidGridGutterWidth);
}
> [class*="span"]:first-child {
margin-left: 0;
}
// Default columns
> .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); }
> .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); }
> .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); }
> .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); }
> .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); }
> .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); }
> .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); }
> .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); }
> .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); }
> .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); }
> .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); }
> .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); }
}
}
}
// Input grid system
// -------------------------
#inputGridSystem {
.inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
}
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
input,
textarea,
.uneditable-input {
&.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
&.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
&.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
&.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
&.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
&.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
&.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
&.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
&.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
&.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
&.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
&.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
}
}
}
// Make a Grid
// -------------------------
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
.makeRow() {
margin-left: @gridGutterWidth * -1;
.clearfix();
}
.makeColumn(@columns: 1) {
float: left;
margin-left: @gridGutterWidth;
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
}
// Form field states (used in forms.less)
// --------------------------------------------------
// Mixin for form field states
.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
// Set the text color
> label,
.help-block,
.help-inline {
color: @textColor;
}
// Style inputs accordingly
input,
select,
textarea {
color: @textColor;
border-color: @borderColor;
&:focus {
border-color: darken(@borderColor, 10%);
.box-shadow(0 0 6px lighten(@borderColor, 20%));
}
}
// Give a small background color for input-prepend/-append
.input-prepend .add-on,
.input-append .add-on {
color: @textColor;
background-color: @backgroundColor;
border-color: @textColor;
}
}
// CSS3 PROPERTIES
// --------------------------------------------------
// Border Radius
.border-radius(@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
// Drop shadows
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
-webkit-box-shadow: @shadow;
-moz-box-shadow: @shadow;
box-shadow: @shadow;
}
// Transitions
.transition(@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
-ms-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
// Transformations
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-moz-transform: rotate(@degrees);
-ms-transform: rotate(@degrees);
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.scale(@ratio) {
-webkit-transform: scale(@ratio);
-moz-transform: scale(@ratio);
-ms-transform: scale(@ratio);
-o-transform: scale(@ratio);
transform: scale(@ratio);
}
.translate(@x: 0, @y: 0) {
-webkit-transform: translate(@x, @y);
-moz-transform: translate(@x, @y);
-ms-transform: translate(@x, @y);
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
.skew(@x: 0, @y: 0) {
-webkit-transform: skew(@x, @y);
-moz-transform: skew(@x, @y);
-ms-transform: skew(@x, @y);
-o-transform: skew(@x, @y);
transform: skew(@x, @y);
}
.translate3d(@x: 0, @y: 0, @z: 0) {
-webkit-transform: translate(@x, @y, @z);
-moz-transform: translate(@x, @y, @z);
-ms-transform: translate(@x, @y, @z);
-o-transform: translate(@x, @y, @z);
transform: translate(@x, @y, @z);
}
// Background clipping
// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
.background-clip(@clip) {
-webkit-background-clip: @clip;
-moz-background-clip: @clip;
background-clip: @clip;
}
// Background sizing
.background-size(@size){
-webkit-background-size: @size;
-moz-background-size: @size;
-o-background-size: @size;
background-size: @size;
}
// Box sizing
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
-moz-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
// User select
// For selecting text on the page
.user-select(@select) {
-webkit-user-select: @select;
-moz-user-select: @select;
-o-user-select: @select;
user-select: @select;
}
// Resize anything
.resizable(@direction: both) {
resize: @direction; // Options: horizontal, vertical, both
overflow: auto; // Safari fix
}
// CSS3 Content Columns
.content-columns(@columnCount, @columnGap: @gridColumnGutter) {
-webkit-column-count: @columnCount;
-moz-column-count: @columnCount;
column-count: @columnCount;
-webkit-column-gap: @columnGap;
-moz-column-gap: @columnGap;
column-gap: @columnGap;
}
// Opacity
.opacity(@opacity: 100) {
opacity: @opacity / 100;
filter: e(%("alpha(opacity=%d)", @opacity));
}
// BACKGROUNDS
// --------------------------------------------------
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
#translucent {
.background(@color: @white, @alpha: 1) {
background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
}
.border(@color: @white, @alpha: 1) {
border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
.background-clip(padding-box);
}
}
// Gradient Bar Colors for buttons and alerts
.gradientBar(@primaryColor, @secondaryColor) {
#gradient > .vertical(@primaryColor, @secondaryColor);
border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
}
// Gradients
#gradient {
.horizontal(@startColor: #555, @endColor: #333) {
background-color: @endColor;
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(left, @startColor, @endColor); // Le standard
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
}
.vertical(@startColor: #555, @endColor: #333) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(top, @startColor, @endColor); // The standard
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
}
.directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
background-color: @endColor;
background-repeat: repeat-x;
background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10
background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
}
.vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
background-color: mix(@midColor, @endColor, 80%);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
}
.radial(@innerColor: #555, @outerColor: #333) {
background-color: @outerColor;
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
background-repeat: no-repeat;
// Opera cannot do radial gradients yet
}
.striped(@color, @angle: -45deg) {
background-color: @color;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
}
}
// Reset filters for IE
.reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}
// Mixin for generating button backgrounds
// ---------------------------------------
.buttonBackground(@startColor, @endColor) {
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
.gradientBar(@startColor, @endColor);
.reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
background-color: @endColor;
}
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
&:active,
&.active {
background-color: darken(@endColor, 10%) e("\9");
}
}
// COMPONENT MIXINS
// --------------------------------------------------
// POPOVER ARROWS
// -------------------------
// For tipsies and popovers
#popoverArrow {
.top(@arrowWidth: 5px) {
bottom: 0;
left: 50%;
margin-left: -@arrowWidth;
border-left: @arrowWidth solid transparent;
border-right: @arrowWidth solid transparent;
border-top: @arrowWidth solid @black;
}
.left(@arrowWidth: 5px) {
top: 50%;
right: 0;
margin-top: -@arrowWidth;
border-top: @arrowWidth solid transparent;
border-bottom: @arrowWidth solid transparent;
border-left: @arrowWidth solid @black;
}
.bottom(@arrowWidth: 5px) {
top: 0;
left: 50%;
margin-left: -@arrowWidth;
border-left: @arrowWidth solid transparent;
border-right: @arrowWidth solid transparent;
border-bottom: @arrowWidth solid @black;
}
.right(@arrowWidth: 5px) {
top: 50%;
left: 0;
margin-top: -@arrowWidth;
border-top: @arrowWidth solid transparent;
border-bottom: @arrowWidth solid transparent;
border-right: @arrowWidth solid @black;
}
}

View File

@ -1,41 +0,0 @@
// PAGER
// -----
.pager {
margin: @baseLineHeight 0;
list-style: none;
text-align: center;
.clearfix();
}
.pager li {
display: inline;
}
.pager li > a,
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
.border-radius(15px);
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
.pager .next > a,
.pager .next > span {
float: right;
}
.pager .previous > a,
.pager .previous > span {
float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: @grayLight;
background-color: #fff;
cursor: default;
}

View File

@ -1,107 +0,0 @@
// Variables.less
// Variables to customize the look and feel of Bootstrap
// -----------------------------------------------------
// GLOBAL VALUES
// --------------------------------------------------
// Links
@linkColor: #08c;
@linkColorHover: darken(@linkColor, 15%);
// Grays
@black: #000;
@grayDarker: #222;
@grayDark: #333;
@gray: #555;
@grayLight: #999;
@grayLighter: #eee;
@white: #fff;
// Accent colors
@blue: #049cdb;
@blueDark: #0064cd;
@green: #46a546;
@red: #9d261d;
@yellow: #ffc40d;
@orange: #f89406;
@pink: #c3325f;
@purple: #7a43b6;
// Typography
@baseFontSize: 13px;
@baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
@baseLineHeight: 18px;
@textColor: @grayDark;
// Buttons
@primaryButtonBackground: @linkColor;
// COMPONENT VARIABLES
// --------------------------------------------------
// Z-index master list
// Used for a bird's eye view of components dependent on the z-axis
// Try to avoid customizing these :)
@zindexDropdown: 1000;
@zindexPopover: 1010;
@zindexTooltip: 1020;
@zindexFixedNavbar: 1030;
@zindexModalBackdrop: 1040;
@zindexModal: 1050;
// Sprite icons path
@iconSpritePath: "/static/bootstrap/img/glyphicons-halflings.png";
@iconWhiteSpritePath: "/static/bootstrap/img/glyphicons-halflings-white.png";
// Input placeholder text color
@placeholderText: @grayLight;
// Hr border color
@hrBorder: @grayLighter;
// Navbar
@navbarHeight: 40px;
@navbarBackground: @grayDarker;
@navbarBackgroundHighlight: @grayDark;
@navbarLinkBackgroundHover: transparent;
@navbarText: @grayLight;
@navbarLinkColor: @grayLight;
@navbarLinkColorHover: @white;
// Form states and alerts
@warningText: #c09853;
@warningBackground: #fcf8e3;
@warningBorder: darken(spin(@warningBackground, -10), 3%);
@errorText: #b94a48;
@errorBackground: #f2dede;
@errorBorder: darken(spin(@errorBackground, -10), 3%);
@successText: #468847;
@successBackground: #dff0d8;
@successBorder: darken(spin(@successBackground, -10), 5%);
@infoText: #3a87ad;
@infoBackground: #d9edf7;
@infoBorder: darken(spin(@infoBackground, -10), 7%);
// GRID
// --------------------------------------------------
// Default 940px grid
@gridColumns: 12;
@gridColumnWidth: 60px;
@gridGutterWidth: 20px;
@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
// Fluid grid
@fluidGridColumnWidth: 6.382978723%;
@fluidGridGutterWidth: 2.127659574%;

View File

@ -6,9 +6,10 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Converted to SASS by Thomas McDonald
*/
// Responsive.less
// Responsive.css.scss
// For phone and tablet devices
// -------------------------------------------------------------
@ -17,8 +18,8 @@
// -------------------------
// Required since we compile the responsive stuff separately
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less";
@import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
@import "bootstrap/mixins";
// RESPONSIVE CLASSES
@ -46,14 +47,11 @@
// Block level the page header small tag for readability
.page-header h1 small {
display: block;
line-height: @baseLineHeight;
line-height: $baseLineHeight;
}
// Make span* classes full width
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
display: block;
width: 100%;
min-height: 28px; /* Make inputs at least the height of their button counterpart */
@ -64,14 +62,12 @@
box-sizing: border-box; /* CSS3 spec*/
}
// But don't let it screw up prepend/append inputs
.input-prepend input[class*="span"],
.input-append input[class*="span"] {
.input-prepend input[class*="span"], .input-append input[class*="span"] {
width: auto;
}
// Update checkboxes for iOS
input[type="checkbox"],
input[type="radio"] {
input[type="checkbox"], input[type="radio"] {
border: 1px solid #ccc;
}
@ -140,8 +136,7 @@
margin-left: 0;
}
// Make all columns even
.row > [class*="span"],
.row-fluid > [class*="span"] {
.row > [class*="span"], .row-fluid > [class*="span"] {
float: none;
display: block;
width: auto;
@ -157,13 +152,13 @@
@media (min-width: 768px) and (max-width: 979px) {
// Fixed grid
#gridSystem > .generate(12, 42px, 20px);
@include gridSystemGenerate(12, 42px, 20px);
// Fluid grid
#fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
@include fluidGridSystemGenerate(12, 5.801104972%, 2.762430939%);
// Input grid
#inputGridSystem > .generate(12, 42px, 20px);
@include inputGridSystemGenerate(12, 42px, 20px);
}
@ -182,7 +177,7 @@
// Unfix the navbar
.navbar-fixed-top {
position: static;
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
}
.navbar-fixed-top .navbar-inner {
padding: 5px;
@ -204,7 +199,7 @@
// Block-level the nav
.navbar .nav {
float: none;
margin: 0 0 (@baseLineHeight / 2);
margin: 0 0 ($baseLineHeight / 2);
}
.navbar .nav > li {
float: none;
@ -216,23 +211,21 @@
display: none;
}
.navbar .nav .nav-header {
color: @navbarText;
color: $navbarText;
text-shadow: none;
}
// Nav and dropdown links in navbar
.navbar .nav > li > a,
.navbar .dropdown-menu a {
.navbar .nav > li > a, .navbar .dropdown-menu a {
padding: 6px 15px;
font-weight: bold;
color: @navbarLinkColor;
.border-radius(3px);
color: $navbarLinkColor;
@include border-radius(3px);
}
.navbar .dropdown-menu li + li a {
margin-bottom: 2px;
}
.navbar .nav > li > a:hover,
.navbar .dropdown-menu a:hover {
background-color: @navbarBackground;
.navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover {
background-color: $navbarBackground;
}
// Dropdowns in the navbar
.navbar .dropdown-menu {
@ -246,26 +239,24 @@
padding: 0;
background-color: transparent;
border: none;
.border-radius(0);
.box-shadow(none);
@include border-radius(0);
@include box-shadow(none);
}
.navbar .dropdown-menu:before,
.navbar .dropdown-menu:after {
.navbar .dropdown-menu:before, .navbar .dropdown-menu:after {
display: none;
}
.navbar .dropdown-menu .divider {
display: none;
}
// Forms in navbar
.navbar-form,
.navbar-search {
.navbar-form, .navbar-search {
float: none;
padding: (@baseLineHeight / 2) 15px;
margin: (@baseLineHeight / 2) 0;
border-top: 1px solid @navbarBackground;
border-bottom: 1px solid @navbarBackground;
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow);
padding: ($baseLineHeight / 2) 15px;
margin: ($baseLineHeight / 2) 0;
border-top: 1px solid $navbarBackground;
border-bottom: 1px solid $navbarBackground;
$shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
@include box-shadow($shadow);
}
// Pull right (secondary) nav content
.navbar .nav.pull-right {
@ -308,13 +299,13 @@
@media (min-width: 1200px) {
// Fixed grid
#gridSystem > .generate(12, 70px, 30px);
@include gridSystemGenerate(12, 70px, 30px);
// Fluid grid
#fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
@include fluidGridSystemGenerate(12, 5.982905983%, 2.564102564%);
// Input grid
#inputGridSystem > .generate(12, 70px, 30px);
@include inputGridSystemGenerate(12, 70px, 30px);
// Thumbnails
.thumbnails {
@ -324,4 +315,4 @@
margin-left: 30px;
}
}
}

View File

@ -0,0 +1,63 @@
/*!
* Bootstrap 2.0.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Converted to SASS by Thomas McDonald
*/
// Core variables and mixins
@import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
@import "bootstrap/mixins";
// CSS Reset
@import "bootstrap/reset";
// Grid system and page structure
@import "bootstrap/scaffolding";
@import "bootstrap/grid";
@import "bootstrap/layouts";
// Base CSS
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/forms";
@import "bootstrap/tables";
// Components: common
@import "bootstrap/sprites";
@import "bootstrap/dropdowns";
@import "bootstrap/wells";
@import "bootstrap/component-animations";
@import "bootstrap/close";
// Components: Buttons & Alerts
@import "bootstrap/buttons";
@import "bootstrap/button-groups";
@import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
// Components: Nav
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
// Components: Popovers
@import "bootstrap/modals";
@import "bootstrap/tooltip";
@import "bootstrap/popovers";
// Components: Misc
@import "bootstrap/thumbnails";
@import "bootstrap/labels";
@import "bootstrap/progress-bars";
@import "bootstrap/accordion";
@import "bootstrap/carousel";
@import "bootstrap/hero-unit";
// Utility classes
@import "bootstrap/utilities"; // Has to be last to override when necessary

View File

@ -4,14 +4,14 @@
// Parent container
.accordion {
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
}
// Group == heading + body
.accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
.border-radius(4px);
@include border-radius(4px);
}
.accordion-heading {
border-bottom: 0;
@ -25,4 +25,4 @@
.accordion-inner {
padding: 9px 15px;
border-top: 1px solid #e5e5e5;
}
}

View File

@ -0,0 +1,62 @@
// ALERT STYLES
// ------------
// Base alert styles
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: $baseLineHeight;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
background-color: $warningBackground;
border: 1px solid $warningBorder;
@include border-radius(4px);
}
.alert, .alert-heading {
color: $warningText;
}
// Adjust close link position
.alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: 18px;
}
// Alternate styles
// ----------------
.alert-success {
background-color: $successBackground;
border-color: $successBorder;
}
.alert-success, .alert-success .alert-heading {
color: $successText;
}
.alert-danger, .alert-error {
background-color: $errorBackground;
border-color: $errorBorder;
}
.alert-danger, .alert-error, .alert-danger .alert-heading, .alert-error .alert-heading {
color: $errorText;
}
.alert-info {
background-color: $infoBackground;
border-color: $infoBorder;
}
.alert-info, .alert-info .alert-heading {
color: $infoText;
}
// Block alerts
// ------------------------
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p, .alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}

View File

@ -0,0 +1,22 @@
// BREADCRUMBS
// -----------
.breadcrumb {
padding: 7px 14px;
margin: 0 0 $baseLineHeight;
@include gradient-vertical($white, #f5f5f5);
border: 1px solid #ddd;
@include border-radius(3px);
@include box-shadow(inset 0 1px 0 $white);
li {
display: inline-block;
text-shadow: 0 1px 0 $white;
}
.divider {
padding: 0 5px;
color: $grayLight;
}
.active a {
color: $grayDark;
}
}

View File

@ -5,8 +5,8 @@
// Make the div behave like a button
.btn-group {
position: relative;
.clearfix(); // clears the floated buttons
.ie7-restore-left-whitespace();
@include clearfix(); // clears the floated buttons
@include ie7-restore-left-whitespace();
}
// Space out series of button groups
@ -16,11 +16,11 @@
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-top: @baseLineHeight / 2;
margin-bottom: @baseLineHeight / 2;
margin-top: $baseLineHeight / 2;
margin-bottom: $baseLineHeight / 2;
.btn-group {
display: inline-block;
.ie7-inline-block();
@include ie7-inline-block();
}
}
@ -29,7 +29,7 @@
position: relative;
float: left;
margin-left: -1px;
.border-radius(0);
@include border-radius(0);
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group .btn:first-child {
@ -41,8 +41,7 @@
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.btn-group .btn:last-child,
.btn-group .dropdown-toggle {
.btn-group .btn:last-child, .btn-group .dropdown-toggle {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
@ -60,8 +59,7 @@
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
}
.btn-group .btn.large:last-child,
.btn-group .large.dropdown-toggle {
.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
@ -71,16 +69,12 @@
}
// On hover/focus/active, bring the proper btn to front
.btn-group .btn:hover,
.btn-group .btn:focus,
.btn-group .btn:active,
.btn-group .btn.active {
.btn-group .btn:hover, .btn-group .btn:focus, .btn-group .btn:active, .btn-group .btn.active {
z-index: 2;
}
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
outline: 0;
}
@ -93,8 +87,8 @@
.btn-group .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
@shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
$shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
@include box-shadow($shadow);
*padding-top: 5px;
*padding-bottom: 5px;
}
@ -102,19 +96,19 @@
.btn-group.open {
// IE7's z-index only goes to the nearest positioned ancestor, which would
// make the menu appear below buttons that appeared later on the page
*z-index: @zindexDropdown;
*z-index: $zindexDropdown;
// Reposition menu on open and round all corners
.dropdown-menu {
display: block;
margin-top: 1px;
.border-radius(5px);
@include border-radius(5px);
}
.dropdown-toggle {
background-image: none;
@shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
$shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
@include box-shadow($shadow);
}
}
@ -123,21 +117,16 @@
margin-top: 7px;
margin-left: 0;
}
.btn:hover .caret,
.open.btn-group .caret {
.opacity(100);
.btn:hover .caret, .open.btn-group .caret {
@include opacity(1);
}
// Account for other colors
.btn-primary,
.btn-danger,
.btn-info,
.btn-success,
.btn-inverse {
.btn-primary, .btn-danger, .btn-info, .btn-success, .btn-inverse {
.caret {
border-top-color: @white;
.opacity(75);
border-top-color: $white;
@include opacity(0.75);
}
}
@ -145,4 +134,3 @@
.btn-small .caret {
margin-top: 4px;
}

View File

@ -10,61 +10,59 @@
display: inline-block;
padding: 4px 10px 4px;
margin-bottom: 0; // For input.btn
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @grayDark;
font-size: $baseFontSize;
line-height: $baseLineHeight;
color: $grayDark;
text-align: center;
text-shadow: 0 1px 1px rgba(255,255,255,.75);
vertical-align: middle;
.buttonBackground(@white, darken(@white, 10%));
@include buttonBackground($white, darken($white, 10%));
border: 1px solid #ccc;
border-bottom-color: #bbb;
.border-radius(4px);
@shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
@include border-radius(4px);
$shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
@include box-shadow($shadow);
cursor: pointer;
// Give IE7 some love
.reset-filter();
.ie7-restore-left-whitespace();
@include reset-filter();
@include ie7-restore-left-whitespace();
}
// Hover state
.btn:hover {
color: @grayDark;
color: $grayDark;
text-decoration: none;
background-color: darken(@white, 10%);
background-color: darken($white, 10%);
background-position: 0 -15px;
// transition is only when going to hover, otherwise the background
// behind the gradient (there for IE<=9 fallback) gets mismatched
.transition(background-position .1s linear);
@include transition(background-position .1s linear);
}
// Focus state for keyboard and accessibility
.btn:focus {
.tab-focus();
@include tab-focus();
}
// Active state
.btn.active,
.btn:active {
.btn.active, .btn:active {
background-image: none;
@shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
background-color: darken(@white, 10%);
background-color: darken(@white, 15%) e("\9");
$shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
@include box-shadow($shadow);
background-color: darken($white, 10%);
background-color: darken($white, 15%) \9;
outline: 0;
}
// Disabled state
.btn.disabled,
.btn[disabled] {
.btn.disabled, .btn[disabled] {
cursor: default;
background-image: none;
background-color: darken(@white, 10%);
.opacity(65);
.box-shadow(none);
background-color: darken($white, 10%);
@include opacity(0.65);
@include box-shadow(none);
}
@ -74,9 +72,9 @@
// Large
.btn-large {
padding: 9px 14px;
font-size: @baseFontSize + 2px;
font-size: $baseFontSize + 2px;
line-height: normal;
.border-radius(5px);
@include border-radius(5px);
}
.btn-large [class^="icon-"] {
margin-top: 1px;
@ -85,8 +83,8 @@
// Small
.btn-small {
padding: 5px 9px;
font-size: @baseFontSize - 2px;
line-height: @baseLineHeight - 2px;
font-size: $baseFontSize - 2px;
line-height: $baseLineHeight - 2px;
}
.btn-small [class^="icon-"] {
margin-top: -1px;
@ -95,8 +93,8 @@
// Mini
.btn-mini {
padding: 2px 6px;
font-size: @baseFontSize - 2px;
line-height: @baseLineHeight - 4px;
font-size: $baseFontSize - 2px;
line-height: $baseLineHeight - 4px;
}
@ -105,63 +103,45 @@
// Set text color
// -------------------------
.btn-primary,
.btn-primary:hover,
.btn-warning,
.btn-warning:hover,
.btn-danger,
.btn-danger:hover,
.btn-success,
.btn-success:hover,
.btn-info,
.btn-info:hover,
.btn-inverse,
.btn-inverse:hover {
.btn-primary, .btn-primary:hover, .btn-warning, .btn-warning:hover, .btn-danger, .btn-danger:hover, .btn-success, .btn-success:hover, .btn-info, .btn-info:hover, .btn-inverse, .btn-inverse:hover {
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
color: @white;
color: $white;
}
// Provide *some* extra contrast for those who can get it
.btn-primary.active,
.btn-warning.active,
.btn-danger.active,
.btn-success.active,
.btn-info.active,
.btn-dark.active {
.btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active {
color: rgba(255,255,255,.75);
}
// Set the backgrounds
// -------------------------
.btn-primary {
.buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
@include buttonBackground($primaryButtonBackground, adjust-hue($primaryButtonBackground, 20));
}
// Warning appears are orange
.btn-warning {
.buttonBackground(lighten(@orange, 15%), @orange);
@include buttonBackground(lighten($orange, 15%), $orange);
}
// Danger and error appear as red
.btn-danger {
.buttonBackground(#ee5f5b, #bd362f);
@include buttonBackground(#ee5f5b, #bd362f);
}
// Success appears as green
.btn-success {
.buttonBackground(#62c462, #51a351);
@include buttonBackground(#62c462, #51a351);
}
// Info appears as a neutral blue
.btn-info {
.buttonBackground(#5bc0de, #2f96b4);
@include buttonBackground(#5bc0de, #2f96b4);
}
// Inverse appears as dark gray
.btn-inverse {
.buttonBackground(#454545, #262626);
@include buttonBackground(#454545, #262626);
}
// Cross-browser Jank
// --------------------------------------------------
button.btn,
input[type="submit"].btn {
button.btn, input[type="submit"].btn {
// Firefox 3.6 only I believe
&::-moz-focus-inner {

View File

@ -3,7 +3,7 @@
.carousel {
position: relative;
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
line-height: 1;
}
@ -18,7 +18,7 @@
.item {
display: none;
position: relative;
.transition(.6s ease-in-out left);
@include transition(.6s ease-in-out left);
}
// Account for jankitude on images
@ -27,16 +27,13 @@
line-height: 1;
}
.active,
.next,
.prev { display: block; }
.active, .next, .prev { display: block; }
.active {
left: 0;
}
.next,
.prev {
.next, .prev {
position: absolute;
top: 0;
width: 100%;
@ -48,8 +45,7 @@
.prev {
left: -100%;
}
.next.left,
.prev.right {
.next.left, .prev.right {
left: 0;
}
@ -75,19 +71,19 @@
font-size: 60px;
font-weight: 100;
line-height: 30px;
color: @white;
color: $white;
text-align: center;
background: @grayDarker;
border: 3px solid @white;
.border-radius(23px);
.opacity(50);
background: $grayDarker;
border: 3px solid $white;
@include border-radius(23px);
@include opacity(0.5);
// we can't have this transition here
// because webkit cancels the carousel
// animation if you trip this while
// in the middle of another animation
// ;_;
// .transition(opacity .2s linear);
// @include transition(opacity .2s linear);
// Reposition the right one
&.right {
@ -97,9 +93,9 @@
// Hover state
&:hover {
color: @white;
color: $white;
text-decoration: none;
.opacity(90);
@include opacity(0.9);
}
}
@ -112,10 +108,9 @@
right: 0;
bottom: 0;
padding: 10px 15px 5px;
background: @grayDark;
background: $grayDark;
background: rgba(0,0,0,.75);
}
.carousel-caption h4,
.carousel-caption p {
color: @white;
.carousel-caption h4, .carousel-caption p {
color: $white;
}

View File

@ -5,14 +5,14 @@
float: right;
font-size: 20px;
font-weight: bold;
line-height: @baseLineHeight;
color: @black;
line-height: $baseLineHeight;
color: $black;
text-shadow: 0 1px 0 rgba(255,255,255,1);
.opacity(20);
@include opacity(0.2);
&:hover {
color: @black;
color: $black;
text-decoration: none;
.opacity(40);
@include opacity(0.4);
cursor: pointer;
}
}

View File

@ -1,15 +1,14 @@
// Code.less
// Code.css.scss
// Code typography styles for the <code> and <pre> elements
// --------------------------------------------------------
// Inline and block code styles
code,
pre {
code, pre {
padding: 0 3px 2px;
#font > #family > .monospace;
font-size: @baseFontSize - 1;
color: @grayDark;
.border-radius(3px);
@include font-family-monospace();
font-size: $baseFontSize - 1;
color: $grayDark;
@include border-radius(3px);
}
// Inline code
@ -23,14 +22,14 @@ code {
// Blocks of code
pre {
display: block;
padding: (@baseLineHeight - 1) / 2;
margin: 0 0 @baseLineHeight / 2;
padding: ($baseLineHeight - 1) / 2;
margin: 0 0 $baseLineHeight / 2;
font-size: 12px;
line-height: @baseLineHeight;
line-height: $baseLineHeight;
background-color: #f5f5f5;
border: 1px solid #ccc; // fallback for IE7-8
border: 1px solid rgba(0,0,0,.15);
.border-radius(4px);
@include border-radius(4px);
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
@ -38,7 +37,7 @@ pre {
// Make prettyprint styles more spaced out for readability
&.prettyprint {
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
}
// Account for some code outputs that place code tags in pre tags

View File

@ -2,7 +2,7 @@
// --------------------
.fade {
.transition(opacity .15s linear);
@include transition(opacity .15s linear);
opacity: 0;
&.in {
opacity: 1;
@ -10,9 +10,9 @@
}
.collapse {
.transition(height .35s ease);
@include transition(height .35s ease);
position:relative;
overflow:hidden;
height: 0;
&.in { height: auto; }
}
}

View File

@ -9,8 +9,7 @@
// The caret makes the toggle a bit too tall in IE7
*margin-bottom: -3px;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
.dropdown-toggle:active, .open .dropdown-toggle {
outline: 0;
}
// Dropdown arrow/caret
@ -25,24 +24,23 @@
vertical-align: top;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid @black;
.opacity(30);
border-top: 4px solid $black;
@include opacity(0.3);
content: "\2193";
}
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
.dropdown:hover .caret,
.open.dropdown .caret {
.opacity(100);
.dropdown:hover .caret, .open.dropdown .caret {
@include opacity(1);
}
// The dropdown menu (ul)
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: @zindexDropdown;
z-index: $zindexDropdown;
float: left;
display: none; // none by default, but block on "open" of the menu
min-width: 160px;
@ -50,13 +48,13 @@
padding: 4px 0;
margin: 0; // override default ul
list-style: none;
background-color: @white;
background-color: $white;
border-color: #ccc;
border-color: rgba(0,0,0,.2);
border-style: solid;
border-width: 1px;
.border-radius(0 0 5px 5px);
.box-shadow(0 5px 10px rgba(0,0,0,.2));
@include border-radius(0 0 5px 5px);
@include box-shadow(0 5px 10px rgba(0,0,0,.2));
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
@ -76,7 +74,7 @@
margin: 5px 1px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid @white;
border-bottom: 1px solid $white;
// IE7 needs a set width since we gave a height. Restricting just
// to IE7 to keep the 1px left/right space in other browsers.
@ -92,29 +90,27 @@
padding: 3px 15px;
clear: both;
font-weight: normal;
line-height: @baseLineHeight;
color: @gray;
word-wrap: break-word;
line-height: $baseLineHeight;
color: $gray;
white-space: nowrap;
}
}
// Hover state
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
color: @white;
.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
color: $white;
text-decoration: none;
background-color: @linkColor;
background-color: $linkColor;
}
// Open state for the dropdown
.dropdown.open {
// IE7's z-index only goes to the nearest positioned ancestor, which would
// make the menu appear below buttons that appeared later on the page
*z-index: @zindexDropdown;
*z-index: $zindexDropdown;
.dropdown-toggle {
color: @white;
color: $white;
background: #ccc;
background: rgba(0,0,0,.3);
}
@ -126,5 +122,5 @@
// Typeahead
.typeahead {
margin-top: 2px; // give it some space to breathe
.border-radius(4px);
@include border-radius(4px);
}

View File

@ -8,7 +8,7 @@
// Make all forms have space below them
form {
margin: 0 0 @baseLineHeight;
margin: 0 0 $baseLineHeight;
}
fieldset {
@ -22,57 +22,48 @@ legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: @baseLineHeight * 1.5;
font-size: @baseFontSize * 1.5;
line-height: @baseLineHeight * 2;
color: @grayDark;
margin-bottom: $baseLineHeight * 1.5;
font-size: $baseFontSize * 1.5;
line-height: $baseLineHeight * 2;
color: $grayDark;
border: 0;
border-bottom: 1px solid #eee;
// Small
small {
font-size: @baseLineHeight * .75;
color: @grayLight;
font-size: $baseLineHeight * .75;
color: $grayLight;
}
}
// Set font for forms
label,
input,
button,
select,
textarea {
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
label, input, button, select, textarea {
@include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
}
input,
button,
select,
textarea {
#font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
input, button, select, textarea {
@include font-family-sans-serif(); // And only set font-family here for those that need it (note the missing label element)
}
// Identify controls by their labels
label {
display: block;
margin-bottom: 5px;
color: @grayDark;
color: $grayDark;
}
// Inputs, Textareas, Selects
input,
textarea,
select,
.uneditable-input {
input, textarea, select, .uneditable-input {
display: inline-block;
width: 210px;
height: @baseLineHeight;
height: $baseLineHeight;
padding: 4px;
margin-bottom: 9px;
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @gray;
font-size: $baseFontSize;
line-height: $baseLineHeight;
color: $gray;
border: 1px solid #ccc;
.border-radius(3px);
@include border-radius(3px);
}
.uneditable-textarea {
width: auto;
@ -80,16 +71,12 @@ select,
}
// Inputs within a label
label input,
label textarea,
label select {
label input, label textarea, label select {
display: block;
}
// Mini reset for unique input types
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
input[type="image"], input[type="checkbox"], input[type="radio"] {
width: auto;
height: auto;
padding: 0;
@ -97,7 +84,7 @@ input[type="radio"] {
*margin-top: 0; /* IE7 */
line-height: normal;
cursor: pointer;
.border-radius(0);
@include border-radius(0);
border: 0 \9; /* IE9 and down */
}
input[type="image"] {
@ -110,22 +97,19 @@ input[type="file"] {
padding: initial;
line-height: initial;
border: initial;
background-color: @white;
background-color: $white;
background-color: initial;
.box-shadow(none);
@include box-shadow(none);
}
// Help out input buttons
input[type="button"],
input[type="reset"],
input[type="submit"] {
input[type="button"], input[type="reset"], input[type="submit"] {
width: auto;
height: auto;
}
// Set the height of select and file controls to match text inputs
select,
input[type="file"] {
select, input[type="file"] {
height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
line-height: 28px;
@ -139,18 +123,17 @@ input[type="file"] {
// Chrome on Linux and Mobile Safari need background-color
select {
width: 220px; // default input width + 10px of padding that doesn't get applied
background-color: @white;
background-color: $white;
}
// Make multiple select elements height not fixed
select[multiple],
select[size] {
select[multiple], select[size] {
height: auto;
}
// Remove shadow from image inputs
input[type="image"] {
.box-shadow(none);
@include box-shadow(none);
}
// Make textarea height behave
@ -169,33 +152,28 @@ input[type="hidden"] {
// -------------------
// Indent the labels to position radios/checkboxes as hanging
.radio,
.checkbox {
.radio, .checkbox {
padding-left: 18px;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
.radio input[type="radio"], .checkbox input[type="checkbox"] {
float: left;
margin-left: -18px;
}
// Move the options list down to align with labels
.controls > .radio:first-child,
.controls > .checkbox:first-child {
.controls > .radio:first-child, .controls > .checkbox:first-child {
padding-top: 5px; // has to be padding because margin collaspes
}
// Radios and checkboxes on same line
// TODO v3: Convert .inline to .control-inline
.radio.inline,
.checkbox.inline {
.radio.inline, .checkbox.inline {
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
}
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
margin-left: 10px; // space out consecutive inline controls
}
@ -204,26 +182,21 @@ input[type="hidden"] {
// FOCUS STATE
// -----------
input,
textarea {
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
@transition: border linear .2s, box-shadow linear .2s;
.transition(@transition);
input, textarea {
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
$transition: border linear .2s, box-shadow linear .2s;
@include transition($transition);
}
input:focus,
textarea:focus {
input:focus, textarea:focus {
border-color: rgba(82,168,236,.8);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
.box-shadow(@shadow);
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
@include box-shadow($shadow);
outline: 0;
outline: thin dotted \9; /* IE6-9 */
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus {
.box-shadow(none); // override for file inputs
.tab-focus();
input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, select:focus {
@include box-shadow(none); // override for file inputs
@include tab-focus();
}
@ -240,10 +213,7 @@ select:focus {
.input-xxlarge { width: 530px; }
// Grid style input sizes
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
float: none;
margin-left: 0;
}
@ -253,7 +223,7 @@ textarea[class*="span"],
// GRID SIZING FOR INPUTS
// ----------------------
#inputGridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
@include inputGridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth);
@ -262,12 +232,7 @@ textarea[class*="span"],
// --------------
// Disabled and read-only inputs
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
background-color: #f5f5f5;
border-color: #ddd;
cursor: not-allowed;
@ -281,27 +246,25 @@ textarea[readonly] {
// Warning
.control-group.warning {
.formFieldState(@warningText, @warningText, @warningBackground);
@include formFieldState($warningText, $warningText, $warningBackground);
}
// Error
.control-group.error {
.formFieldState(@errorText, @errorText, @errorBackground);
@include formFieldState($errorText, $errorText, $errorBackground);
}
// Success
.control-group.success {
.formFieldState(@successText, @successText, @successBackground);
@include formFieldState($successText, $successText, $successBackground);
}
// HTML5 invalid states
// Shares styles with the .control-group.error above
input:focus:required:invalid,
textarea:focus:required:invalid,
select:focus:required:invalid {
input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
color: #b94a48;
border-color: #ee5f5b;
&:focus {
border-color: darken(#ee5f5b, 10%);
.box-shadow(0 0 6px lighten(#ee5f5b, 20%));
@include box-shadow(0 0 6px lighten(#ee5f5b, 20%));
}
}
@ -311,9 +274,9 @@ select:focus:required:invalid {
// ------------
.form-actions {
padding: (@baseLineHeight - 1) 20px @baseLineHeight;
margin-top: @baseLineHeight;
margin-bottom: @baseLineHeight;
padding: ($baseLineHeight - 1) 20px $baseLineHeight;
margin-top: $baseLineHeight;
margin-bottom: $baseLineHeight;
background-color: #f5f5f5;
border-top: 1px solid #ddd;
}
@ -321,14 +284,14 @@ select:focus:required:invalid {
// For text that needs to appear as an input but should not be an input
.uneditable-input {
display: block;
background-color: @white;
background-color: $white;
border-color: #eee;
.box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
cursor: not-allowed;
}
// Placeholder text gets special styles; can't be bundled together though for some reason
.placeholder(@grayLight);
@include placeholder($grayLight);
@ -339,12 +302,12 @@ select:focus:required:invalid {
display: block; // account for any element using help-block
margin-top: 5px;
margin-bottom: 0;
color: @grayLight;
color: $grayLight;
}
.help-inline {
display: inline-block;
.ie7-inline-block();
@include ie7-inline-block();
margin-bottom: 9px;
vertical-align: middle;
padding-left: 5px;
@ -356,41 +319,40 @@ select:focus:required:invalid {
// ------------
// Allow us to put symbols and text within the input field for a cleaner look
.input-prepend,
.input-append {
.input-prepend, .input-append {
margin-bottom: 5px;
.clearfix(); // Clear the float to prevent wrapping
input,
.uneditable-input {
.border-radius(0 3px 3px 0);
@include clearfix(); // Clear the float to prevent wrapping
input, .uneditable-input {
@include border-radius(0 3px 3px 0);
&:focus {
position: relative;
z-index: 2;
}
}
.uneditable-input {
border-left-color: #ccc;
border-left-color: #eee;
border-right-color: #ccc;
}
.add-on {
float: left;
display: block;
width: auto;
min-width: 16px;
height: @baseLineHeight;
height: $baseLineHeight;
margin-right: -1px;
padding: 4px 5px;
font-weight: normal;
line-height: @baseLineHeight;
color: @grayLight;
line-height: $baseLineHeight;
color: $grayLight;
text-align: center;
text-shadow: 0 1px 0 @white;
text-shadow: 0 1px 0 $white;
background-color: #f5f5f5;
border: 1px solid #ccc;
.border-radius(3px 0 0 3px);
@include border-radius(3px 0 0 3px);
}
.active {
background-color: lighten(@green, 30);
border-color: @green;
background-color: lighten($green, 30);
border-color: $green;
}
}
.input-prepend {
@ -399,19 +361,17 @@ select:focus:required:invalid {
}
}
.input-append {
input,
.uneditable-input {
input, .uneditable-input {
float: left;
.border-radius(3px 0 0 3px);
@include border-radius(3px 0 0 3px);
}
.uneditable-input {
border-left-color: #eee;
border-right-color: #ccc;
border-right-color: #ccc;
}
.add-on {
margin-right: 0;
margin-left: -1px;
.border-radius(0 3px 3px 0);
@include border-radius(0 3px 3px 0);
}
input:first-child {
// In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
@ -433,7 +393,7 @@ select:focus:required:invalid {
padding-left: 14px;
padding-right: 14px;
margin-bottom: 0; // remove the default margin on all inputs
.border-radius(14px);
@include border-radius(14px);
}
@ -444,54 +404,35 @@ select:focus:required:invalid {
// Common properties
// -----------------
.form-search,
.form-inline,
.form-horizontal {
input,
textarea,
select,
.help-inline,
.uneditable-input {
.form-search, .form-inline, .form-horizontal {
input, textarea, select, .help-inline, .uneditable-input {
display: inline-block;
margin-bottom: 0;
}
// Re-hide hidden elements due to specifity
.hide {
display: none;
}
// Re-hide elemnts due to specifity
.hide { display: none; }
}
.form-search label,
.form-inline label,
.form-search .input-append,
.form-inline .input-append,
.form-search .input-prepend,
.form-inline .input-prepend {
.form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
display: inline-block;
}
// Make the prepend and append add-on vertical-align: middle;
.form-search .input-append .add-on,
.form-inline .input-prepend .add-on,
.form-search .input-append .add-on,
.form-inline .input-prepend .add-on {
.form-search .input-append .add-on, .form-inline .input-prepend .add-on, .form-search .input-append .add-on, .form-inline .input-prepend .add-on {
vertical-align: middle;
}
// Inline checkbox/radio labels
.form-search .radio,
.form-inline .radio,
.form-search .checkbox,
.form-inline .checkbox {
.form-search .radio, .form-inline .radio, .form-search .checkbox, .form-inline .checkbox {
margin-bottom: 0;
vertical-align: middle;
}
// Margin to space out fieldsets
.control-group {
margin-bottom: @baseLineHeight / 2;
margin-bottom: $baseLineHeight / 2;
}
// Legend collapses margin, so next element is responsible for spacing
// Legend collapses margin, so next elements is responsible for spacing
legend + .control-group {
margin-top: @baseLineHeight;
margin-top: $baseLineHeight;
-webkit-margin-top-collapse: separate;
}
@ -501,8 +442,8 @@ legend + .control-group {
.form-horizontal {
// Increase spacing between groups
.control-group {
margin-bottom: @baseLineHeight;
.clearfix();
margin-bottom: $baseLineHeight;
@include clearfix();
}
// Float the labels left
.control-label {

View File

@ -0,0 +1,8 @@
// GRID SYSTEM
// -----------
// Fixed (940px)
@include gridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth);
// Fluid (940px)
@include fluidGridSystemGenerate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);

View File

@ -5,7 +5,7 @@
padding: 60px;
margin-bottom: 30px;
background-color: #f5f5f5;
.border-radius(6px);
@include border-radius(6px);
h1 {
margin-bottom: 0;
font-size: 60px;
@ -15,6 +15,6 @@
p {
font-size: 18px;
font-weight: 200;
line-height: @baseLineHeight * 1.5;
line-height: $baseLineHeight * 1.5;
}
}
}

View File

@ -0,0 +1,32 @@
// LABELS
// ------
// Base
.label {
padding: 2px 4px 3px;
font-size: $baseFontSize * .85;
font-weight: bold;
color: $white;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
background-color: $grayLight;
@include border-radius(3px);
}
// Hover state
.label:hover {
color: $white;
text-decoration: none;
}
// Colors
.label-important { background-color: $errorText; }
.label-important:hover { background-color: darken($errorText, 10%); }
.label-warning { background-color: $orange; }
.label-warning:hover { background-color: darken($orange, 10%); }
.label-success { background-color: $successText; }
.label-success:hover { background-color: darken($successText, 10%); }
.label-info { background-color: $infoText; }
.label-info:hover { background-color: darken($infoText, 10%); }

View File

@ -6,12 +6,12 @@
// Container (centered, fixed-width layouts)
.container {
.container-fixed();
@include container-fixed();
}
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
.container-fluid {
padding-left: @gridGutterWidth;
padding-right: @gridGutterWidth;
.clearfix();
padding-left: $gridGutterWidth;
padding-right: $gridGutterWidth;
@include clearfix();
}

View File

@ -0,0 +1,530 @@
// Mixins.less
// Snippets of reusable CSS to develop faster and keep code readable
// -----------------------------------------------------------------
// UTILITY MIXINS
// --------------------------------------------------
// Clearfix
// --------
// For clearing floats like a boss h5bp.com/q
@mixin clearfix() {
*zoom: 1;
&:before,
&:after {
display: table;
content: "";
}
&:after {
clear: both;
}
}
.clearfix { @include clearfix(); }
// Webkit-style focus
// ------------------
@mixin tab-focus() {
// Default
outline: thin dotted #333;
// Webkit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
// Center-align a block level element
// ----------------------------------
@mixin center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// IE7 inline-block
// ----------------
@mixin ie7-inline-block() {
*display: inline; /* IE7 inline-block hack */
*zoom: 1;
}
// IE7 likes to collapse whitespace on either side of the inline-block elements.
// Ems because we're attempting to match the width of a space character. Left
// version is for form buttons, which typically come after other elements, and
// right version is for icons, which come before. Applying both is ok, but it will
// mean that space between those elements will be .6em (~2 space characters) in IE7,
// instead of the 1 space in other browsers.
@mixin ie7-restore-left-whitespace() {
*margin-left: .3em;
&:first-child {
*margin-left: 0;
}
}
@mixin ie7-restore-right-whitespace() {
*margin-right: .3em;
&:last-child {
*margin-left: 0;
}
}
// Sizing shortcuts
// -------------------------
@mixin size($height: 5px, $width: 5px) {
width: $width;
height: $height;
}
@mixin square($size: 5px) {
@include size($size, $size);
}
// Placeholder text
// -------------------------
@mixin placeholder($color: $placeholderText) {
:-moz-placeholder {
color: $color;
}
::-webkit-input-placeholder {
color: $color;
}
}
// Text overflow
// ------------------------
@mixin text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// FONTS
// --------------------------------------------------
@mixin font-family-serif() {
font-family: Georgia, "Times New Roman", Times, serif;
}
@mixin font-family-sans-serif() {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@mixin font-family-monospace() {
font-family: Menlo, Monaco, "Courier New", monospace;
}
@mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
font-size: $size;
font-weight: $weight;
line-height: $lineHeight;
}
@mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
@include font-family-serif();
@include font-shorthand($size, $weight, $lineHeight);
}
@mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
@include font-family-sans-serif();
@include font-shorthand($size, $weight, $lineHeight);
}
@mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
@include font-family-monospace();
@include font-shorthand($size, $weight, $lineHeight);
}
// GRID SYSTEM
// --------------------------------------------------
// Site container
// -------------------------
@mixin container-fixed() {
width: $gridRowWidth;
margin-left: auto;
margin-right: auto;
@include clearfix();
}
// Le grid system
// -------------------------
// Setup the mixins to be used
@mixin gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
}
@mixin gridSystemOffset($gridColumnWidth, $gridGutterWidth, $columns) {
margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
}
@mixin gridSystemGridColumn($gridGutterWidth) {
float: left;
margin-left: $gridGutterWidth;
}
// Take these values and mixins, and make 'em do their thang
@mixin gridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
// Row surrounds the columns
.row {
margin-left: $gridGutterWidth * -1;
@include clearfix();
}
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
[class*="span"] {
@include gridSystemGridColumn($gridGutterWidth);
}
// Default columns
@for $i from 1 through $gridColumns {
.span#{$i} { @include gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i) }
}
.container { @include gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $gridColumns) }
// Offset column options
@for $i from 1 through $gridColumns - 1 {
.offset#{$i} { @include gridSystemOffset($gridColumnWidth, $gridGutterWidth, $i) }
}
}
// Fluid grid system
// -------------------------
@mixin fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $columns) {
width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
}
@mixin fluidGridSystemGridColumn($fluidGridGutterWidth) {
float: left;
margin-left: $fluidGridGutterWidth;
}
// Take these values and mixins, and make 'em do their thang
@mixin fluidGridSystemGenerate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
// Row surrounds the columns
.row-fluid {
width: 100%;
@include clearfix();
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
> [class*="span"] {
@include fluidGridSystemGridColumn($fluidGridGutterWidth);
}
> [class*="span"]:first-child {
margin-left: 0;
}
// Default columns
@for $i from 1 through $gridColumns {
> .span#{$i} { @include fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $i); }
}
}
}
// Input grid system
// -------------------------
@mixin inputGridSystemInputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 10;
}
@mixin inputGridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
input, textarea, .uneditable-input {
@for $i from 1 through $gridColumns {
&.span#{$i} { @include inputGridSystemInputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i); }
}
}
}
// Make a grid
// -------------------------
// Use makeRow() and makeColumn() to assign semantic layouts grid system behaviour
@mixin makeRow() {
margin-left: $gridGutterWidth * -1;
@include clearfix();
}
@mixin makeColumn($columns: 1) {
float: left;
margin-left: $gridGutterWidth;
width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
}
// Form field states (used in forms.less)
// --------------------------------------------------
// Mixin for form field states
@mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
// Set the text color
> label, .help-block, .help-inline {
color: $textColor;
}
// Style inputs accordingly
input, select, textarea {
color: $textColor;
border-color: $borderColor;
&:focus {
border-color: darken($borderColor, 10%);
@include box-shadow(0 0 6px lighten($borderColor, 20%));
}
}
// Give a small background color for input-prepend/-append
.input-prepend .add-on, .input-append .add-on {
color: $textColor;
background-color: $backgroundColor;
border-color: $textColor;
}
}
// CSS3 PROPERTIES
// --------------------------------------------------
// Border Radius
@mixin border-radius($radius: 5px) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
// Drop shadows
@mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
-webkit-box-shadow: $shadow;
-moz-box-shadow: $shadow;
box-shadow: $shadow;
}
// Transitions
@mixin transition($transition) {
-webkit-transition: $transition;
-moz-transition: $transition;
-ms-transition: $transition;
-o-transition: $transition;
transition: $transition;
}
// Transformations
@mixin rotate($degrees) {
-webkit-transform: rotate($degrees);
-moz-transform: rotate($degrees);
-ms-transform: rotate($degrees);
-o-transform: rotate($degrees);
transform: rotate($degrees);
}
@mixin scale($ratio) {
-webkit-transform: scale($ratio);
-moz-transform: scale($ratio);
-ms-transform: scale($ratio);
-o-transform: scale($ratio);
transform: scale($ratio);
}
@mixin translate($x: 0, $y: 0) {
-webkit-transform: translate($x, $y);
-moz-transform: translate($x, $y);
-ms-transform: translate($x, $y);
-o-transform: translate($x, $y);
transform: translate($x, $y);
}
@mixin skew($x: 0, $y: 0) {
-webkit-transform: skew($x, $y);
-moz-transform: skew($x, $y);
-ms-transform: skew($x, $y);
-o-transform: skew($x, $y);
transform: skew($x, $y);
}
@mixin translate3d($x: 0, $y: 0, $z: 0) {
-webkit-transform: translate($x, $y, $z);
-moz-transform: translate($x, $y, $z);
-ms-transform: translate($x, $y, $z);
-o-transform: translate($x, $y, $z);
transform: translate($x, $y, $z);
}
// Background clipping
// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
@mixin background-clip($clip) {
-webkit-background-clip: $clip;
-moz-background-clip: $clip;
background-clip: $clip;
}
// Background sizing
@mixin background-size($size){
-webkit-background-size: $size;
-moz-background-size: $size;
-o-background-size: $size;
background-size: $size;
}
// Box sizing
@mixin box-sizing($boxmodel) {
-webkit-box-sizing: $boxmodel;
-moz-box-sizing: $boxmodel;
box-sizing: $boxmodel;
}
// User select
// For selecting text on the page
@mixin user-select($select) {
-webkit-user-select: $select;
-moz-user-select: $select;
-o-user-select: $select;
user-select: $select;
}
// Resize anything
@mixin resizable($direction: both) {
resize: $direction; // Options: horizontal, vertical, both
overflow: auto; // Safari fix
}
// CSS3 Content Columns
@mixin content-columns($columnCount, $columnGap: $gridColumnGutter) {
-webkit-column-count: $columnCount;
-moz-column-count: $columnCount;
column-count: $columnCount;
-webkit-column-gap: $columnGap;
-moz-column-gap: $columnGap;
column-gap: $columnGap;
}
// Opacity
@mixin opacity($opacity: 1) {
opacity: $opacity;
filter: alpha(opacity=$opacity * 100);
}
// BACKGROUNDS
// --------------------------------------------------
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
@mixin translucent-background($color: $white, $alpha: 1) {
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
}
@mixin translucent-border($color: $white, $alpha: 1) {
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
@include background-clip(padding-box);
}
// Gradient Bar Colors for buttons and alerts
@mixin gradientBar($primaryColor, $secondaryColor) {
@include gradient-vertical($primaryColor, $secondaryColor);
border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
}
// Gradients
@mixin gradient-horizontal($startColor: #555, $endColor: #333) {
background-color: $endColor;
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=1); // IE9 and down
}
@mixin gradient-vertical($startColor: #555, $endColor: #333) {
background-color: mix($startColor, $endColor, 60%);
background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
background-image: linear-gradient(top, $startColor, $endColor); // The standard
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down
}
@mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
background-color: $endColor;
background-repeat: repeat-x;
background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
background-image: linear-gradient($deg, $startColor, $endColor); // The standard
}
@mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
background-color: mix($midColor, $endColor, 80%);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
background-repeat: no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
}
@mixin gradient-radial($innerColor: #555, $outerColor: #333) {
background-color: $outerColor;
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
background-image: -ms-radial-gradient(circle, $innerColor, $outerColor);
background-repeat: no-repeat;
// Opera cannot do radial gradients yet
}
@mixin gradient-striped($color, $angle: -45deg) {
background-color: $color;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -ms-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, rgba(255,255,255,0) 75%, rgba(255,255,255,0));
}
// Reset filters for IE
@mixin reset-filter() {
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
// Mixin for generating button backgrounds
// ---------------------------------------
@mixin buttonBackground($startColor, $endColor) {
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
@include gradientBar($startColor, $endColor);
@include reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
background-color: $endColor;
}
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
&:active, &.active {
background-color: darken($endColor, 10%) \9;
}
}
// COMPONENT MIXINS
// --------------------------------------------------
// POPOVER ARROWS
// -------------------------
// For tipsies and popovers
@mixin popoverArrowTop($arrowWidth: 5px) {
bottom: 0;
left: 50%;
margin-left: -$arrowWidth;
border-left: $arrowWidth solid transparent;
border-right: $arrowWidth solid transparent;
border-top: $arrowWidth solid $black;
}
@mixin popoverArrowLeft($arrowWidth: 5px) {
top: 50%;
right: 0;
margin-top: -$arrowWidth;
border-top: $arrowWidth solid transparent;
border-bottom: $arrowWidth solid transparent;
border-left: $arrowWidth solid $black;
}
@mixin popoverArrowBottom($arrowWidth: 5px) {
top: 0;
left: 50%;
margin-left: -$arrowWidth;
border-left: $arrowWidth solid transparent;
border-right: $arrowWidth solid transparent;
border-bottom: $arrowWidth solid $black;
}
@mixin popoverArrowRight($arrowWidth: 5px) {
top: 50%;
left: 0;
margin-top: -$arrowWidth;
border-top: $arrowWidth solid transparent;
border-bottom: $arrowWidth solid transparent;
border-right: $arrowWidth solid $black;
}

View File

@ -3,10 +3,10 @@
// Recalculate z-index where appropriate
.modal-open {
.dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
.dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
.popover { z-index: @zindexPopover + @zindexModal; }
.tooltip { z-index: @zindexTooltip + @zindexModal; }
.dropdown-menu { z-index: $zindexDropdown + $zindexModal; }
.dropdown.open { *z-index: $zindexDropdown + $zindexModal; }
.popover { z-index: $zindexPopover + $zindexModal; }
.tooltip { z-index: $zindexTooltip + $zindexModal; }
}
// Background
@ -16,15 +16,14 @@
right: 0;
bottom: 0;
left: 0;
z-index: @zindexModalBackdrop;
background-color: @black;
z-index: $zindexModalBackdrop;
background-color: $black;
// Fade for backdrop
&.fade { opacity: 0; }
}
.modal-backdrop,
.modal-backdrop.fade.in {
.opacity(80);
.modal-backdrop, .modal-backdrop.fade.in {
@include opacity(0.8);
}
// Base modal
@ -32,20 +31,21 @@
position: fixed;
top: 50%;
left: 50%;
z-index: @zindexModal;
z-index: $zindexModal;
max-height: 500px;
overflow: auto;
width: 560px;
margin: -250px 0 0 -280px;
background-color: @white;
background-color: $white;
border: 1px solid #999;
border: 1px solid rgba(0,0,0,.3);
*border: 1px solid #999; /* IE6-7 */
.border-radius(6px);
.box-shadow(0 3px 7px rgba(0,0,0,0.3));
.background-clip(padding-box);
@include border-radius(6px);
@include box-shadow(0 3px 7px rgba(0,0,0,0.3));
@include background-clip(padding-box);
&.fade {
.transition(e('opacity .3s linear, top .3s ease-out'));
$transition: opacity .3s linear, top .3s ease-out;
@include transition($transition);
top: -25%;
}
&.fade.in { top: 50%; }
@ -57,7 +57,7 @@
.close { margin-top: 2px; }
}
// Body (where all modal content resises)
// Body (where all modal content resides)
.modal-body {
padding: 15px;
}
@ -72,9 +72,9 @@
margin-bottom: 0;
background-color: #f5f5f5;
border-top: 1px solid #ddd;
.border-radius(0 0 6px 6px);
.box-shadow(inset 0 1px 0 @white);
.clearfix();
@include border-radius(0 0 6px 6px);
@include box-shadow(inset 0 1px 0 $white);
@include clearfix();
.btn {
float: right;
margin-left: 5px;

View File

@ -7,17 +7,17 @@
.navbar {
overflow: visible;
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
}
// Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
.navbar-inner {
padding-left: 20px;
padding-left: 20px;
padding-right: 20px;
#gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
.border-radius(4px);
@shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
.box-shadow(@shadow);
@include gradient-vertical($navbarBackgroundHighlight, $navbarBackground);
@include border-radius(4px);
$shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
@include box-shadow($shadow);
}
// Navbar button for toggling navbar items in responsive layouts
@ -27,17 +27,17 @@
padding: 7px 10px;
margin-left: 5px;
margin-right: 5px;
.buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
.box-shadow(@shadow);
@include buttonBackground($navbarBackgroundHighlight, $navbarBackground);
$shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
@include box-shadow($shadow);
}
.btn-navbar .icon-bar {
display: block;
width: 18px;
height: 2px;
background-color: #f5f5f5;
.border-radius(1px);
.box-shadow(0 1px 0 rgba(0,0,0,.25));
@include border-radius(1px);
@include box-shadow(0 1px 0 rgba(0,0,0,.25));
}
.btn-navbar .icon-bar + .icon-bar {
margin-top: 3px;
@ -63,21 +63,20 @@
font-size: 20px;
font-weight: 200;
line-height: 1;
color: @white;
color: $white;
}
// Plain text in topbar
.navbar-text {
margin-bottom: 0;
line-height: 40px;
color: @navbarText;
color: $navbarText;
a:hover {
color: @white;
color: $white;
background-color: transparent;
}
}
// Buttons in navbar
.btn,
.btn-group {
.btn, .btn-group {
margin-top: 5px; // make buttons vertically centered in navbar
}
.btn-group .btn {
@ -88,28 +87,23 @@
// Navbar forms
.navbar-form {
margin-bottom: 0; // remove default bottom margin
.clearfix();
input,
select {
@include clearfix();
input, select {
display: inline-block;
margin-top: 5px;
margin-bottom: 0;
}
.radio,
.checkbox {
.radio, .checkbox {
margin-top: 5px;
}
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
input[type="image"], input[type="checkbox"], input[type="radio"] {
margin-top: 3px;
}
.input-append,
.input-prepend {
.input-append, .input-prepend {
margin-top: 6px;
white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
white-space: nowrap; // prevents two items from separating within a .navbar-form that has .pull-left
input {
margin-top: 0; // remove the margin on top since it's on the parent
margin-top: 0; //remove the margin on top since it's on parent
}
}
}
@ -122,34 +116,33 @@
margin-bottom: 0;
.search-query {
padding: 4px 9px;
#font > .sans-serif(13px, normal, 1);
color: @white;
@include font-sans-serif(13px, normal, 1);
color: $white;
color: rgba(255,255,255,.75);
background: #666;
background: rgba(255,255,255,.3);
border: 1px solid #111;
@shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
.box-shadow(@shadow);
.transition(none);
$shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
@include box-shadow($shadow);
@include transition(none);
// Placeholder text gets special styles; can't be bundled together though for some reason
.placeholder(@grayLighter);
@include placeholder($grayLighter);
// Hover states
&:hover {
color: @white;
background-color: @grayLight;
color: $white;
background-color: $grayLight;
background-color: rgba(255,255,255,.5);
}
// Focus states (we use .focused since IE7-8 and down doesn't support :focus)
&:focus,
&.focused {
&:focus, &.focused {
padding: 5px 10px;
color: @grayDark;
text-shadow: 0 1px 0 @white;
background-color: @white;
color: $grayDark;
text-shadow: 0 1px 0 $white;
background-color: $white;
border: 0;
.box-shadow(0 0 3px rgba(0,0,0,.15));
@include box-shadow(0 0 3px rgba(0,0,0,.15));
outline: 0;
}
}
@ -164,12 +157,12 @@
top: 0;
right: 0;
left: 0;
z-index: @zindexFixedNavbar;
z-index: $zindexFixedNavbar;
}
.navbar-fixed-top .navbar-inner {
padding-left: 0;
padding-left: 0;
padding-right: 0;
.border-radius(0);
@include border-radius(0);
}
@ -196,33 +189,32 @@
float: none;
padding: 10px 10px 11px;
line-height: 19px;
color: @navbarLinkColor;
color: $navbarLinkColor;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
// Hover
.navbar .nav > li > a:hover {
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
color: @navbarLinkColorHover;
background-color: $navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from :active
color: $navbarLinkColorHover;
text-decoration: none;
}
// Active nav items
.navbar .nav .active > a,
.navbar .nav .active > a:hover {
color: @navbarLinkColorHover;
.navbar .nav .active > a, .navbar .nav .active > a:hover {
color: $navbarLinkColorHover;
text-decoration: none;
background-color: @navbarBackground;
background-color: $navbarBackground;
}
// Dividers (basically a vertical hr)
.navbar .divider-vertical {
height: @navbarHeight;
height: $navbarHeight;
width: 1px;
margin: 0 9px;
overflow: hidden;
background-color: @navbarBackground;
border-right: 1px solid @navbarBackgroundHighlight;
background-color: $navbarBackground;
border-right: 1px solid $navbarBackgroundHighlight;
}
// Secondary (floated right) nav in topbar
@ -239,7 +231,7 @@
// Menu position and menu carets
.navbar .dropdown-menu {
margin-top: 1px;
.border-radius(4px);
@include border-radius(4px);
&:before {
content: '';
display: inline-block;
@ -256,7 +248,7 @@
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid @white;
border-bottom: 6px solid $white;
position: absolute;
top: -6px;
left: 10px;
@ -264,24 +256,21 @@
}
// Dropdown toggle caret
.navbar .nav .dropdown-toggle .caret,
.navbar .nav .open.dropdown .caret {
border-top-color: @white;
.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret {
border-top-color: $white;
}
.navbar .nav .active .caret {
.opacity(100);
@include opacity(1);
}
// Remove background color from open dropdown
.navbar .nav .open > .dropdown-toggle,
.navbar .nav .active > .dropdown-toggle,
.navbar .nav .open.active > .dropdown-toggle {
.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
background-color: transparent;
}
// Dropdown link on hover
.navbar .nav .active > .dropdown-toggle:hover {
color: @white;
color: $white;
}
// Right aligned menus need alt position

View File

@ -8,7 +8,7 @@
.nav {
margin-left: 0;
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
list-style: none;
}
@ -18,7 +18,7 @@
}
.nav > li > a:hover {
text-decoration: none;
background-color: @grayLighter;
background-color: $grayLighter;
}
// Nav headers (for dropdowns and lists)
@ -27,8 +27,8 @@
padding: 3px 15px;
font-size: 11px;
font-weight: bold;
line-height: @baseLineHeight;
color: @grayLight;
line-height: $baseLineHeight;
color: $grayLight;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
text-transform: uppercase;
}
@ -46,8 +46,7 @@
padding-right: 14px;
margin-bottom: 0;
}
.nav-list > li > a,
.nav-list .nav-header {
.nav-list > li > a, .nav-list .nav-header {
margin-left: -15px;
margin-right: -15px;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
@ -55,11 +54,10 @@
.nav-list > li > a {
padding: 3px 15px;
}
.nav-list .active > a,
.nav-list .active > a:hover {
color: @white;
.nav-list .active > a, .nav-list .active > a:hover {
color: $white;
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
background-color: @linkColor;
background-color: $linkColor;
}
.nav-list [class^="icon-"] {
margin-right: 2px;
@ -71,16 +69,13 @@
// -------------
// Common styles
.nav-tabs,
.nav-pills {
.clearfix();
.nav-tabs, .nav-pills {
@include clearfix();
}
.nav-tabs > li,
.nav-pills > li {
.nav-tabs > li, .nav-pills > li {
float: left;
}
.nav-tabs > li > a,
.nav-pills > li > a {
.nav-tabs > li > a, .nav-pills > li > a {
padding-right: 12px;
padding-left: 12px;
margin-right: 2px;
@ -105,16 +100,15 @@
padding-top: 9px;
padding-bottom: 9px;
border: 1px solid transparent;
.border-radius(4px 4px 0 0);
@include border-radius(4px 4px 0 0);
&:hover {
border-color: @grayLighter @grayLighter #ddd;
border-color: $grayLighter $grayLighter #ddd;
}
}
// Active state, and it's :hover to override normal :hover
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover {
color: @gray;
background-color: @white;
.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
color: $gray;
background-color: $white;
border: 1px solid #ddd;
border-bottom-color: transparent;
cursor: default;
@ -129,14 +123,13 @@
padding-bottom: 8px;
margin-top: 2px;
margin-bottom: 2px;
.border-radius(5px);
@include border-radius(5px);
}
// Active state
.nav-pills .active > a,
.nav-pills .active > a:hover {
color: @white;
background-color: @linkColor;
.nav-pills .active > a, .nav-pills .active > a:hover {
color: $white;
background-color: $linkColor;
}
@ -158,13 +151,13 @@
}
.nav-tabs.nav-stacked > li > a {
border: 1px solid #ddd;
.border-radius(0);
@include border-radius(0);
}
.nav-tabs.nav-stacked > li:first-child > a {
.border-radius(4px 4px 0 0);
@include border-radius(4px 4px 0 0);
}
.nav-tabs.nav-stacked > li:last-child > a {
.border-radius(0 0 4px 4px);
@include border-radius(0 0 4px 4px);
}
.nav-tabs.nav-stacked > li > a:hover {
border-color: #ddd;
@ -185,61 +178,53 @@
// ---------
// Position the menu
.nav-tabs .dropdown-menu,
.nav-pills .dropdown-menu {
.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
margin-top: 1px;
border-width: 1px;
}
.nav-pills .dropdown-menu {
.border-radius(4px);
@include border-radius(4px);
}
// Default dropdown links
// -------------------------
// Make carets use linkColor to start
.nav-tabs .dropdown-toggle .caret,
.nav-pills .dropdown-toggle .caret {
border-top-color: @linkColor;
.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
border-top-color: $linkColor;
margin-top: 6px;
}
.nav-tabs .dropdown-toggle:hover .caret,
.nav-pills .dropdown-toggle:hover .caret {
border-top-color: @linkColorHover;
.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
border-top-color: $linkColorHover;
}
// Active dropdown links
// -------------------------
.nav-tabs .active .dropdown-toggle .caret,
.nav-pills .active .dropdown-toggle .caret {
border-top-color: @grayDark;
.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
border-top-color: $grayDark;
}
// Active:hover dropdown links
// -------------------------
.nav > .dropdown.active > a:hover {
color: @black;
color: $black;
cursor: pointer;
}
// Open dropdowns
// -------------------------
.nav-tabs .open .dropdown-toggle,
.nav-pills .open .dropdown-toggle,
.nav > .open.active > a:hover {
color: @white;
background-color: @grayLight;
border-color: @grayLight;
.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
color: $white;
background-color: $grayLight;
border-color: $grayLight;
}
.nav .open .caret,
.nav .open.active .caret,
.nav .open a:hover .caret {
border-top-color: @white;
.opacity(100);
.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
border-top-color: $white;
@include opacity(1);
}
// Dropdowns in stacked tabs
.tabs-stacked .open > a:hover {
border-color: @grayLight;
border-color: $grayLight;
}
@ -253,26 +238,22 @@
// Clear any floats
.tabbable {
.clearfix();
@include clearfix();
}
.tab-content {
overflow: hidden; // prevent content from running below tabs
}
// Remove border on bottom, left, right
.tabs-below .nav-tabs,
.tabs-right .nav-tabs,
.tabs-left .nav-tabs {
.tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs {
border-bottom: 0;
}
// Show/hide tabbable areas
.tab-content > .tab-pane,
.pill-content > .pill-pane {
.tab-content > .tab-pane, .pill-content > .pill-pane {
display: none;
}
.tab-content > .active,
.pill-content > .active {
.tab-content > .active, .pill-content > .active {
display: block;
}
@ -288,14 +269,13 @@
margin-bottom: 0;
}
.tabs-below .nav-tabs > li > a {
.border-radius(0 0 4px 4px);
@include border-radius(0 0 4px 4px);
&:hover {
border-bottom-color: transparent;
border-top-color: #ddd;
}
}
.tabs-below .nav-tabs .active > a,
.tabs-below .nav-tabs .active > a:hover {
.tabs-below .nav-tabs .active > a, .tabs-below .nav-tabs .active > a:hover {
border-color: transparent #ddd #ddd #ddd;
}
@ -303,12 +283,10 @@
// ------------
// Common styles
.tabs-left .nav-tabs > li,
.tabs-right .nav-tabs > li {
.tabs-left .nav-tabs > li, .tabs-right .nav-tabs > li {
float: none;
}
.tabs-left .nav-tabs > li > a,
.tabs-right .nav-tabs > li > a {
.tabs-left .nav-tabs > li > a, .tabs-right .nav-tabs > li > a {
min-width: 74px;
margin-right: 0;
margin-bottom: 3px;
@ -322,15 +300,14 @@
}
.tabs-left .nav-tabs > li > a {
margin-right: -1px;
.border-radius(4px 0 0 4px);
@include border-radius(4px 0 0 4px);
}
.tabs-left .nav-tabs > li > a:hover {
border-color: @grayLighter #ddd @grayLighter @grayLighter;
border-color: $grayLighter #ddd $grayLighter $grayLighter;
}
.tabs-left .nav-tabs .active > a,
.tabs-left .nav-tabs .active > a:hover {
.tabs-left .nav-tabs .active > a, .tabs-left .nav-tabs .active > a:hover {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: @white;
*border-right-color: $white;
}
// Tabs on the right
@ -341,13 +318,12 @@
}
.tabs-right .nav-tabs > li > a {
margin-left: -1px;
.border-radius(0 4px 4px 0);
@include border-radius(0 4px 4px 0);
}
.tabs-right .nav-tabs > li > a:hover {
border-color: @grayLighter @grayLighter @grayLighter #ddd;
border-color: $grayLighter $grayLighter $grayLighter #ddd;
}
.tabs-right .nav-tabs .active > a,
.tabs-right .nav-tabs .active > a:hover {
.tabs-right .nav-tabs .active > a, .tabs-right .nav-tabs .active > a:hover {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: @white;
*border-left-color: $white;
}

View File

@ -0,0 +1,30 @@
// PAGER
// -----
.pager {
margin-left: 0;
margin-bottom: $baseLineHeight;
list-style: none;
text-align: center;
@include clearfix();
}
.pager li {
display: inline;
}
.pager a {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
@include border-radius(15px);
}
.pager a:hover {
text-decoration: none;
background-color: #f5f5f5;
}
.pager .next a {
float: right;
}
.pager .previous a {
float: left;
}

View File

@ -2,48 +2,46 @@
// ----------
.pagination {
height: @baseLineHeight * 2;
margin: @baseLineHeight 0;
height: $baseLineHeight * 2;
margin: $baseLineHeight 0;
}
.pagination ul {
display: inline-block;
.ie7-inline-block();
@include ie7-inline-block();
margin-left: 0;
margin-bottom: 0;
.border-radius(3px);
.box-shadow(0 1px 2px rgba(0,0,0,.05));
@include border-radius(3px);
@include box-shadow(0 1px 2px rgba(0,0,0,.05));
}
.pagination li {
display: inline;
}
display: inline;
}
.pagination a {
float: left;
padding: 0 14px;
line-height: (@baseLineHeight * 2) - 2;
line-height: ($baseLineHeight * 2) - 2;
text-decoration: none;
border: 1px solid #ddd;
border-left-width: 0;
}
.pagination a:hover,
.pagination .active a {
.pagination a:hover, .pagination .active a {
background-color: #f5f5f5;
}
.pagination .active a {
color: @grayLight;
color: $grayLight;
cursor: default;
}
.pagination .disabled a,
.pagination .disabled a:hover {
color: @grayLight;
.pagination .disabled a, .pagination .disabled a:hover {
color: $grayLight;
background-color: transparent;
cursor: default;
}
.pagination li:first-child a {
border-left-width: 1px;
.border-radius(3px 0 0 3px);
@include border-radius(3px 0 0 3px);
}
.pagination li:last-child a {
.border-radius(0 3px 3px 0);
@include border-radius(0 3px 3px 0);
}
// Centered
@ -52,4 +50,4 @@
}
.pagination-right {
text-align: right;
}
}

View File

@ -5,17 +5,17 @@
position: absolute;
top: 0;
left: 0;
z-index: @zindexPopover;
z-index: $zindexPopover;
display: none;
padding: 5px;
&.top { margin-top: -5px; }
&.right { margin-left: 5px; }
&.bottom { margin-top: 5px; }
&.left { margin-left: -5px; }
&.top .arrow { #popoverArrow > .top(); }
&.right .arrow { #popoverArrow > .right(); }
&.bottom .arrow { #popoverArrow > .bottom(); }
&.left .arrow { #popoverArrow > .left(); }
&.top .arrow { @include popoverArrowTop(); }
&.right .arrow { @include popoverArrowRight(); }
&.bottom .arrow { @include popoverArrowBottom(); }
&.left .arrow { @include popoverArrowLeft(); }
.arrow {
position: absolute;
width: 0;
@ -26,24 +26,24 @@
padding: 3px;
width: 280px;
overflow: hidden;
background: @black; // has to be full background declaration for IE fallback
background: $black; // has to be full background declaration for IE fallback
background: rgba(0,0,0,.8);
.border-radius(6px);
.box-shadow(0 3px 7px rgba(0,0,0,0.3));
@include border-radius(6px);
@include box-shadow(0 3px 7px rgba(0,0,0,0.3));
}
.popover-title {
padding: 9px 15px;
line-height: 1;
background-color: #f5f5f5;
border-bottom:1px solid #eee;
.border-radius(3px 3px 0 0);
@include border-radius(3px 3px 0 0);
}
.popover-content {
padding: 14px;
background-color: @white;
.border-radius(0 0 3px 3px);
.background-clip(padding-box);
background-color: $white;
@include border-radius(0 0 3px 3px);
@include background-clip(padding-box);
p, ul, ol {
margin-bottom: 0;
}
}
}

View File

@ -33,29 +33,29 @@
overflow: hidden;
height: 18px;
margin-bottom: 18px;
#gradient > .vertical(#f5f5f5, #f9f9f9);
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
.border-radius(4px);
@include gradient-vertical(#f5f5f5, #f9f9f9);
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
@include border-radius(4px);
}
// Bar of progress
.progress .bar {
width: 0%;
height: 18px;
color: @white;
color: $white;
font-size: 12px;
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
#gradient > .vertical(#149bdf, #0480be);
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.box-sizing(border-box);
.transition(width .6s ease);
@include gradient-vertical(#149bdf, #0480be);
@include box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
@include box-sizing(border-box);
@include transition(width .6s ease);
}
// Striped bars
.progress-striped .bar {
#gradient > .striped(#62c462);
.background-size(40px 40px);
@include gradient-striped(#62c462);
@include background-size(40px 40px);
}
// Call animation for the active one
@ -72,24 +72,24 @@
// Danger (red)
.progress-danger .bar {
#gradient > .vertical(#ee5f5b, #c43c35);
@include gradient-vertical(#ee5f5b, #c43c35);
}
.progress-danger.progress-striped .bar {
#gradient > .striped(#ee5f5b);
@include gradient-striped(#ee5f5b);
}
// Success (green)
.progress-success .bar {
#gradient > .vertical(#62c462, #57a957);
@include gradient-vertical(#62c462, #57a957);
}
.progress-success.progress-striped .bar {
#gradient > .striped(#62c462);
@include gradient-striped(#62c462);
}
// Info (teal)
.progress-info .bar {
#gradient > .vertical(#5bc0de, #339bb9);
@include gradient-vertical(#5bc0de, #339bb9);
}
.progress-info.progress-striped .bar {
#gradient > .striped(#5bc0de);
}
@include gradient-striped(#5bc0de);
}

View File

@ -1,29 +1,18 @@
// Reset.less
// Reset.css.scss
// Adapted from Normalize.css http://github.com/necolas/normalize.css
// ------------------------------------------------------------------------
// Display in IE6-9 and FF3
// -------------------------
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
display: block;
}
// Display block in IE6-9 and FF3
// -------------------------
audio,
canvas,
video {
audio, canvas, video {
display: inline-block;
*display: inline;
*zoom: 1;
@ -46,19 +35,17 @@ html {
}
// Focus states
a:focus {
.tab-focus();
@include tab-focus();
}
// Hover & Active
a:hover,
a:active {
a:hover, a:active {
outline: 0;
}
// Prevents sub and sup affecting line-height in all browsers
// -------------------------
sub,
sup {
sub, sup {
position: relative;
font-size: 75%;
line-height: 0;
@ -85,28 +72,20 @@ img {
// -------------------------
// Font size in all browsers, margin changes, misc consistency
button,
input,
select,
textarea {
button, input, select, textarea {
margin: 0;
font-size: 100%;
vertical-align: middle;
}
button,
input {
button, input {
*overflow: visible; // Inner spacing ie IE6/7
line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
}
button::-moz-focus-inner,
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
button::-moz-focus-inner, input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
padding: 0;
border: 0;
}
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
button, input[type="button"], input[type="reset"], input[type="submit"] {
cursor: pointer; // Cursors on all buttons applied consistently
-webkit-appearance: button; // Style clickable inputs in iOS
}
@ -123,4 +102,4 @@ input[type="search"]::-webkit-search-cancel-button {
textarea {
overflow: auto; // Remove vertical scrollbar in IE6-9
vertical-align: top; // Readability and alignment cross-browser
}
}

View File

@ -8,11 +8,11 @@
body {
margin: 0;
font-family: @baseFontFamily;
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @textColor;
background-color: @white;
font-family: $baseFontFamily;
font-size: $baseFontSize;
line-height: $baseLineHeight;
color: $textColor;
background-color: $white;
}
@ -20,10 +20,10 @@ body {
// -----
a {
color: @linkColor;
color: $linkColor;
text-decoration: none;
}
a:hover {
color: @linkColorHover;
color: $linkColorHover;
text-decoration: underline;
}
}

View File

@ -14,21 +14,20 @@
// For the white version of the icons, just add the .icon-white class:
// <i class="icon-inbox icon-white"></i>
[class^="icon-"],
[class*=" icon-"] {
[class^="icon-"], [class*=" icon-"] {
display: inline-block;
width: 14px;
height: 14px;
line-height: 14px;
vertical-align: text-top;
background-image: url(@iconSpritePath);
background-image: asset-url("glyphicons-halflings.png", image);
background-position: 14px 14px;
background-repeat: no-repeat;
.ie7-restore-right-whitespace();
@include ie7-restore-right-whitespace();
}
.icon-white {
background-image: url(@iconWhiteSpritePath);
background-image: asset-url("glyphicons-halflings-white.png", image);
}
.icon-glass { background-position: 0 0; }

View File

@ -18,12 +18,11 @@ table {
.table {
width: 100%;
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
// Cells
th,
td {
th, td {
padding: 8px;
line-height: @baseLineHeight;
line-height: $baseLineHeight;
text-align: left;
vertical-align: top;
border-top: 1px solid #ddd;
@ -36,8 +35,7 @@ table {
vertical-align: bottom;
}
// Remove top border from thead by default
thead:first-child tr th,
thead:first-child tr td {
thead:first-child tr th, thead:first-child tr td {
border-top: 0;
}
// Account for multiple tbody instances
@ -52,8 +50,7 @@ table {
// -------------------------------
.table-condensed {
th,
td {
th, td {
padding: 4px 5px;
}
}
@ -66,36 +63,27 @@ table {
border: 1px solid #ddd;
border-collapse: separate; // Done so we can round those corners!
*border-collapse: collapsed; // IE7 can't round corners anyway
.border-radius(4px);
th + th,
td + td,
th + td,
td + th {
@include border-radius(4px);
th + th, td + td, th + td, td + th {
border-left: 1px solid #ddd;
}
// Prevent a double border
thead:first-child tr:first-child th,
tbody:first-child tr:first-child th,
tbody:first-child tr:first-child td {
thead:first-child tr:first-child th, tbody:first-child tr:first-child th, tbody:first-child tr:first-child td {
border-top: 0;
}
// For first th or td in the first row in the first thead or tbody
thead:first-child tr:first-child th:first-child,
tbody:first-child tr:first-child td:first-child {
.border-radius(4px 0 0 0);
thead:first-child tr:first-child th:first-child, tbody:first-child tr:first-child td:first-child {
@include border-radius(4px 0 0 0);
}
thead:first-child tr:first-child th:last-child,
tbody:first-child tr:first-child td:last-child {
.border-radius(0 4px 0 0);
thead:first-child tr:first-child th:last-child, tbody:first-child tr:first-child td:last-child {
@include border-radius(0 4px 0 0);
}
// For first th or td in the first row in the first thead or tbody
thead:last-child tr:last-child th:first-child,
tbody:last-child tr:last-child td:first-child {
.border-radius(0 0 0 4px);
thead:last-child tr:last-child th:first-child, tbody:last-child tr:last-child td:first-child {
@include border-radius(0 0 0 4px);
}
thead:last-child tr:last-child th:last-child,
tbody:last-child tr:last-child td:last-child {
.border-radius(0 0 4px 0);
thead:last-child tr:last-child th:last-child, tbody:last-child tr:last-child td:last-child {
@include border-radius(0 0 4px 0);
}
}
@ -106,8 +94,7 @@ table {
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped {
tbody {
tr:nth-child(odd) td,
tr:nth-child(odd) th {
tr:nth-child(odd) td, tr:nth-child(odd) th {
background-color: #f9f9f9;
}
}
@ -118,33 +105,22 @@ table {
// ------------
// Placed here since it has to come after the potential zebra striping
.table {
tbody tr:hover td,
tbody tr:hover th {
tbody tr:hover td, tbody tr:hover th {
background-color: #f5f5f5;
}
}
// TABLE CELL SIZING
// -----------------
// Change the columns
.tableColumns(@columnSpan: 1) {
@mixin tableColumns($columnSpan: 1) {
float: none;
width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16;
width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16;
margin-left: 0;
}
table {
.span1 { .tableColumns(1); }
.span2 { .tableColumns(2); }
.span3 { .tableColumns(3); }
.span4 { .tableColumns(4); }
.span5 { .tableColumns(5); }
.span6 { .tableColumns(6); }
.span7 { .tableColumns(7); }
.span8 { .tableColumns(8); }
.span9 { .tableColumns(9); }
.span10 { .tableColumns(10); }
.span11 { .tableColumns(11); }
.span12 { .tableColumns(12); }
}
@for $i from 1 through $gridColumns {
.span#{$i} { @include tableColumns($i); }
}
}

View File

@ -2,26 +2,26 @@
// ----------
.thumbnails {
margin-left: -@gridGutterWidth;
margin-left: -$gridGutterWidth;
list-style: none;
.clearfix();
@include clearfix();
}
.thumbnails > li {
float: left;
margin: 0 0 @baseLineHeight @gridGutterWidth;
margin: 0 0 $baseLineHeight $gridGutterWidth;
}
.thumbnail {
display: block;
padding: 4px;
line-height: 1;
border: 1px solid #ddd;
.border-radius(4px);
.box-shadow(0 1px 1px rgba(0,0,0,.075));
@include border-radius(4px);
@include box-shadow(0 1px 1px rgba(0,0,0,.075));
}
// Add a hover state for linked versions only
a.thumbnail:hover {
border-color: @linkColor;
.box-shadow(0 1px 4px rgba(0,105,214,.25));
border-color: $linkColor;
@include box-shadow(0 1px 4px rgba(0,105,214,.25));
}
// Images and captions
.thumbnail > img {
@ -32,4 +32,4 @@ a.thumbnail:hover {
}
.thumbnail .caption {
padding: 9px;
}
}

View File

@ -3,30 +3,30 @@
.tooltip {
position: absolute;
z-index: @zindexTooltip;
z-index: $zindexTooltip;
display: block;
visibility: visible;
padding: 5px;
font-size: 11px;
.opacity(0);
&.in { .opacity(80); }
@include opacity(0);
&.in { @include opacity(0.8); }
&.top { margin-top: -2px; }
&.right { margin-left: 2px; }
&.bottom { margin-top: 2px; }
&.left { margin-left: -2px; }
&.top .tooltip-arrow { #popoverArrow > .top(); }
&.left .tooltip-arrow { #popoverArrow > .left(); }
&.bottom .tooltip-arrow { #popoverArrow > .bottom(); }
&.right .tooltip-arrow { #popoverArrow > .right(); }
&.top .tooltip-arrow { @include popoverArrowTop(); }
&.left .tooltip-arrow { @include popoverArrowLeft(); }
&.bottom .tooltip-arrow { @include popoverArrowBottom(); }
&.right .tooltip-arrow { @include popoverArrowRight(); }
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: @white;
color: $white;
text-align: center;
text-decoration: none;
background-color: @black;
.border-radius(4px);
background-color: $black;
@include border-radius(4px);
}
.tooltip-arrow {
position: absolute;

View File

@ -7,20 +7,20 @@
// ---------
p {
margin: 0 0 @baseLineHeight / 2;
font-family: @baseFontFamily;
font-size: @baseFontSize;
line-height: @baseLineHeight;
margin: 0 0 $baseLineHeight / 2;
font-family: $baseFontFamily;
font-size: $baseFontSize;
line-height: $baseLineHeight;
small {
font-size: @baseFontSize - 2;
color: @grayLight;
font-size: $baseFontSize - 2;
color: $grayLight;
}
}
.lead {
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
font-size: 20px;
font-weight: 200;
line-height: @baseLineHeight * 1.5;
line-height: $baseLineHeight * 1.5;
}
// HEADINGS
@ -29,36 +29,36 @@ p {
h1, h2, h3, h4, h5, h6 {
margin: 0;
font-weight: bold;
color: @grayDark;
color: $grayDark;
text-rendering: optimizelegibility; // Fix the character spacing for headings
small {
font-weight: normal;
color: @grayLight;
color: $grayLight;
}
}
h1 {
font-size: 30px;
line-height: @baseLineHeight * 2;
line-height: $baseLineHeight * 2;
small {
font-size: 18px;
}
}
h2 {
font-size: 24px;
line-height: @baseLineHeight * 2;
line-height: $baseLineHeight * 2;
small {
font-size: 18px;
}
}
h3 {
line-height: @baseLineHeight * 1.5;
line-height: $baseLineHeight * 1.5;
font-size: 18px;
small {
font-size: 14px;
}
}
h4, h5, h6 {
line-height: @baseLineHeight;
line-height: $baseLineHeight;
}
h4 {
font-size: 14px;
@ -71,15 +71,15 @@ h5 {
}
h6 {
font-size: 11px;
color: @grayLight;
color: $grayLight;
text-transform: uppercase;
}
// Page header
.page-header {
padding-bottom: @baseLineHeight - 1;
margin: @baseLineHeight 0;
border-bottom: 1px solid @grayLighter;
padding-bottom: $baseLineHeight - 1;
margin: $baseLineHeight 0;
border-bottom: 1px solid $grayLighter;
}
.page-header h1 {
line-height: 1;
@ -93,12 +93,9 @@ h6 {
// Unordered and Ordered lists
ul, ol {
padding: 0;
margin: 0 0 @baseLineHeight / 2 25px;
margin: 0 0 $baseLineHeight / 2 25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}
ul {
@ -108,31 +105,25 @@ ol {
list-style: decimal;
}
li {
line-height: @baseLineHeight;
line-height: $baseLineHeight;
}
ul.unstyled,
ol.unstyled {
ul.unstyled, ol.unstyled {
margin-left: 0;
list-style: none;
}
table ul {
margin: 0;
list-style-type: none;
}
// Description Lists
dl {
margin-bottom: @baseLineHeight;
margin-bottom: $baseLineHeight;
}
dt,
dd {
line-height: @baseLineHeight;
dt, dd {
line-height: $baseLineHeight;
}
dt {
font-weight: bold;
}
dd {
margin-left: @baseLineHeight / 2;
margin-left: $baseLineHeight / 2;
}
// MISC
@ -140,10 +131,10 @@ dd {
// Horizontal rules
hr {
margin: @baseLineHeight 0;
margin: $baseLineHeight 0;
border: 0;
border-top: 1px solid @hrBorder;
border-bottom: 1px solid @white;
border-top: 1px solid $hrBorder;
border-bottom: 1px solid $white;
}
// Emphasis
@ -154,7 +145,7 @@ em {
font-style: italic;
}
.muted {
color: @grayLight;
color: $grayLight;
}
// Abbreviations and acronyms
@ -168,16 +159,16 @@ abbr {
// Blockquotes
blockquote {
padding: 0 0 0 15px;
margin: 0 0 @baseLineHeight;
border-left: 5px solid @grayLighter;
margin: 0 0 $baseLineHeight;
border-left: 5px solid $grayLighter;
p {
margin-bottom: 0;
#font > .shorthand(16px,300,@baseLineHeight * 1.25);
@include font-shorthand(16px,300,$baseLineHeight * 1.25);
}
small {
display: block;
line-height: @baseLineHeight;
color: @grayLight;
line-height: $baseLineHeight;
color: $grayLight;
&:before {
content: '\2014 \00A0';
}
@ -189,27 +180,23 @@ blockquote {
padding-left: 0;
padding-right: 15px;
border-left: 0;
border-right: 5px solid @grayLighter;
p,
small {
border-right: 5px solid $grayLighter;
p, small {
text-align: right;
}
}
}
// Quotes
q:before,
q:after,
blockquote:before,
blockquote:after {
q:before, q:after, blockquote:before, blockquote:after {
content: "";
}
// Addresses
address {
display: block;
margin-bottom: @baseLineHeight;
line-height: @baseLineHeight;
margin-bottom: $baseLineHeight;
line-height: $baseLineHeight;
font-style: normal;
}
@ -219,4 +206,4 @@ small {
}
cite {
font-style: normal;
}
}

View File

@ -0,0 +1,103 @@
// Variables.less
// Variables to customize the look and feel of Bootstrap
// -----------------------------------------------------
// GLOBAL VALUES
// --------------------------------------------------
// Links
$linkColor: #08c !default;
$linkColorHover: darken($linkColor, 15%) !default;
// Grays
$black: #000 !default;
$grayDarker: #222 !default;
$grayDark: #333 !default;
$gray: #555 !default;
$grayLight: #999 !default;
$grayLighter: #eee !default;
$white: #fff !default;
// Accent colors
$blue: #049cdb !default;
$blueDark: #0064cd !default;
$green: #46a546 !default;
$red: #9d261d !default;
$yellow: #ffc40d !default;
$orange: #f89406 !default;
$pink: #c3325f !default;
$purple: #7a43b6 !default;
// Typography
$baseFontSize: 13px !default;
$baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$baseLineHeight: 18px !default;
$textColor: $grayDark !default;
// Buttons
$primaryButtonBackground: $linkColor !default;
// COMPONENT VARIABLES
// --------------------------------------------------
// Z-index master list
// Used for a bird's eye view of components dependent on the z-axis
// Try to avoid customizing these :)
$zindexDropdown: 1000;
$zindexPopover: 1010;
$zindexTooltip: 1020;
$zindexFixedNavbar: 1030;
$zindexModalBackdrop: 1040;
$zindexModal: 1050;
// Input placeholder text color
$placeholderText: $grayLight !default;
// HR border color
$hrBorder: $grayLighter !default;
// Navbar
$navbarHeight: 40px !default;
$navbarBackground: $grayDarker !default;
$navbarBackgroundHighlight: $grayDark !default;
$navbarLinkBackgroundHover: transparent !default;
$navbarText: $grayLight !default;
$navbarLinkColor: $grayLight !default;
$navbarLinkColorHover: $white !default;
// Form states and alerts
$warningText: #c09853 !default;
$warningBackground: #fcf8e3 !default;
$warningBorder: darken(adjust-hue($warningBackground, -10), 3%) !default;
$errorText: #b94a48 !default;
$errorBackground: #f2dede !default;
$errorBorder: darken(adjust-hue($errorBackground, -10), 3%) !default;
$successText: #468847 !default;
$successBackground: #dff0d8 !default;
$successBorder: darken(adjust-hue($successBackground, -10), 5%) !default;
$infoText: #3a87ad !default;
$infoBackground: #d9edf7 !default;
$infoBorder: darken(adjust-hue($infoBackground, -10), 7%) !default;
// GRID
// --------------------------------------------------
// Default 940px grid
$gridColumns: 12 !default;
$gridColumnWidth: 60px !default;
$gridGutterWidth: 20px !default;
$gridRowWidth: ($gridColumns * $gridColumnWidth) + ($gridGutterWidth * ($gridColumns - 1)) !default;
// Fluid grid
$fluidGridColumnWidth: 6.382978723% !default;
$fluidGridGutterWidth: 2.127659574% !default;

View File

@ -8,10 +8,10 @@
background-color: #f5f5f5;
border: 1px solid #eee;
border: 1px solid rgba(0,0,0,.05);
.border-radius(4px);
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
@include border-radius(4px);
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
blockquote {
border-color: #ddd;
border-color: rgba(0,0,0,.15);
}
}
}

View File

@ -1,174 +0,0 @@
.chart{
height: inherit;
width: inherit;
min-height: inherit;
min-width: inherit;
.tooltip_detail {
position: absolute;
z-index: 2;
border-radius: 3px;
padding: 0.25em;
font-size: 12px;
font-family: Arial, sans-serif;
color: white;
border: 1px solid rgba(0, 0, 0, 0.4);
margin-left: 1em;
margin-top: -1em;
white-space: nowrap;
background: rgba(0, 0, 0, 0.8);
}
.tooltip_detail:before {
content: "\25c2";
position: absolute;
left: -0.5em;
color: rgba(0, 0, 0, 0.7);
width: 0;
top: 12px;
}
}
@overview_chart_height: 81px;
.overview_chart{
width: 214px;
height: @overview_chart_height;
border: 1px ridge black;
padding: 8px 8px 8px 8px !important;
.chart_container {
width: 140px;
min-width: 140px;
.chart {
svg {
padding-right: 4px !important;
}
}
}
.bar_chart_container {
width: 74px;
min-width: 74px;
}
.bar_chart_container, .chart_container {
float: left;
min-height: @overview_chart_height;
height: @overview_chart_height;
.chart {
height: inherit;
width: inherit;
min-height: inherit;
min-width: inherit;
.modal-backdrop {
min-height: inherit;
min-width: inherit;
}
}
}
.tooltip_detail {
position: absolute;
z-index: 2;
border-radius: 3px;
padding: 0.25em;
font-size: 12px;
font-family: Arial, sans-serif;
color: white;
border: 1px solid rgba(0, 0, 0, 0.4);
margin-left: 1em;
margin-top: -1em;
white-space: nowrap;
background: rgba(0, 0, 0, 0.8);
}
.tooltip_detail:before {
content: "\25c2";
position: absolute;
left: -0.5em;
color: rgba(0, 0, 0, 0.7);
width: 0;
top: 12px;
}
}
@min_height_fullscreen_chart: 300px;
@min_width_fullscreen_chart: 400px;
@min_width_fullscreen_chart_legend: 90px;
.chart_container {
position: relative;
min-height: @min_height_fullscreen_chart;
min-width: @min_width_fullscreen_chart;
.chart {
position: relative;
min-height: @min_height_fullscreen_chart;
min-width: @min_width_fullscreen_chart;
.detail {
.x_label { display: none; }
.item { line-height: 1.4; padding: 0.5em; }
.date { color: #a0a0a0; }
}
.modal-backdrop {
position: absolute;
opacity: 0.5;
top: 0;
left: 0;
min-height: @min_height_fullscreen_chart;
min-width: @min_width_fullscreen_chart;
}
svg {
padding: 0 0 5px 0;
}
}
.detail_swatch {
float: right;
display: inline-block;
width: 10px;
height: 10px;
margin: 0 4px 0 0;
}
}
.legend_container {
min-width: @min_width_fullscreen_chart_legend;
margin-left: 20px;
.swatch {
float: right;
display: inline-block;
width: 10px;
height: 10px;
margin: 0 4px 0 0;
}
.modal-backdrop {
position: absolute;
opacity: 0.5;
top: 0;
left: 0;
min-width: 90px;
}
.rickshaw_legend.disabled {
padding: 0;
}
}
.spinner_wrapper {
position: absolute;
top: 40%;
left: 40%;
}
//small fix for rickshaw, for a better visual integration with Horizon
.rickshaw_legend {
background: white;
color: #404040;
.action {
text-decoration: none;
color: #000000;
}
}

View File

@ -1,43 +0,0 @@
/*---------------------------------------------------------------------------*/
/* Horizon Colors
/*---------------------------------------------------------------------------*/
@gray-darker : #222;
@gray-dark : #333;
@gray : #555;
@gray-light : #ccc;
@gray-lighter : #eee;
@brand-primary : #428bca;
@brand-success : #5cb85c;
@brand-info : #5bc0de;
@brand-warning : #f0ad4e;
@brand-danger : #d9534f;
//** Background color for `<body>`.
@body-bg : #fff;
//** Global text color on `<body>`.
@text-color : @gray-dark;
@link-color : @brand-primary;
@link-hover-color : darken(@link-color, 15%);
//** Global border color.
@border-color : #ddd;
/*---------------------------------------------------------------------------*/
/* Horizon Typography
/*---------------------------------------------------------------------------*/
@headings-color : @gray-dark;
/*---------------------------------------------------------------------------*/
/* Horizon Tables
/*---------------------------------------------------------------------------*/
@table-border-color : @border-color;
@table-bg-hover : #f5f5f5;
@table-bg-odd : #f9f9f9;

View File

@ -1,56 +1,42 @@
@accordionBorderColor: #e5e5e5;
.outline(@outline) {
outline: @outline;
-moz-outline-style: @outline;
}
$accordionBorderColor: #e5e5e5;
.nav_accordion {
background-color: #f9f9f9;
color: #6e6e6e;
margin: 0px 0px;
dt, dd {
padding: 10px 0 10px 0;
line-height: 18px;
h4 {
border: 1px solid #BBBBBB;
border: 1px solid #bbbbbb;
border-right: 0;
border-bottom: 0;
background-color: #f0f0f0;
background-repeat: no-repeat;
background-position: 96% center;
background-image: url(/static/dashboard/img/right_droparrow.png);
background-image: url("/static/dashboard/img/right_droparrow.png");
padding: 10px 0 10px 0;
line-height: 16px;
margin-top: 0;
color: #6e6e6e;
font-weight: bold;
text-rendering: optimizelegibility;
max-width: 193px;
padding-right: 16px;
cursor: pointer;
div {
color: #6e6e6e;
font-size: 14px;
margin: 0 0 0 14px;
display: block;
font-weight: bold;
.outline(none);
outline: none;
overflow: hidden;
text-overflow: ellipsis;
max-width: 177px;
}
}
max-width: 177px; } }
h4.active {
border-bottom: 1px solid #BBBBBB;
background-image: url(/static/dashboard/img/drop_arrow.png);
}
border-bottom: 1px solid #bbbbbb;
background-image: url("/static/dashboard/img/drop_arrow.png"); }
a {
color: #6e6e6e;
font-size: 16px;
@ -58,16 +44,12 @@
padding: 0;
display: block;
font-weight: bold;
.outline(none);
text-decoration: none;
}
outline: none;
text-decoration: none; }
ul {
list-style: none outside none;
margin: 10px 0 0;
width: 222px;
}
width: 222px; }
li {
a {
width: 185px;
@ -76,61 +58,41 @@
line-height: 18px;
margin-left: 20px;
font-weight: normal;
font-size: 13px;
}
font-size: 13px; }
a.active {
background: #fff;
border-top: 2px solid @accordionBorderColor;
background: white;
border-top: 2px solid $accordionBorderColor;
border-left: 4px solid #d93c27;
border-bottom: 2px solid @accordionBorderColor;
border-bottom: 2px solid $accordionBorderColor;
margin-left: 18px;
.border-radius(5px 0 0 5px);
}
border-radius: 5px 0 0 5px; }
a:last-child {
margin-bottom: 8px;
}
}
}
margin-bottom: 8px; } } }
dd {
padding: 0;
font-size: 12px;
}
font-size: 12px; }
dt {
border-top: 1px solid #BBBBBB;
background-color: @accordionBorderColor;
border-top: 1px solid #bbbbbb;
background-color: $accordionBorderColor;
background-repeat: no-repeat;
background-position: 96% center;
background-image: url(/static/dashboard/img/right_droparrow.png);
background-image: url("/static/dashboard/img/right_droparrow.png");
padding-right: 16px;
max-width: 217px;
cursor: pointer;
div {
color: #6e6e6e;
font-size: 14px;
margin: 0 0 0 14px;
padding: 0;
font-weight: bold;
.outline(none);
outline: none;
overflow: hidden;
text-overflow: ellipsis;
max-width: 201px;
}
}
max-width: 201px; } }
dt.active {
background-image: url(/static/dashboard/img/drop_arrow.png);
}
background-image: url("/static/dashboard/img/drop_arrow.png"); }
dt:first-child {
border-top: 0;
}
border-top: 0; }
dt a {
text-decoration: none;
}
}
text-decoration: none; } }

View File

@ -0,0 +1,26 @@
$gray-darker: #222222;
$gray-dark: #333333;
$gray: #555555;
$gray-light: #cccccc;
$gray-lighter: #eeeeee;
$brand-primary: #428bca;
$brand-success: #5cb85c;
$brand-info: #5bc0de;
$brand-warning: #f0ad4e;
$brand-danger: #d9534f;
$body-bg: white;
$text-color: $gray-dark;
$link-color: $brand-primary;
$link-hover-color: darken($link-color, 15%);
$border-color: #dddddd;
$headings-color: $gray-dark;
$table-border-color: $border-color;
$table-bg-hover: #f5f5f5;
$table-bg-odd: #f9f9f9;

View File

@ -0,0 +1,139 @@
.chart {
height: inherit;
width: inherit;
min-height: inherit;
min-width: inherit;
.tooltip_detail {
position: absolute;
z-index: 2;
border-radius: 3px;
padding: 0.25em;
font-size: 12px;
font-family: Arial, sans-serif;
color: white;
border: 1px solid rgba(0, 0, 0, 0.4);
margin-left: 1em;
margin-top: -1em;
white-space: nowrap;
background: rgba(0, 0, 0, 0.8); }
.tooltip_detail:before {
content: "\25c2";
position: absolute;
left: -0.5em;
color: rgba(0, 0, 0, 0.7);
width: 0;
top: 12px; } }
$overview_chart_height: 81px;
.overview_chart {
width: 214px;
height: $overview_chart_height;
border: 1px ridge black;
padding: 8px 8px 8px 8px !important;
.chart_container {
width: 140px;
min-width: 140px;
.chart svg {
padding-right: 4px !important; } }
.bar_chart_container {
width: 74px;
min-width: 74px; }
.bar_chart_container, .chart_container {
float: left;
min-height: $overview_chart_height;
height: $overview_chart_height;
.chart {
height: inherit;
width: inherit;
min-height: inherit;
min-width: inherit;
.modal-backdrop {
min-height: inherit;
min-width: inherit; } } }
.tooltip_detail {
position: absolute;
z-index: 2;
border-radius: 3px;
padding: 0.25em;
font-size: 12px;
font-family: Arial, sans-serif;
color: white;
border: 1px solid rgba(0, 0, 0, 0.4);
margin-left: 1em;
margin-top: -1em;
white-space: nowrap;
background: rgba(0, 0, 0, 0.8); }
.tooltip_detail:before {
content: "\25c2";
position: absolute;
left: -0.5em;
color: rgba(0, 0, 0, 0.7);
width: 0;
top: 12px; } }
$min_height_fullscreen_chart: 300px;
$min_width_fullscreen_chart: 400px;
$min_width_fullscreen_chart_legend: 90px;
.chart_container {
position: relative;
min-height: $min_height_fullscreen_chart;
min-width: $min_width_fullscreen_chart;
.chart {
position: relative;
min-height: $min_height_fullscreen_chart;
min-width: $min_width_fullscreen_chart;
.detail {
.x_label {
display: none; }
.item {
line-height: 1.4;
padding: 0.5em; }
.date {
color: #a0a0a0; } }
.modal-backdrop {
position: absolute;
opacity: 0.5;
top: 0;
left: 0;
min-height: $min_height_fullscreen_chart;
min-width: $min_width_fullscreen_chart; }
svg {
padding: 0 0 5px 0; } }
.detail_swatch {
float: right;
display: inline-block;
width: 10px;
height: 10px;
margin: 0 4px 0 0; } }
.legend_container {
min-width: $min_width_fullscreen_chart_legend;
margin-left: 20px;
.swatch {
float: right;
display: inline-block;
width: 10px;
height: 10px;
margin: 0 4px 0 0; }
.modal-backdrop {
position: absolute;
opacity: 0.5;
top: 0;
left: 0;
min-width: 90px; }
.rickshaw_legend.disabled {
padding: 0; } }
.spinner_wrapper {
position: absolute;
top: 40%;
left: 40%; }
.rickshaw_legend {
background: white;
color: #404040;
.action {
text-decoration: none;
color: black; } }

View File

@ -1,41 +1,33 @@
.workflow ul.nav-tabs {
padding: 0 10px;
}
padding: 0 10px; }
.workflow td.actions {
vertical-align: top;
width: 308px;
padding-right: 10px;
}
padding-right: 10px; }
.workflow td.help_text {
vertical-align: top;
width: 340px;
padding-left: 10px;
border-left: 1px solid #DDD;
}
border-left: 1px solid #dddddd; }
.workflow fieldset > table {
margin-bottom: 0;
}
margin-bottom: 0; }
.workflow.wizard {
.row-fluid .btn {
float: none;
margin: 0;
}
margin: 0; }
.row-fluid .next {
text-align: right;
}
text-align: right; }
.nav-tabs.wizard-tabs {
border-bottom: none;
background: #efefef;
padding: 0;
}
padding: 0; }
.nav-tabs.wizard-tabs li {
margin-bottom: 0;
position: relative;
}
position: relative; }
.nav-tabs.wizard-tabs li:before {
position: absolute;
top: 0;
@ -44,9 +36,8 @@
display: block;
border: 20px solid transparent;
border-right: 0;
border-left: 20px solid #ddd;
content:"";
}
border-left: 20px solid #dddddd;
content: ""; }
.nav-tabs.wizard-tabs li:after {
position: absolute;
top: -2px;
@ -55,34 +46,26 @@
display: block;
border: 22px solid transparent;
border-right: 0;
border-left: 22px solid #fff;
content:"";
}
border-left: 22px solid white;
content: ""; }
.nav-tabs.wizard-tabs li.active:before, .nav-tabs.wizard-tabs li.done:before {
border-left: 20px solid #007acc;
}
border-left: 20px solid #007acc; }
.nav-tabs.wizard-tabs li a {
border:none;
border: none;
border-radius: 0;
background: #ddd;
background: #dddddd;
color: #43a4d7;
padding: 0 15px;
padding-left: 35px;
line-height: 40px;
position: relative;
margin: 0;
}
margin: 0; }
.nav-tabs.wizard-tabs li:first-child a {
padding-left: 15px;
}
padding-left: 15px; }
.nav-tabs.wizard-tabs li.active a {
background: #007acc;
color:#fff;
}
color: white; }
.nav-tabs.wizard-tabs li.done a {
background: #007acc;
}
background: #007acc; }
label.error {
color:#f00;
}
}
color: red; } }

View File

@ -1,10 +1,10 @@
{% load compress %}
{% compress css %}
<link href='{{ STATIC_URL }}dashboard/less/horizon.less' type='text/less' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/less/rickshaw.css' type='text/css' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/less/horizon_charts.less' type='text/less' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/less/horizon_workflow.less' type='text/less' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/scss/horizon.scss' type='text/scss' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/css/rickshaw.css' type='text/css' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/scss/horizon_charts.scss' type='text/scss' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/scss/horizon_workflow.scss' type='text/scss' media='screen' rel='stylesheet' />
{% endcompress %}
<link rel="shortcut icon" href="{{ STATIC_URL }}dashboard/img/favicon.ico"/>

View File

@ -2,16 +2,17 @@
Django>=1.4,<1.7
django_compressor>=1.4
django_openstack_auth>=1.1.4
django_pyscss>=1.0.1
eventlet>=0.13.0
httplib2>=0.7.5
iso8601>=0.1.9
kombu>=2.4.8
lesscpy>=0.9j
# Horizon Utility Requirements
# for SECURE_KEY generation
lockfile>=0.8
netaddr>=0.7.6
pbr>=0.6,!=0.7,<1.0
pyscss>=1.2.0
python-ceilometerclient>=1.0.6
python-cinderclient>=1.0.6
python-glanceclient>=0.9.0