Skip to content

Commit

Permalink
(less) Merge branch 'master' into pr/11750
Browse files Browse the repository at this point in the history
Conflicts:
	dist/css/bootstrap.css
	dist/css/bootstrap.min.css
  • Loading branch information
mdo committed Dec 8, 2013
2 parents 2824428 + fff9e02 commit da186f4
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 21 deletions.
8 changes: 4 additions & 4 deletions buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
.btn-primary {
.button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
}
// Success appears as green
.btn-success {
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
// Warning appears as orange
.btn-warning {
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
Expand All @@ -64,10 +68,6 @@
.btn-danger {
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
// Success appears as green
.btn-success {
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
Expand Down
10 changes: 10 additions & 0 deletions code.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ code {
border-radius: @border-radius-base;
}

// User input typically entered via keyboard
kbd {
padding: 2px 4px;
font-size: 90%;
color: @kbd-color;
background-color: @kbd-bg;
border-radius: @border-radius-small;
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}

// Blocks of code
pre {
display: block;
Expand Down
27 changes: 24 additions & 3 deletions grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
// Grid system
// --------------------------------------------------

// Set the container width, and override it for fixed navbars in media queries

// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.

.container {
.container-fixed();

Expand All @@ -17,12 +21,30 @@
}
}

// mobile first defaults

// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.

.container-fluid {
.container-fixed();
}


// Row
//
// Rows contain and clear the floats of your columns.

.row {
.make-row();
}


// Columns
//
// Common styles for small and large grid columns

.make-grid-columns();


Expand Down Expand Up @@ -76,4 +98,3 @@
.make-grid(@grid-columns, lg, push);
.make-grid(@grid-columns, lg, offset);
}

26 changes: 24 additions & 2 deletions list-group.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
// 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-bottom: 20px;
padding-left: 0; // reset padding because ul and ol
}


// Individual list items
// -------------------------
//
// Use on `li`s or `div`s within the `.list-group` parent.

.list-group-item {
position: relative;
Expand Down Expand Up @@ -41,7 +45,12 @@
}
}


// Linked list items
//
// Use anchor elements instead of `li`s or `div`s to create linked list items.
// Includes an extra `.active` modifier class for showing selected items.

a.list-group-item {
color: @list-group-link-color;

Expand Down Expand Up @@ -75,8 +84,21 @@ a.list-group-item {
}
}


// Contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.

.list-group-item-variant(success; @state-success-bg; @state-success-text);
.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
.list-group-item-variant(info; @state-info-bg; @state-info-text);


// Custom content options
// -------------------------
//
// Extra classes for creating well-formatted content within `.list-group-item`s.

.list-group-item-heading {
margin-top: 0;
Expand Down
29 changes: 28 additions & 1 deletion mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,33 @@
}
}

// List Groups
// -------------------------
.list-group-item-variant(@state; @background; @color) {
.list-group-item-@{state} {
color: @color;
background-color: @background;
}
a.list-group-item-@{state} {
color: @color;

.list-group-item-heading { color: inherit; }

&:hover,
&:focus {
color: @color;
background-color: darken(@background, 5%);
}
&.active,
&.active:hover,
&.active:focus {
color: #fff;
background-color: @color;
border-color: @color;
}
}
}

// Button variants
// -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active,
Expand Down Expand Up @@ -475,7 +502,7 @@

.badge {
color: @background;
background-color: #fff;
background-color: @color;
}
}

Expand Down
22 changes: 13 additions & 9 deletions navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,17 @@
//
// When a container is present, change the behavior of the header and collapse.

.container > .navbar-header,
.container > .navbar-collapse {
margin-right: -@navbar-padding-horizontal;
margin-left: -@navbar-padding-horizontal;

@media (min-width: @grid-float-breakpoint) {
margin-right: 0;
margin-left: 0;
.container,
.container-fluid {
> .navbar-header,
> .navbar-collapse {
margin-right: -@navbar-padding-horizontal;
margin-left: -@navbar-padding-horizontal;

@media (min-width: @grid-float-breakpoint) {
margin-right: 0;
margin-left: 0;
}
}
}

Expand Down Expand Up @@ -159,7 +162,8 @@
}

@media (min-width: @grid-float-breakpoint) {
.navbar > .container & {
.navbar > .container &,
.navbar > .container-fluid & {
margin-left: -@navbar-padding-horizontal;
}
}
Expand Down
3 changes: 2 additions & 1 deletion tables.less
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ table {
// Generate the contextual variants
.table-row-variant(active; @table-bg-active);
.table-row-variant(success; @state-success-bg);
.table-row-variant(danger; @state-danger-bg);
.table-row-variant(warning; @state-warning-bg);
.table-row-variant(danger; @state-danger-bg);
.table-row-variant(info; @state-info-bg);


// Responsive tables
Expand Down
1 change: 1 addition & 0 deletions type.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ cite { font-style: normal; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }


// Page header
Expand Down
5 changes: 4 additions & 1 deletion variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@

// Navbar toggle
@navbar-default-toggle-hover-bg: #ddd;
@navbar-default-toggle-icon-bar-bg: #ccc;
@navbar-default-toggle-icon-bar-bg: #888;
@navbar-default-toggle-border-color: #ddd;


Expand Down Expand Up @@ -602,6 +602,9 @@
@code-color: #c7254e;
@code-bg: #f9f2f4;

@kbd-color: #fff;
@kbd-bg: #333;

@pre-bg: #f5f5f5;
@pre-color: @gray-dark;
@pre-border-color: #ccc;
Expand Down

0 comments on commit da186f4

Please sign in to comment.