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 %} {% load compress %}
{% compress css %} {% 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 %} {% endcompress %}
{% endblock %} {% endblock %}
The custom stylesheets then reside in the dashboard's own ``static`` folder The custom stylesheets then reside in the dashboard's own ``static`` folder
``openstack_dashboard/dashboards/my_custom_dashboard/static/ ``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:: All dashboard's templates have to inherit from dashboard's base.html::

View File

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

View File

@ -180,4 +180,4 @@
cursor: pointer; cursor: pointer;
width: 16px; width: 16px;
height: 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 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * 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 // For phone and tablet devices
// ------------------------------------------------------------- // -------------------------------------------------------------
@ -17,8 +18,8 @@
// ------------------------- // -------------------------
// Required since we compile the responsive stuff separately // Required since we compile the responsive stuff separately
@import "variables.less"; // Modify this for custom colors, font-sizes, etc @import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less"; @import "bootstrap/mixins";
// RESPONSIVE CLASSES // RESPONSIVE CLASSES
@ -46,14 +47,11 @@
// Block level the page header small tag for readability // Block level the page header small tag for readability
.page-header h1 small { .page-header h1 small {
display: block; display: block;
line-height: @baseLineHeight; line-height: $baseLineHeight;
} }
// Make span* classes full width // Make span* classes full width
input[class*="span"], input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
display: block; display: block;
width: 100%; width: 100%;
min-height: 28px; /* Make inputs at least the height of their button counterpart */ min-height: 28px; /* Make inputs at least the height of their button counterpart */
@ -64,14 +62,12 @@
box-sizing: border-box; /* CSS3 spec*/ box-sizing: border-box; /* CSS3 spec*/
} }
// But don't let it screw up prepend/append inputs // But don't let it screw up prepend/append inputs
.input-prepend input[class*="span"], .input-prepend input[class*="span"], .input-append input[class*="span"] {
.input-append input[class*="span"] {
width: auto; width: auto;
} }
// Update checkboxes for iOS // Update checkboxes for iOS
input[type="checkbox"], input[type="checkbox"], input[type="radio"] {
input[type="radio"] {
border: 1px solid #ccc; border: 1px solid #ccc;
} }
@ -140,8 +136,7 @@
margin-left: 0; margin-left: 0;
} }
// Make all columns even // Make all columns even
.row > [class*="span"], .row > [class*="span"], .row-fluid > [class*="span"] {
.row-fluid > [class*="span"] {
float: none; float: none;
display: block; display: block;
width: auto; width: auto;
@ -157,13 +152,13 @@
@media (min-width: 768px) and (max-width: 979px) { @media (min-width: 768px) and (max-width: 979px) {
// Fixed grid // Fixed grid
#gridSystem > .generate(12, 42px, 20px); @include gridSystemGenerate(12, 42px, 20px);
// Fluid grid // Fluid grid
#fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%); @include fluidGridSystemGenerate(12, 5.801104972%, 2.762430939%);
// Input grid // Input grid
#inputGridSystem > .generate(12, 42px, 20px); @include inputGridSystemGenerate(12, 42px, 20px);
} }
@ -182,7 +177,7 @@
// Unfix the navbar // Unfix the navbar
.navbar-fixed-top { .navbar-fixed-top {
position: static; position: static;
margin-bottom: @baseLineHeight; margin-bottom: $baseLineHeight;
} }
.navbar-fixed-top .navbar-inner { .navbar-fixed-top .navbar-inner {
padding: 5px; padding: 5px;
@ -204,7 +199,7 @@
// Block-level the nav // Block-level the nav
.navbar .nav { .navbar .nav {
float: none; float: none;
margin: 0 0 (@baseLineHeight / 2); margin: 0 0 ($baseLineHeight / 2);
} }
.navbar .nav > li { .navbar .nav > li {
float: none; float: none;
@ -216,23 +211,21 @@
display: none; display: none;
} }
.navbar .nav .nav-header { .navbar .nav .nav-header {
color: @navbarText; color: $navbarText;
text-shadow: none; text-shadow: none;
} }
// Nav and dropdown links in navbar // Nav and dropdown links in navbar
.navbar .nav > li > a, .navbar .nav > li > a, .navbar .dropdown-menu a {
.navbar .dropdown-menu a {
padding: 6px 15px; padding: 6px 15px;
font-weight: bold; font-weight: bold;
color: @navbarLinkColor; color: $navbarLinkColor;
.border-radius(3px); @include border-radius(3px);
} }
.navbar .dropdown-menu li + li a { .navbar .dropdown-menu li + li a {
margin-bottom: 2px; margin-bottom: 2px;
} }
.navbar .nav > li > a:hover, .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover {
.navbar .dropdown-menu a:hover { background-color: $navbarBackground;
background-color: @navbarBackground;
} }
// Dropdowns in the navbar // Dropdowns in the navbar
.navbar .dropdown-menu { .navbar .dropdown-menu {
@ -246,26 +239,24 @@
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
border: none; border: none;
.border-radius(0); @include border-radius(0);
.box-shadow(none); @include box-shadow(none);
} }
.navbar .dropdown-menu:before, .navbar .dropdown-menu:before, .navbar .dropdown-menu:after {
.navbar .dropdown-menu:after {
display: none; display: none;
} }
.navbar .dropdown-menu .divider { .navbar .dropdown-menu .divider {
display: none; display: none;
} }
// Forms in navbar // Forms in navbar
.navbar-form, .navbar-form, .navbar-search {
.navbar-search {
float: none; float: none;
padding: (@baseLineHeight / 2) 15px; padding: ($baseLineHeight / 2) 15px;
margin: (@baseLineHeight / 2) 0; margin: ($baseLineHeight / 2) 0;
border-top: 1px solid @navbarBackground; border-top: 1px solid $navbarBackground;
border-bottom: 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); $shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow); @include box-shadow($shadow);
} }
// Pull right (secondary) nav content // Pull right (secondary) nav content
.navbar .nav.pull-right { .navbar .nav.pull-right {
@ -308,13 +299,13 @@
@media (min-width: 1200px) { @media (min-width: 1200px) {
// Fixed grid // Fixed grid
#gridSystem > .generate(12, 70px, 30px); @include gridSystemGenerate(12, 70px, 30px);
// Fluid grid // Fluid grid
#fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%); @include fluidGridSystemGenerate(12, 5.982905983%, 2.564102564%);
// Input grid // Input grid
#inputGridSystem > .generate(12, 70px, 30px); @include inputGridSystemGenerate(12, 70px, 30px);
// Thumbnails // Thumbnails
.thumbnails { .thumbnails {
@ -324,4 +315,4 @@
margin-left: 30px; 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 // Parent container
.accordion { .accordion {
margin-bottom: @baseLineHeight; margin-bottom: $baseLineHeight;
} }
// Group == heading + body // Group == heading + body
.accordion-group { .accordion-group {
margin-bottom: 2px; margin-bottom: 2px;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
.border-radius(4px); @include border-radius(4px);
} }
.accordion-heading { .accordion-heading {
border-bottom: 0; border-bottom: 0;
@ -25,4 +25,4 @@
.accordion-inner { .accordion-inner {
padding: 9px 15px; padding: 9px 15px;
border-top: 1px solid #e5e5e5; 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 // Make the div behave like a button
.btn-group { .btn-group {
position: relative; position: relative;
.clearfix(); // clears the floated buttons @include clearfix(); // clears the floated buttons
.ie7-restore-left-whitespace(); @include ie7-restore-left-whitespace();
} }
// Space out series of button groups // Space out series of button groups
@ -16,11 +16,11 @@
// Optional: Group multiple button groups together for a toolbar // Optional: Group multiple button groups together for a toolbar
.btn-toolbar { .btn-toolbar {
margin-top: @baseLineHeight / 2; margin-top: $baseLineHeight / 2;
margin-bottom: @baseLineHeight / 2; margin-bottom: $baseLineHeight / 2;
.btn-group { .btn-group {
display: inline-block; display: inline-block;
.ie7-inline-block(); @include ie7-inline-block();
} }
} }
@ -29,7 +29,7 @@
position: relative; position: relative;
float: left; float: left;
margin-left: -1px; 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 // 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 { .btn-group .btn:first-child {
@ -41,8 +41,7 @@
-moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
} }
.btn-group .btn:last-child, .btn-group .btn:last-child, .btn-group .dropdown-toggle {
.btn-group .dropdown-toggle {
-webkit-border-top-right-radius: 4px; -webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px; -moz-border-radius-topright: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
@ -60,8 +59,7 @@
-moz-border-radius-bottomleft: 6px; -moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px; border-bottom-left-radius: 6px;
} }
.btn-group .btn.large:last-child, .btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
.btn-group .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px; -webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px; -moz-border-radius-topright: 6px;
border-top-right-radius: 6px; border-top-right-radius: 6px;
@ -71,16 +69,12 @@
} }
// On hover/focus/active, bring the proper btn to front // On hover/focus/active, bring the proper btn to front
.btn-group .btn:hover, .btn-group .btn:hover, .btn-group .btn:focus, .btn-group .btn:active, .btn-group .btn.active {
.btn-group .btn:focus,
.btn-group .btn:active,
.btn-group .btn.active {
z-index: 2; z-index: 2;
} }
// On active and open, don't show outline // On active and open, don't show outline
.btn-group .dropdown-toggle:active, .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
.btn-group.open .dropdown-toggle {
outline: 0; outline: 0;
} }
@ -93,8 +87,8 @@
.btn-group .dropdown-toggle { .btn-group .dropdown-toggle {
padding-left: 8px; padding-left: 8px;
padding-right: 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); $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); @include box-shadow($shadow);
*padding-top: 5px; *padding-top: 5px;
*padding-bottom: 5px; *padding-bottom: 5px;
} }
@ -102,19 +96,19 @@
.btn-group.open { .btn-group.open {
// IE7's z-index only goes to the nearest positioned ancestor, which would // 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 // 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 // Reposition menu on open and round all corners
.dropdown-menu { .dropdown-menu {
display: block; display: block;
margin-top: 1px; margin-top: 1px;
.border-radius(5px); @include border-radius(5px);
} }
.dropdown-toggle { .dropdown-toggle {
background-image: none; background-image: none;
@shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); $shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow); @include box-shadow($shadow);
} }
} }
@ -123,21 +117,16 @@
margin-top: 7px; margin-top: 7px;
margin-left: 0; margin-left: 0;
} }
.btn:hover .caret, .btn:hover .caret, .open.btn-group .caret {
.open.btn-group .caret { @include opacity(1);
.opacity(100);
} }
// Account for other colors // Account for other colors
.btn-primary, .btn-primary, .btn-danger, .btn-info, .btn-success, .btn-inverse {
.btn-danger,
.btn-info,
.btn-success,
.btn-inverse {
.caret { .caret {
border-top-color: @white; border-top-color: $white;
.opacity(75); @include opacity(0.75);
} }
} }
@ -145,4 +134,3 @@
.btn-small .caret { .btn-small .caret {
margin-top: 4px; margin-top: 4px;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,8 +9,7 @@
// The caret makes the toggle a bit too tall in IE7 // The caret makes the toggle a bit too tall in IE7
*margin-bottom: -3px; *margin-bottom: -3px;
} }
.dropdown-toggle:active, .dropdown-toggle:active, .open .dropdown-toggle {
.open .dropdown-toggle {
outline: 0; outline: 0;
} }
// Dropdown arrow/caret // Dropdown arrow/caret
@ -25,24 +24,23 @@
vertical-align: top; vertical-align: top;
border-left: 4px solid transparent; border-left: 4px solid transparent;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-top: 4px solid @black; border-top: 4px solid $black;
.opacity(30); @include opacity(0.3);
content: "\2193"; content: "\2193";
} }
.dropdown .caret { .dropdown .caret {
margin-top: 8px; margin-top: 8px;
margin-left: 2px; margin-left: 2px;
} }
.dropdown:hover .caret, .dropdown:hover .caret, .open.dropdown .caret {
.open.dropdown .caret { @include opacity(1);
.opacity(100);
} }
// The dropdown menu (ul) // The dropdown menu (ul)
.dropdown-menu { .dropdown-menu {
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 0; left: 0;
z-index: @zindexDropdown; z-index: $zindexDropdown;
float: left; float: left;
display: none; // none by default, but block on "open" of the menu display: none; // none by default, but block on "open" of the menu
min-width: 160px; min-width: 160px;
@ -50,13 +48,13 @@
padding: 4px 0; padding: 4px 0;
margin: 0; // override default ul margin: 0; // override default ul
list-style: none; list-style: none;
background-color: @white; background-color: $white;
border-color: #ccc; border-color: #ccc;
border-color: rgba(0,0,0,.2); border-color: rgba(0,0,0,.2);
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
.border-radius(0 0 5px 5px); @include border-radius(0 0 5px 5px);
.box-shadow(0 5px 10px rgba(0,0,0,.2)); @include box-shadow(0 5px 10px rgba(0,0,0,.2));
-webkit-background-clip: padding-box; -webkit-background-clip: padding-box;
-moz-background-clip: padding; -moz-background-clip: padding;
background-clip: padding-box; background-clip: padding-box;
@ -76,7 +74,7 @@
margin: 5px 1px; margin: 5px 1px;
overflow: hidden; overflow: hidden;
background-color: #e5e5e5; 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 // IE7 needs a set width since we gave a height. Restricting just
// to IE7 to keep the 1px left/right space in other browsers. // to IE7 to keep the 1px left/right space in other browsers.
@ -92,29 +90,27 @@
padding: 3px 15px; padding: 3px 15px;
clear: both; clear: both;
font-weight: normal; font-weight: normal;
line-height: @baseLineHeight; line-height: $baseLineHeight;
color: @gray; color: $gray;
word-wrap: break-word; white-space: nowrap;
} }
} }
// Hover state // Hover state
.dropdown-menu li > a:hover, .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
.dropdown-menu .active > a, color: $white;
.dropdown-menu .active > a:hover {
color: @white;
text-decoration: none; text-decoration: none;
background-color: @linkColor; background-color: $linkColor;
} }
// Open state for the dropdown // Open state for the dropdown
.dropdown.open { .dropdown.open {
// IE7's z-index only goes to the nearest positioned ancestor, which would // 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 // make the menu appear below buttons that appeared later on the page
*z-index: @zindexDropdown; *z-index: $zindexDropdown;
.dropdown-toggle { .dropdown-toggle {
color: @white; color: $white;
background: #ccc; background: #ccc;
background: rgba(0,0,0,.3); background: rgba(0,0,0,.3);
} }
@ -126,5 +122,5 @@
// Typeahead // Typeahead
.typeahead { .typeahead {
margin-top: 2px; // give it some space to breathe 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 // Make all forms have space below them
form { form {
margin: 0 0 @baseLineHeight; margin: 0 0 $baseLineHeight;
} }
fieldset { fieldset {
@ -22,57 +22,48 @@ legend {
display: block; display: block;
width: 100%; width: 100%;
padding: 0; padding: 0;
margin-bottom: @baseLineHeight * 1.5; margin-bottom: $baseLineHeight * 1.5;
font-size: @baseFontSize * 1.5; font-size: $baseFontSize * 1.5;
line-height: @baseLineHeight * 2; line-height: $baseLineHeight * 2;
color: @grayDark; color: $grayDark;
border: 0; border: 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
// Small // Small
small { small {
font-size: @baseLineHeight * .75; font-size: $baseLineHeight * .75;
color: @grayLight; color: $grayLight;
} }
} }
// Set font for forms // Set font for forms
label, label, input, button, select, textarea {
input, @include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
button,
select,
textarea {
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
} }
input,
button, input, button, select, textarea {
select, @include font-family-sans-serif(); // And only set font-family here for those that need it (note the missing label element)
textarea {
#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 // Identify controls by their labels
label { label {
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
color: @grayDark; color: $grayDark;
} }
// Inputs, Textareas, Selects // Inputs, Textareas, Selects
input, input, textarea, select, .uneditable-input {
textarea,
select,
.uneditable-input {
display: inline-block; display: inline-block;
width: 210px; width: 210px;
height: @baseLineHeight; height: $baseLineHeight;
padding: 4px; padding: 4px;
margin-bottom: 9px; margin-bottom: 9px;
font-size: @baseFontSize; font-size: $baseFontSize;
line-height: @baseLineHeight; line-height: $baseLineHeight;
color: @gray; color: $gray;
border: 1px solid #ccc; border: 1px solid #ccc;
.border-radius(3px); @include border-radius(3px);
} }
.uneditable-textarea { .uneditable-textarea {
width: auto; width: auto;
@ -80,16 +71,12 @@ select,
} }
// Inputs within a label // Inputs within a label
label input, label input, label textarea, label select {
label textarea,
label select {
display: block; display: block;
} }
// Mini reset for unique input types // Mini reset for unique input types
input[type="image"], input[type="image"], input[type="checkbox"], input[type="radio"] {
input[type="checkbox"],
input[type="radio"] {
width: auto; width: auto;
height: auto; height: auto;
padding: 0; padding: 0;
@ -97,7 +84,7 @@ input[type="radio"] {
*margin-top: 0; /* IE7 */ *margin-top: 0; /* IE7 */
line-height: normal; line-height: normal;
cursor: pointer; cursor: pointer;
.border-radius(0); @include border-radius(0);
border: 0 \9; /* IE9 and down */ border: 0 \9; /* IE9 and down */
} }
input[type="image"] { input[type="image"] {
@ -110,22 +97,19 @@ input[type="file"] {
padding: initial; padding: initial;
line-height: initial; line-height: initial;
border: initial; border: initial;
background-color: @white; background-color: $white;
background-color: initial; background-color: initial;
.box-shadow(none); @include box-shadow(none);
} }
// Help out input buttons // Help out input buttons
input[type="button"], input[type="button"], input[type="reset"], input[type="submit"] {
input[type="reset"],
input[type="submit"] {
width: auto; width: auto;
height: auto; height: auto;
} }
// Set the height of select and file controls to match text inputs // Set the height of select and file controls to match text inputs
select, select, input[type="file"] {
input[type="file"] {
height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ 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 */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
line-height: 28px; line-height: 28px;
@ -139,18 +123,17 @@ input[type="file"] {
// Chrome on Linux and Mobile Safari need background-color // Chrome on Linux and Mobile Safari need background-color
select { select {
width: 220px; // default input width + 10px of padding that doesn't get applied 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 // Make multiple select elements height not fixed
select[multiple], select[multiple], select[size] {
select[size] {
height: auto; height: auto;
} }
// Remove shadow from image inputs // Remove shadow from image inputs
input[type="image"] { input[type="image"] {
.box-shadow(none); @include box-shadow(none);
} }
// Make textarea height behave // Make textarea height behave
@ -169,33 +152,28 @@ input[type="hidden"] {
// ------------------- // -------------------
// Indent the labels to position radios/checkboxes as hanging // Indent the labels to position radios/checkboxes as hanging
.radio, .radio, .checkbox {
.checkbox {
padding-left: 18px; padding-left: 18px;
} }
.radio input[type="radio"], .radio input[type="radio"], .checkbox input[type="checkbox"] {
.checkbox input[type="checkbox"] {
float: left; float: left;
margin-left: -18px; margin-left: -18px;
} }
// Move the options list down to align with labels // Move the options list down to align with labels
.controls > .radio:first-child, .controls > .radio:first-child, .controls > .checkbox:first-child {
.controls > .checkbox:first-child {
padding-top: 5px; // has to be padding because margin collaspes padding-top: 5px; // has to be padding because margin collaspes
} }
// Radios and checkboxes on same line // Radios and checkboxes on same line
// TODO v3: Convert .inline to .control-inline // TODO v3: Convert .inline to .control-inline
.radio.inline, .radio.inline, .checkbox.inline {
.checkbox.inline {
display: inline-block; display: inline-block;
padding-top: 5px; padding-top: 5px;
margin-bottom: 0; margin-bottom: 0;
vertical-align: middle; vertical-align: middle;
} }
.radio.inline + .radio.inline, .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
.checkbox.inline + .checkbox.inline {
margin-left: 10px; // space out consecutive inline controls margin-left: 10px; // space out consecutive inline controls
} }
@ -204,26 +182,21 @@ input[type="hidden"] {
// FOCUS STATE // FOCUS STATE
// ----------- // -----------
input, input, textarea {
textarea { @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); $transition: border linear .2s, box-shadow linear .2s;
@transition: border linear .2s, box-shadow linear .2s; @include transition($transition);
.transition(@transition);
} }
input:focus, input:focus, textarea:focus {
textarea:focus {
border-color: rgba(82,168,236,.8); 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); $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
.box-shadow(@shadow); @include box-shadow($shadow);
outline: 0; outline: 0;
outline: thin dotted \9; /* IE6-9 */ outline: thin dotted \9; /* IE6-9 */
} }
input[type="file"]:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, select:focus {
input[type="radio"]:focus, @include box-shadow(none); // override for file inputs
input[type="checkbox"]:focus, @include tab-focus();
select:focus {
.box-shadow(none); // override for file inputs
.tab-focus();
} }
@ -240,10 +213,7 @@ select:focus {
.input-xxlarge { width: 530px; } .input-xxlarge { width: 530px; }
// Grid style input sizes // Grid style input sizes
input[class*="span"], input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
float: none; float: none;
margin-left: 0; margin-left: 0;
} }
@ -253,7 +223,7 @@ textarea[class*="span"],
// GRID SIZING FOR INPUTS // 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 // Disabled and read-only inputs
input[disabled], input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
background-color: #f5f5f5; background-color: #f5f5f5;
border-color: #ddd; border-color: #ddd;
cursor: not-allowed; cursor: not-allowed;
@ -281,27 +246,25 @@ textarea[readonly] {
// Warning // Warning
.control-group.warning { .control-group.warning {
.formFieldState(@warningText, @warningText, @warningBackground); @include formFieldState($warningText, $warningText, $warningBackground);
} }
// Error // Error
.control-group.error { .control-group.error {
.formFieldState(@errorText, @errorText, @errorBackground); @include formFieldState($errorText, $errorText, $errorBackground);
} }
// Success // Success
.control-group.success { .control-group.success {
.formFieldState(@successText, @successText, @successBackground); @include formFieldState($successText, $successText, $successBackground);
} }
// HTML5 invalid states // HTML5 invalid states
// Shares styles with the .control-group.error above // Shares styles with the .control-group.error above
input:focus:required:invalid, input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
textarea:focus:required:invalid,
select:focus:required:invalid {
color: #b94a48; color: #b94a48;
border-color: #ee5f5b; border-color: #ee5f5b;
&:focus { &:focus {
border-color: darken(#ee5f5b, 10%); 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 { .form-actions {
padding: (@baseLineHeight - 1) 20px @baseLineHeight; padding: ($baseLineHeight - 1) 20px $baseLineHeight;
margin-top: @baseLineHeight; margin-top: $baseLineHeight;
margin-bottom: @baseLineHeight; margin-bottom: $baseLineHeight;
background-color: #f5f5f5; background-color: #f5f5f5;
border-top: 1px solid #ddd; 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 // For text that needs to appear as an input but should not be an input
.uneditable-input { .uneditable-input {
display: block; display: block;
background-color: @white; background-color: $white;
border-color: #eee; 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; cursor: not-allowed;
} }
// Placeholder text gets special styles; can't be bundled together though for some reason // 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 display: block; // account for any element using help-block
margin-top: 5px; margin-top: 5px;
margin-bottom: 0; margin-bottom: 0;
color: @grayLight; color: $grayLight;
} }
.help-inline { .help-inline {
display: inline-block; display: inline-block;
.ie7-inline-block(); @include ie7-inline-block();
margin-bottom: 9px; margin-bottom: 9px;
vertical-align: middle; vertical-align: middle;
padding-left: 5px; 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 // Allow us to put symbols and text within the input field for a cleaner look
.input-prepend, .input-prepend, .input-append {
.input-append {
margin-bottom: 5px; margin-bottom: 5px;
.clearfix(); // Clear the float to prevent wrapping @include clearfix(); // Clear the float to prevent wrapping
input, input, .uneditable-input {
.uneditable-input { @include border-radius(0 3px 3px 0);
.border-radius(0 3px 3px 0);
&:focus { &:focus {
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
} }
.uneditable-input { .uneditable-input {
border-left-color: #ccc; border-left-color: #eee;
border-right-color: #ccc;
} }
.add-on { .add-on {
float: left; float: left;
display: block; display: block;
width: auto; width: auto;
min-width: 16px; min-width: 16px;
height: @baseLineHeight; height: $baseLineHeight;
margin-right: -1px; margin-right: -1px;
padding: 4px 5px; padding: 4px 5px;
font-weight: normal; font-weight: normal;
line-height: @baseLineHeight; line-height: $baseLineHeight;
color: @grayLight; color: $grayLight;
text-align: center; text-align: center;
text-shadow: 0 1px 0 @white; text-shadow: 0 1px 0 $white;
background-color: #f5f5f5; background-color: #f5f5f5;
border: 1px solid #ccc; border: 1px solid #ccc;
.border-radius(3px 0 0 3px); @include border-radius(3px 0 0 3px);
} }
.active { .active {
background-color: lighten(@green, 30); background-color: lighten($green, 30);
border-color: @green; border-color: $green;
} }
} }
.input-prepend { .input-prepend {
@ -399,19 +361,17 @@ select:focus:required:invalid {
} }
} }
.input-append { .input-append {
input, input, .uneditable-input {
.uneditable-input {
float: left; float: left;
.border-radius(3px 0 0 3px); @include border-radius(3px 0 0 3px);
} }
.uneditable-input { .uneditable-input {
border-left-color: #eee; border-right-color: #ccc;
border-right-color: #ccc;
} }
.add-on { .add-on {
margin-right: 0; margin-right: 0;
margin-left: -1px; margin-left: -1px;
.border-radius(0 3px 3px 0); @include border-radius(0 3px 3px 0);
} }
input:first-child { input:first-child {
// In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input // 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-left: 14px;
padding-right: 14px; padding-right: 14px;
margin-bottom: 0; // remove the default margin on all inputs 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 // Common properties
// ----------------- // -----------------
.form-search, .form-search, .form-inline, .form-horizontal {
.form-inline, input, textarea, select, .help-inline, .uneditable-input {
.form-horizontal {
input,
textarea,
select,
.help-inline,
.uneditable-input {
display: inline-block; display: inline-block;
margin-bottom: 0; margin-bottom: 0;
} }
// Re-hide hidden elements due to specifity // Re-hide elemnts due to specifity
.hide { .hide { display: none; }
display: none;
}
} }
.form-search label, .form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
.form-inline label,
.form-search .input-append,
.form-inline .input-append,
.form-search .input-prepend,
.form-inline .input-prepend {
display: inline-block; display: inline-block;
} }
// Make the prepend and append add-on vertical-align: middle; // Make the prepend and append add-on vertical-align: middle;
.form-search .input-append .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-inline .input-prepend .add-on,
.form-search .input-append .add-on,
.form-inline .input-prepend .add-on {
vertical-align: middle; vertical-align: middle;
} }
// Inline checkbox/radio labels // Inline checkbox/radio labels
.form-search .radio, .form-search .radio, .form-inline .radio, .form-search .checkbox, .form-inline .checkbox {
.form-inline .radio,
.form-search .checkbox,
.form-inline .checkbox {
margin-bottom: 0; margin-bottom: 0;
vertical-align: middle; vertical-align: middle;
} }
// Margin to space out fieldsets // Margin to space out fieldsets
.control-group { .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 { legend + .control-group {
margin-top: @baseLineHeight; margin-top: $baseLineHeight;
-webkit-margin-top-collapse: separate; -webkit-margin-top-collapse: separate;
} }
@ -501,8 +442,8 @@ legend + .control-group {
.form-horizontal { .form-horizontal {
// Increase spacing between groups // Increase spacing between groups
.control-group { .control-group {
margin-bottom: @baseLineHeight; margin-bottom: $baseLineHeight;
.clearfix(); @include clearfix();
} }
// Float the labels left // Float the labels left
.control-label { .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; padding: 60px;
margin-bottom: 30px; margin-bottom: 30px;
background-color: #f5f5f5; background-color: #f5f5f5;
.border-radius(6px); @include border-radius(6px);
h1 { h1 {
margin-bottom: 0; margin-bottom: 0;
font-size: 60px; font-size: 60px;
@ -15,6 +15,6 @@
p { p {
font-size: 18px; font-size: 18px;
font-weight: 200; 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 (centered, fixed-width layouts)
.container { .container {
.container-fixed(); @include container-fixed();
} }
// Fluid layouts (left aligned, with sidebar, min- & max-width content) // Fluid layouts (left aligned, with sidebar, min- & max-width content)
.container-fluid { .container-fluid {
padding-left: @gridGutterWidth; padding-left: $gridGutterWidth;
padding-right: @gridGutterWidth; padding-right: $gridGutterWidth;
.clearfix(); @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 // Recalculate z-index where appropriate
.modal-open { .modal-open {
.dropdown-menu { z-index: @zindexDropdown + @zindexModal; } .dropdown-menu { z-index: $zindexDropdown + $zindexModal; }
.dropdown.open { *z-index: @zindexDropdown + @zindexModal; } .dropdown.open { *z-index: $zindexDropdown + $zindexModal; }
.popover { z-index: @zindexPopover + @zindexModal; } .popover { z-index: $zindexPopover + $zindexModal; }
.tooltip { z-index: @zindexTooltip + @zindexModal; } .tooltip { z-index: $zindexTooltip + $zindexModal; }
} }
// Background // Background
@ -16,15 +16,14 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: @zindexModalBackdrop; z-index: $zindexModalBackdrop;
background-color: @black; background-color: $black;
// Fade for backdrop // Fade for backdrop
&.fade { opacity: 0; } &.fade { opacity: 0; }
} }
.modal-backdrop, .modal-backdrop, .modal-backdrop.fade.in {
.modal-backdrop.fade.in { @include opacity(0.8);
.opacity(80);
} }
// Base modal // Base modal
@ -32,20 +31,21 @@
position: fixed; position: fixed;
top: 50%; top: 50%;
left: 50%; left: 50%;
z-index: @zindexModal; z-index: $zindexModal;
max-height: 500px; max-height: 500px;
overflow: auto; overflow: auto;
width: 560px; width: 560px;
margin: -250px 0 0 -280px; margin: -250px 0 0 -280px;
background-color: @white; background-color: $white;
border: 1px solid #999; border: 1px solid #999;
border: 1px solid rgba(0,0,0,.3); border: 1px solid rgba(0,0,0,.3);
*border: 1px solid #999; /* IE6-7 */ *border: 1px solid #999; /* IE6-7 */
.border-radius(6px); @include border-radius(6px);
.box-shadow(0 3px 7px rgba(0,0,0,0.3)); @include box-shadow(0 3px 7px rgba(0,0,0,0.3));
.background-clip(padding-box); @include background-clip(padding-box);
&.fade { &.fade {
.transition(e('opacity .3s linear, top .3s ease-out')); $transition: opacity .3s linear, top .3s ease-out;
@include transition($transition);
top: -25%; top: -25%;
} }
&.fade.in { top: 50%; } &.fade.in { top: 50%; }
@ -57,7 +57,7 @@
.close { margin-top: 2px; } .close { margin-top: 2px; }
} }
// Body (where all modal content resises) // Body (where all modal content resides)
.modal-body { .modal-body {
padding: 15px; padding: 15px;
} }
@ -72,9 +72,9 @@
margin-bottom: 0; margin-bottom: 0;
background-color: #f5f5f5; background-color: #f5f5f5;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
.border-radius(0 0 6px 6px); @include border-radius(0 0 6px 6px);
.box-shadow(inset 0 1px 0 @white); @include box-shadow(inset 0 1px 0 $white);
.clearfix(); @include clearfix();
.btn { .btn {
float: right; float: right;
margin-left: 5px; margin-left: 5px;

View File

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

View File

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

View File

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

View File

@ -33,29 +33,29 @@
overflow: hidden; overflow: hidden;
height: 18px; height: 18px;
margin-bottom: 18px; margin-bottom: 18px;
#gradient > .vertical(#f5f5f5, #f9f9f9); @include gradient-vertical(#f5f5f5, #f9f9f9);
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); @include box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
.border-radius(4px); @include border-radius(4px);
} }
// Bar of progress // Bar of progress
.progress .bar { .progress .bar {
width: 0%; width: 0%;
height: 18px; height: 18px;
color: @white; color: $white;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25); text-shadow: 0 -1px 0 rgba(0,0,0,.25);
#gradient > .vertical(#149bdf, #0480be); @include gradient-vertical(#149bdf, #0480be);
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); @include box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.box-sizing(border-box); @include box-sizing(border-box);
.transition(width .6s ease); @include transition(width .6s ease);
} }
// Striped bars // Striped bars
.progress-striped .bar { .progress-striped .bar {
#gradient > .striped(#62c462); @include gradient-striped(#62c462);
.background-size(40px 40px); @include background-size(40px 40px);
} }
// Call animation for the active one // Call animation for the active one
@ -72,24 +72,24 @@
// Danger (red) // Danger (red)
.progress-danger .bar { .progress-danger .bar {
#gradient > .vertical(#ee5f5b, #c43c35); @include gradient-vertical(#ee5f5b, #c43c35);
} }
.progress-danger.progress-striped .bar { .progress-danger.progress-striped .bar {
#gradient > .striped(#ee5f5b); @include gradient-striped(#ee5f5b);
} }
// Success (green) // Success (green)
.progress-success .bar { .progress-success .bar {
#gradient > .vertical(#62c462, #57a957); @include gradient-vertical(#62c462, #57a957);
} }
.progress-success.progress-striped .bar { .progress-success.progress-striped .bar {
#gradient > .striped(#62c462); @include gradient-striped(#62c462);
} }
// Info (teal) // Info (teal)
.progress-info .bar { .progress-info .bar {
#gradient > .vertical(#5bc0de, #339bb9); @include gradient-vertical(#5bc0de, #339bb9);
} }
.progress-info.progress-striped .bar { .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 // Adapted from Normalize.css http://github.com/necolas/normalize.css
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Display in IE6-9 and FF3 // Display in IE6-9 and FF3
// ------------------------- // -------------------------
article, article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
display: block; display: block;
} }
// Display block in IE6-9 and FF3 // Display block in IE6-9 and FF3
// ------------------------- // -------------------------
audio, audio, canvas, video {
canvas,
video {
display: inline-block; display: inline-block;
*display: inline; *display: inline;
*zoom: 1; *zoom: 1;
@ -46,19 +35,17 @@ html {
} }
// Focus states // Focus states
a:focus { a:focus {
.tab-focus(); @include tab-focus();
} }
// Hover & Active // Hover & Active
a:hover, a:hover, a:active {
a:active {
outline: 0; outline: 0;
} }
// Prevents sub and sup affecting line-height in all browsers // Prevents sub and sup affecting line-height in all browsers
// ------------------------- // -------------------------
sub, sub, sup {
sup {
position: relative; position: relative;
font-size: 75%; font-size: 75%;
line-height: 0; line-height: 0;
@ -85,28 +72,20 @@ img {
// ------------------------- // -------------------------
// Font size in all browsers, margin changes, misc consistency // Font size in all browsers, margin changes, misc consistency
button, button, input, select, textarea {
input,
select,
textarea {
margin: 0; margin: 0;
font-size: 100%; font-size: 100%;
vertical-align: middle; vertical-align: middle;
} }
button, button, input {
input {
*overflow: visible; // Inner spacing ie IE6/7 *overflow: visible; // Inner spacing ie IE6/7
line-height: normal; // FF3/4 have !important on line-height in UA stylesheet line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
} }
button::-moz-focus-inner, button::-moz-focus-inner, input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
padding: 0; padding: 0;
border: 0; border: 0;
} }
button, button, input[type="button"], input[type="reset"], input[type="submit"] {
input[type="button"],
input[type="reset"],
input[type="submit"] {
cursor: pointer; // Cursors on all buttons applied consistently cursor: pointer; // Cursors on all buttons applied consistently
-webkit-appearance: button; // Style clickable inputs in iOS -webkit-appearance: button; // Style clickable inputs in iOS
} }
@ -123,4 +102,4 @@ input[type="search"]::-webkit-search-cancel-button {
textarea { textarea {
overflow: auto; // Remove vertical scrollbar in IE6-9 overflow: auto; // Remove vertical scrollbar in IE6-9
vertical-align: top; // Readability and alignment cross-browser vertical-align: top; // Readability and alignment cross-browser
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,4 +20,4 @@
// Visibility // Visibility
.invisible { .invisible {
visibility: hidden; visibility: hidden;
} }

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; background-color: #f5f5f5;
border: 1px solid #eee; border: 1px solid #eee;
border: 1px solid rgba(0,0,0,.05); border: 1px solid rgba(0,0,0,.05);
.border-radius(4px); @include border-radius(4px);
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
blockquote { blockquote {
border-color: #ddd; border-color: #ddd;
border-color: rgba(0,0,0,.15); 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; $accordionBorderColor: #e5e5e5;
.outline(@outline) {
outline: @outline;
-moz-outline-style: @outline;
}
.nav_accordion { .nav_accordion {
background-color: #f9f9f9; background-color: #f9f9f9;
color: #6e6e6e; color: #6e6e6e;
margin: 0px 0px; margin: 0px 0px;
dt, dd { dt, dd {
padding: 10px 0 10px 0; padding: 10px 0 10px 0;
line-height: 18px; line-height: 18px;
h4 { h4 {
border: 1px solid #BBBBBB; border: 1px solid #bbbbbb;
border-right: 0; border-right: 0;
border-bottom: 0; border-bottom: 0;
background-color: #f0f0f0; background-color: #f0f0f0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 96% center; 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; padding: 10px 0 10px 0;
line-height: 16px; line-height: 16px;
margin-top: 0; margin-top: 0;
color: #6e6e6e; color: #6e6e6e;
font-weight: bold; font-weight: bold;
text-rendering: optimizelegibility; text-rendering: optimizelegibility;
max-width: 193px; max-width: 193px;
padding-right: 16px; padding-right: 16px;
cursor: pointer; cursor: pointer;
div { div {
color: #6e6e6e; color: #6e6e6e;
font-size: 14px; font-size: 14px;
margin: 0 0 0 14px; margin: 0 0 0 14px;
display: block; display: block;
font-weight: bold; font-weight: bold;
.outline(none); outline: none;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 177px; max-width: 177px; } }
}
}
h4.active { h4.active {
border-bottom: 1px solid #BBBBBB; border-bottom: 1px solid #bbbbbb;
background-image: url(/static/dashboard/img/drop_arrow.png); background-image: url("/static/dashboard/img/drop_arrow.png"); }
}
a { a {
color: #6e6e6e; color: #6e6e6e;
font-size: 16px; font-size: 16px;
@ -58,16 +44,12 @@
padding: 0; padding: 0;
display: block; display: block;
font-weight: bold; font-weight: bold;
.outline(none); outline: none;
text-decoration: none; text-decoration: none; }
}
ul { ul {
list-style: none outside none; list-style: none outside none;
margin: 10px 0 0; margin: 10px 0 0;
width: 222px; width: 222px; }
}
li { li {
a { a {
width: 185px; width: 185px;
@ -76,61 +58,41 @@
line-height: 18px; line-height: 18px;
margin-left: 20px; margin-left: 20px;
font-weight: normal; font-weight: normal;
font-size: 13px; font-size: 13px; }
}
a.active { a.active {
background: #fff; background: white;
border-top: 2px solid @accordionBorderColor; border-top: 2px solid $accordionBorderColor;
border-left: 4px solid #d93c27; border-left: 4px solid #d93c27;
border-bottom: 2px solid @accordionBorderColor; border-bottom: 2px solid $accordionBorderColor;
margin-left: 18px; margin-left: 18px;
.border-radius(5px 0 0 5px); border-radius: 5px 0 0 5px; }
}
a:last-child { a:last-child {
margin-bottom: 8px; margin-bottom: 8px; } } }
}
}
}
dd { dd {
padding: 0; padding: 0;
font-size: 12px; font-size: 12px; }
}
dt { dt {
border-top: 1px solid #BBBBBB; border-top: 1px solid #bbbbbb;
background-color: @accordionBorderColor; background-color: $accordionBorderColor;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 96% center; 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; padding-right: 16px;
max-width: 217px; max-width: 217px;
cursor: pointer; cursor: pointer;
div { div {
color: #6e6e6e; color: #6e6e6e;
font-size: 14px; font-size: 14px;
margin: 0 0 0 14px; margin: 0 0 0 14px;
padding: 0; padding: 0;
font-weight: bold; font-weight: bold;
.outline(none); outline: none;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 201px; max-width: 201px; } }
}
}
dt.active { dt.active {
background-image: url(/static/dashboard/img/drop_arrow.png); background-image: url("/static/dashboard/img/drop_arrow.png"); }
}
dt:first-child { dt:first-child {
border-top: 0; border-top: 0; }
}
dt a { 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 { .workflow ul.nav-tabs {
padding: 0 10px; padding: 0 10px; }
}
.workflow td.actions { .workflow td.actions {
vertical-align: top; vertical-align: top;
width: 308px; width: 308px;
padding-right: 10px; padding-right: 10px; }
}
.workflow td.help_text { .workflow td.help_text {
vertical-align: top; vertical-align: top;
width: 340px; width: 340px;
padding-left: 10px; padding-left: 10px;
border-left: 1px solid #DDD; border-left: 1px solid #dddddd; }
}
.workflow fieldset > table { .workflow fieldset > table {
margin-bottom: 0; margin-bottom: 0; }
}
.workflow.wizard { .workflow.wizard {
.row-fluid .btn { .row-fluid .btn {
float: none; float: none;
margin: 0; margin: 0; }
}
.row-fluid .next { .row-fluid .next {
text-align: right; text-align: right; }
}
.nav-tabs.wizard-tabs { .nav-tabs.wizard-tabs {
border-bottom: none; border-bottom: none;
background: #efefef; background: #efefef;
padding: 0; padding: 0; }
}
.nav-tabs.wizard-tabs li { .nav-tabs.wizard-tabs li {
margin-bottom: 0; margin-bottom: 0;
position: relative; position: relative; }
}
.nav-tabs.wizard-tabs li:before { .nav-tabs.wizard-tabs li:before {
position: absolute; position: absolute;
top: 0; top: 0;
@ -44,9 +36,8 @@
display: block; display: block;
border: 20px solid transparent; border: 20px solid transparent;
border-right: 0; border-right: 0;
border-left: 20px solid #ddd; border-left: 20px solid #dddddd;
content:""; content: ""; }
}
.nav-tabs.wizard-tabs li:after { .nav-tabs.wizard-tabs li:after {
position: absolute; position: absolute;
top: -2px; top: -2px;
@ -55,34 +46,26 @@
display: block; display: block;
border: 22px solid transparent; border: 22px solid transparent;
border-right: 0; border-right: 0;
border-left: 22px solid #fff; border-left: 22px solid white;
content:""; content: ""; }
}
.nav-tabs.wizard-tabs li.active:before, .nav-tabs.wizard-tabs li.done:before { .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 { .nav-tabs.wizard-tabs li a {
border:none; border: none;
border-radius: 0; border-radius: 0;
background: #ddd; background: #dddddd;
color: #43a4d7; color: #43a4d7;
padding: 0 15px; padding: 0 15px;
padding-left: 35px; padding-left: 35px;
line-height: 40px; line-height: 40px;
position: relative; position: relative;
margin: 0; margin: 0; }
}
.nav-tabs.wizard-tabs li:first-child a { .nav-tabs.wizard-tabs li:first-child a {
padding-left: 15px; padding-left: 15px; }
}
.nav-tabs.wizard-tabs li.active a { .nav-tabs.wizard-tabs li.active a {
background: #007acc; background: #007acc;
color:#fff; color: white; }
}
.nav-tabs.wizard-tabs li.done a { .nav-tabs.wizard-tabs li.done a {
background: #007acc; background: #007acc; }
}
label.error { label.error {
color:#f00; color: red; } }
}
}

View File

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

View File

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