Skip to content

Commit

Permalink
Update TwitterBootstrap!
Browse files Browse the repository at this point in the history
  • Loading branch information
WaYdotNET committed Apr 2, 2013
1 parent cc4b048 commit 79a717d
Show file tree
Hide file tree
Showing 29 changed files with 579 additions and 302 deletions.
16 changes: 8 additions & 8 deletions padrino-admin/lib/padrino-admin/bootstrap-less/alerts.less
Expand Up @@ -10,7 +10,7 @@
padding: 8px 35px 8px 14px;
margin-bottom: @line-height-base;
color: @state-warning-text;
background-color: @state-warning-background;
background-color: @state-warning-bg;
border: 1px solid @state-warning-border;
border-radius: @border-radius-base;

Expand Down Expand Up @@ -45,7 +45,7 @@
// -------------------------

.alert-success {
background-color: @state-success-background;
background-color: @state-success-bg;
border-color: @state-success-border;
color: @state-success-text;
hr {
Expand All @@ -58,19 +58,19 @@
}
.alert-danger,
.alert-error {
background-color: @state-error-background;
border-color: @state-error-border;
color: @state-error-text;
background-color: @state-danger-bg;
border-color: @state-danger-border;
color: @state-danger-text;
hr {
border-top-color: darken(@state-error-border, 5%);
border-top-color: darken(@state-danger-border, 5%);
}
> a,
> p > a {
color: darken(@state-error-text, 10%);
color: darken(@state-danger-text, 10%);
}
}
.alert-info {
background-color: @state-info-background;
background-color: @state-info-bg;
border-color: @state-info-border;
color: @state-info-text;
hr {
Expand Down
2 changes: 1 addition & 1 deletion padrino-admin/lib/padrino-admin/bootstrap-less/badges.less
Expand Up @@ -48,7 +48,7 @@ a.badge {
}

// Account for counters in navs
.nav-list > .active > a > .badge,
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: @link-color;
background-color: #fff;
Expand Down
2 changes: 2 additions & 0 deletions padrino-admin/lib/padrino-admin/bootstrap-less/bootstrap.less
Expand Up @@ -30,6 +30,8 @@
@import "component-animations.less";
@import "glyphicons.less";
@import "dropdowns.less";
@import "list-group.less";
@import "panels.less";
@import "wells.less";
@import "close.less";

Expand Down
Expand Up @@ -18,6 +18,9 @@
padding: 0 5px;
color: #ccc;
}
&:last-child:after {
content: ""; // No divider after last element
}
}
> .active {
color: @grayLight;
Expand Down
Expand Up @@ -32,7 +32,7 @@

// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
.clear_float();
.clearfix();

.btn-group {
float: left;
Expand Down
14 changes: 7 additions & 7 deletions padrino-admin/lib/padrino-admin/bootstrap-less/buttons.less
Expand Up @@ -110,26 +110,26 @@ input[type="button"] {

.btn {
color: @btn-color;
.btn-pseudo-states(@btn-background, @btn-border);
.btn-pseudo-states(@btn-bg, @btn-border);
}
.btn-primary {
.btn-pseudo-states(@btn-background-primary, @btn-border-primary);
.btn-pseudo-states(@btn-primary-bg, @btn-primary-border);
}
// Warning appears as orange
.btn-warning {
.btn-pseudo-states(@btn-background-warning, @btn-border-warning);
.btn-pseudo-states(@btn-bg-warning, @btn-warning-border);
}
// Danger and error appear as red
.btn-danger {
.btn-pseudo-states(@btn-background-danger, @btn-border-danger);
.btn-pseudo-states(@btn-bg-danger, @btn-danger-border);
}
// Success appears as green
.btn-success {
.btn-pseudo-states(@btn-background-success, @btn-border-success);
.btn-pseudo-states(@btn-bg-success, @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.btn-pseudo-states(@btn-background-info, @btn-border-info);
.btn-pseudo-states(@btn-bg-info, @btn-info-border);
}


Expand Down Expand Up @@ -159,7 +159,7 @@ fieldset[disabled] .btn-link {
}
.btn-link:hover,
.btn-link:focus {
color: @link-color-hover;
color: @link-hover-color;
text-decoration: underline;
background-color: transparent;
}
Expand Down
3 changes: 3 additions & 0 deletions padrino-admin/lib/padrino-admin/bootstrap-less/carousel.less
Expand Up @@ -163,6 +163,9 @@
padding-bottom: 20px;
color: #fff;
text-shadow: 0 1px 2px rgba(0,0,0,.6);
& .btn {
text-shadow: none; // No shadow for button elements in carousel-caption
}
}


Expand Down
15 changes: 7 additions & 8 deletions padrino-admin/lib/padrino-admin/bootstrap-less/dropdowns.less
Expand Up @@ -45,7 +45,7 @@
padding: 5px 0;
margin: 2px 0 0; // override default ul
list-style: none;
background-color: @dropdown-background;
background-color: @dropdown-bg;
border: 1px solid #ccc; // IE8 fallback
border: 1px solid @dropdown-border;
border-radius: @border-radius-base;
Expand All @@ -71,7 +71,6 @@
font-weight: normal;
line-height: @line-height-base;
color: @dropdown-link-color;
white-space: nowrap;
}
}

Expand All @@ -82,19 +81,19 @@
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
text-decoration: none;
color: @dropdown-link-color-hover;
#gradient > .vertical(@dropdown-link-background-hover, darken(@dropdown-link-background-hover, 5%));
color: @dropdown-link-hover-color;
#gradient > .vertical(@dropdown-link-hover-bg, darken(@dropdown-link-hover-bg, 5%));
}

// Active state
// ------------
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: @dropdown-link-color-active;
color: @dropdown-link-active-color;
text-decoration: none;
outline: 0;
#gradient > .vertical(@dropdown-link-background-active, darken(@dropdown-link-background-active, 5%));
#gradient > .vertical(@dropdown-link-active-bg, darken(@dropdown-link-active-bg, 5%));
}

// Disabled state
Expand Down Expand Up @@ -186,12 +185,12 @@
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: darken(@dropdown-background, 20%);
border-left-color: darken(@dropdown-bg, 20%);
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: @dropdown-link-color-hover;
border-left-color: @dropdown-link-hover-color;
}

// Left aligned submenus
Expand Down
21 changes: 13 additions & 8 deletions padrino-admin/lib/padrino-admin/bootstrap-less/forms.less
Expand Up @@ -62,7 +62,7 @@ input[type="color"] {
line-height: @line-height-base;
color: @gray;
vertical-align: middle;
background-color: @input-background;
background-color: @input-bg;
border: 1px solid @input-border;
border-radius: @input-border-radius;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
Expand Down Expand Up @@ -286,7 +286,7 @@ textarea {
&[readonly],
fieldset[disabled] & {
cursor: not-allowed;
background-color: @input-background-disabled;
background-color: @input-bg-disabled;
}
}
// Explicitly reset the colors here
Expand All @@ -307,15 +307,15 @@ input[type="checkbox"] {

// Warning
.has-warning {
.formFieldState(@state-warning-text, @state-warning-text, @state-warning-background);
.formFieldState(@state-warning-text, @state-warning-text, @state-warning-bg);
}
// Error
.has-error {
.formFieldState(@state-error-text, @state-error-text, @state-error-background);
.formFieldState(@state-danger-text, @state-danger-text, @state-danger-bg);
}
// Success
.has-success {
.formFieldState(@state-success-text, @state-success-text, @state-success-background);
.formFieldState(@state-success-text, @state-success-text, @state-success-bg);
}

// HTML5 invalid states
Expand All @@ -341,9 +341,9 @@ select:focus:invalid {
padding: (@line-height-base - 1) 20px @line-height-base;
margin-top: @line-height-base;
margin-bottom: @line-height-base;
background-color: @form-actions-background;
background-color: @form-actions-bg;
border-top: 1px solid #e5e5e5;
.clear_float(); // Adding clearfix to allow for .pull-right button containers
.clearfix(); // Adding clearfix to allow for .pull-right button containers
}


Expand Down Expand Up @@ -517,7 +517,7 @@ select:focus:invalid {
.control-group {
position: relative;
margin-bottom: @line-height-base;
.clear_float();
.clearfix();

input,
select,
Expand All @@ -539,5 +539,10 @@ select:focus:invalid {
margin-left: @component-offset-horizontal;
}

// Make sure form actions buttons are aligned with controls
.form-actions {
padding-left: @component-offset-horizontal;
}

}
}
Expand Up @@ -10,7 +10,7 @@
font-weight: 200;
line-height: (@line-height-base * 1.5);
color: @jumbotron-lead-color;
background-color: @jumbotron-background;
background-color: @jumbotron-bg;
h1 {
line-height: 1;
color: @jumbotron-heading-color;
Expand Down
16 changes: 8 additions & 8 deletions padrino-admin/lib/padrino-admin/bootstrap-less/labels.less
Expand Up @@ -31,16 +31,16 @@ a.label {
// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
.label {
// Danger (red)
&-danger { background-color: @label-danger-background; }
&-danger[href] { background-color: darken(@label-danger-background, 10%); }
&-danger { background-color: @label-danger-bg; }
&-danger[href] { background-color: darken(@label-danger-bg, 10%); }
// Warnings (orange)
&-warning { background-color: @label-warning-background; }
&-warning[href] { background-color: darken(@label-warning-background, 10%); }
&-warning { background-color: @label-warning-bg; }
&-warning[href] { background-color: darken(@label-warning-bg, 10%); }
// Success (green)
&-success { background-color: @label-success-background; }
&-success[href] { background-color: darken(@label-success-background, 10%); }
&-success { background-color: @label-success-bg; }
&-success[href] { background-color: darken(@label-success-bg, 10%); }
// Info (turquoise)
&-info { background-color: @label-info-background; }
&-info[href] { background-color: darken(@label-info-background, 10%); }
&-info { background-color: @label-info-bg; }
&-info[href] { background-color: darken(@label-info-bg, 10%); }
}

96 changes: 96 additions & 0 deletions padrino-admin/lib/padrino-admin/bootstrap-less/list-group.less
@@ -0,0 +1,96 @@
//
// List groups
// --------------------------------------------------

// Base class
//
// Easily usable on <ul>, <ol>, or <div>.
.list-group {
// No need to set list-style: none; since .list-group-item is block level
margin: 0 0 20px; // reset all margins because ul and ol
background-color: @list-group-bg;
}

// Individual list items
// -------------------------

.list-group-item {
position: relative;
display: block;
padding: 10px 30px 10px 15px;
// Place the border on the list items and negative margin up for better styling
margin-bottom: -1px;
border: 1px solid @list-group-border;
}
// Round the first and last items
.list-group-item:first-child {
.border-top-radius(@border-radius-base);
}
.list-group-item:last-child {
margin-bottom: 0;
.border-bottom-radius(@border-radius-base);
}


// Custom content options
// -------------------------

.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}

// Linked list items
// -------------------------

// Custom content within linked items
a.list-group-item {
.list-group-item-heading {
color: #333;
}
.list-group-item-text {
color: #555;
}
}

// Hover state
a.list-group-item:hover,
a.list-group-item:focus {
text-decoration: none;
background-color: @list-group-hover-bg;
}

// Active class on item itself, not parent
a.list-group-item.active {
z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-text;
background-color: @list-group-active-bg;
border-color: @list-group-active-border;

// Force color to inherit for custom content
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: lighten(@list-group-active-bg, 40%);
}
}

// Chevrons and badges within list items
// -------------------------

.list-group-item > .badge,
.list-group-item > .glyphicon-chevron-right {
float: right;
margin-right: -15px;
}
.list-group-item > .glyphicon-chevron-right {
margin-right: -15px;
}
.list-group-item > .glyphicon + .badge {
margin-right: 5px;
}

0 comments on commit 79a717d

Please sign in to comment.