Update to latest Bootstrap 3 (RC2)

This commit is contained in:
Ben Word
2013-08-13 22:55:47 -05:00
44 changed files with 1521 additions and 867 deletions

File diff suppressed because one or more lines are too long

View File

@@ -56,7 +56,9 @@
var $parent = this.$element.closest('[data-toggle="buttons"]') var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input').prop('checked', !this.$element.hasClass('active')) var $input = this.$element.find('input')
.prop('checked', !this.$element.hasClass('active'))
.trigger('change')
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
} }
@@ -72,7 +74,7 @@
$.fn.button = function (option) { $.fn.button = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('button') var data = $this.data('bs.button')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options))) if (!data) $this.data('bs.button', (data = new Button(this, options)))

View File

@@ -41,6 +41,7 @@
Carousel.DEFAULTS = { Carousel.DEFAULTS = {
interval: 5000 interval: 5000
, pause: 'hover' , pause: 'hover'
, wrap: true
} }
Carousel.prototype.cycle = function (e) { Carousel.prototype.cycle = function (e) {
@@ -105,12 +106,15 @@
var fallback = type == 'next' ? 'first' : 'last' var fallback = type == 'next' ? 'first' : 'last'
var that = this var that = this
if (!$next.length) {
if (!this.options.wrap) return
$next = this.$element.find('.item')[fallback]()
}
this.sliding = true this.sliding = true
isCycling && this.pause() isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
if ($next.hasClass('active')) return if ($next.hasClass('active')) return

View File

@@ -48,7 +48,7 @@
this.$element.trigger(startEvent) this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return if (startEvent.isDefaultPrevented()) return
var actives = this.$parent && this.$parent.find('> .accordion-group > .in') var actives = this.$parent && this.$parent.find('> .panel > .in')
if (actives && actives.length) { if (actives && actives.length) {
var hasData = actives.data('bs.collapse') var hasData = actives.data('bs.collapse')
@@ -169,7 +169,7 @@
var $parent = parent && $(parent) var $parent = parent && $(parent)
if (!data || !data.transitioning) { if (!data || !data.transitioning) {
if ($parent) $parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed') if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
} }

View File

@@ -29,7 +29,7 @@
this.$backdrop = this.$backdrop =
this.isShown = null this.isShown = null
if (this.options.remote) this.$element.find('.modal-body').load(this.options.remote) if (this.options.remote) this.$element.load(this.options.remote)
} }
Modal.DEFAULTS = { Modal.DEFAULTS = {
@@ -38,13 +38,13 @@
, show: true , show: true
} }
Modal.prototype.toggle = function () { Modal.prototype.toggle = function (_relatedTarget) {
return this[!this.isShown ? 'show' : 'hide']() return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
} }
Modal.prototype.show = function () { Modal.prototype.show = function (_relatedTarget) {
var that = this var that = this
var e = $.Event('show.bs.modal') var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e) this.$element.trigger(e)
@@ -73,13 +73,15 @@
that.enforceFocus() that.enforceFocus()
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
transition ? transition ?
that.$element that.$element
.one($.support.transition.end, function () { .one($.support.transition.end, function () {
that.$element.focus().trigger('shown.bs.modal') that.$element.focus().trigger(e)
}) })
.emulateTransitionEnd(300) : .emulateTransitionEnd(300) :
that.$element.focus().trigger('shown.bs.modal') that.$element.focus().trigger(e)
}) })
} }
@@ -101,6 +103,7 @@
this.$element this.$element
.removeClass('in') .removeClass('in')
.attr('aria-hidden', true) .attr('aria-hidden', true)
.off('click.dismiss.modal')
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$element this.$element
@@ -153,7 +156,7 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body) .appendTo(document.body)
this.$element.on('click', $.proxy(function (e) { this.$element.on('click.dismiss.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return if (e.target !== e.currentTarget) return
this.options.backdrop == 'static' this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0]) ? this.$element[0].focus.call(this.$element[0])
@@ -192,15 +195,15 @@
var old = $.fn.modal var old = $.fn.modal
$.fn.modal = function (option) { $.fn.modal = function (option, _relatedTarget) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.modal') var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options))) if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option](_relatedTarget)
else if (options.show) data.show() else if (options.show) data.show(_relatedTarget)
}) })
} }
@@ -223,19 +226,19 @@
var $this = $(this) var $this = $(this)
var href = $this.attr('href') var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data()) var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault() e.preventDefault()
$target $target
.modal(option) .modal(option, this)
.one('hide', function () { .one('hide', function () {
$this.is(':visible') && $this.focus() $this.is(':visible') && $this.focus()
}) })
}) })
var $body = $(document.body) $(document)
.on('shown.bs.modal', '.modal', function () { $body.addClass('modal-open') }) .on('shown.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
.on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') }) .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
}(window.jQuery); }(window.jQuery);

View File

@@ -58,7 +58,9 @@
$tip.removeClass('fade top bottom left right in') $tip.removeClass('fade top bottom left right in')
$tip.find('.popover-title:empty').hide() // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
// this manually by checking the contents.
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
} }
Popover.prototype.hasContent = function () { Popover.prototype.hasContent = function () {
@@ -75,15 +77,15 @@
o.content) o.content)
} }
Popover.prototype.arrow = function () {
return this.$arrow = this.$arrow || this.tip().find('.arrow')
}
Popover.prototype.tip = function () { Popover.prototype.tip = function () {
if (!this.$tip) this.$tip = $(this.options.template) if (!this.$tip) this.$tip = $(this.options.template)
return this.$tip return this.$tip
} }
Popover.prototype.destroy = function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
// POPOVER PLUGIN DEFINITION // POPOVER PLUGIN DEFINITION
// ========================= // =========================

View File

@@ -1,6 +1,6 @@
/* ======================================================================== /* ========================================================================
* Bootstrap: tooltip.js v3.0.0 * Bootstrap: tooltip.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#affix * http://twbs.github.com/bootstrap/javascript.html#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
* ======================================================================== * ========================================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
@@ -64,7 +64,7 @@
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
} }
} }
@@ -91,16 +91,20 @@
return options return options
} }
Tooltip.prototype.enter = function (obj) { Tooltip.prototype.getDelegateOptions = function () {
var defaults = this.getDefaults()
var options = {} var options = {}
var defaults = this.getDefaults()
this._options && $.each(this._options, function (key, value) { this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value if (defaults[key] != value) options[key] = value
}) })
return options
}
Tooltip.prototype.enter = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](options).data('bs.' + this.type) obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
clearTimeout(self.timeout) clearTimeout(self.timeout)
@@ -114,7 +118,7 @@
Tooltip.prototype.leave = function (obj) { Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this._options).data('bs.' + this.type) obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
clearTimeout(self.timeout) clearTimeout(self.timeout)
@@ -179,12 +183,9 @@
.addClass(placement) .addClass(placement)
} }
var tp = placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
this.applyPlacement(tp, placement) this.applyPlacement(calculatedOffset, placement)
this.$element.trigger('shown.bs.' + this.type) this.$element.trigger('shown.bs.' + this.type)
} }
} }
@@ -196,25 +197,33 @@
var height = $tip[0].offsetHeight var height = $tip[0].offsetHeight
// manually read margins because getBoundingClientRect includes difference // manually read margins because getBoundingClientRect includes difference
offset.top = offset.top + parseInt($tip.css('margin-top'), 10) var marginTop = parseInt($tip.css('margin-top'), 10)
offset.left = offset.left + parseInt($tip.css('margin-left'), 10) var marginLeft = parseInt($tip.css('margin-left'), 10)
// we must check for NaN for ie 8/9
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft
$tip $tip
.offset(offset) .offset(offset)
.addClass('in') .addClass('in')
// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) { if (placement == 'top' && actualHeight != height) {
replace = true replace = true
offset.top = offset.top + height - actualHeight offset.top = offset.top + height - actualHeight
} }
if (placement == 'bottom' || placement == 'top') { if (/bottom|top/.test(placement)) {
var delta = 0 var delta = 0
if (offset.left < 0){ if (offset.left < 0) {
delta = offset.left * -2 delta = offset.left * -2
offset.left = 0 offset.left = 0
@@ -249,6 +258,8 @@
var $tip = this.tip() var $tip = this.tip()
var e = $.Event('hide.bs.' + this.type) var e = $.Event('hide.bs.' + this.type)
function complete() { $tip.detach() }
this.$element.trigger(e) this.$element.trigger(e)
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
@@ -257,9 +268,9 @@
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip $tip
.one($.support.transition.end, $tip.detach) .one($.support.transition.end, complete)
.emulateTransitionEnd(150) : .emulateTransitionEnd(150) :
$tip.detach() complete()
this.$element.trigger('hidden.bs.' + this.type) this.$element.trigger('hidden.bs.' + this.type)
@@ -285,6 +296,13 @@
}, this.$element.offset()) }, this.$element.offset())
} }
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
Tooltip.prototype.getTitle = function () { Tooltip.prototype.getTitle = function () {
var title var title
var $e = this.$element var $e = this.$element
@@ -300,8 +318,8 @@
return this.$tip = this.$tip || $(this.options.template) return this.$tip = this.$tip || $(this.options.template)
} }
Tooltip.prototype.arrow =function(){ Tooltip.prototype.arrow = function () {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
} }
Tooltip.prototype.validate = function () { Tooltip.prototype.validate = function () {
@@ -325,7 +343,7 @@
} }
Tooltip.prototype.toggle = function (e) { Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
} }

View File

@@ -43,8 +43,8 @@
// http://blog.alexmaccaw.com/css-transitions // http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) { $.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this var called = false, $el = this
$(this).one('webkitTransitionEnd', function () { called = true }) $(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger('webkitTransitionEnd') } var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration) setTimeout(callback, duration)
return this return this
} }

File diff suppressed because one or more lines are too long

View File

@@ -34,9 +34,9 @@ body { }
.main { } .main { }
/* Gallery Shortcode */ /* Gallery Shortcode */
.row.gallery-row { padding: 15px 0; } .gallery-row { padding: 15px 0; }
/* ========================================================================== /* ==========================================================================
@@ -83,6 +83,8 @@ figure.alignnone { margin-left: 0; margin-right: 0; }
Media Queries Media Queries
========================================================================== */ ========================================================================== */
@media (max-width: 767px) { @media (min-width: 768px) { }
} @media (min-width: 992px) { }
@media (min-width: 1200px) { }

View File

@@ -1,31 +0,0 @@
//
// Accordion
// --------------------------------------------------
// Parent container
.accordion {
margin-bottom: @line-height-computed;
}
// Group == heading + body
.accordion-group {
margin-bottom: 2px;
border: 1px solid @accordion-border-color;
border-radius: @border-radius-base;
}
.accordion-heading {
border-bottom: 0;
.accordion-toggle {
display: block;
padding: 8px 15px;
cursor: pointer;
}
}
// Inner needs the styles because you can't animate properly with any styles on the element
.accordion-inner {
padding: 9px 15px;
border-top: 1px solid @accordion-border-color;
}

View File

@@ -7,7 +7,7 @@
// ------------------------- // -------------------------
.alert { .alert {
padding: 10px 35px 10px 15px; padding: @alert-padding;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
color: @alert-text; color: @alert-text;
background-color: @alert-bg; background-color: @alert-bg;
@@ -26,10 +26,27 @@
} }
// Provide class for links that match alerts // Provide class for links that match alerts
.alert-link { .alert-link {
font-weight: 500; font-weight: @alert-link-font-weight;
color: darken(@alert-text, 10%); color: darken(@alert-text, 10%);
} }
// Improve alignment and spacing of inner content
> p,
> ul {
margin-bottom: 0;
}
> p + p {
margin-top: 5px;
}
}
// Dismissable alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissable {
padding-right: (@alert-padding + 20);
// Adjust close link position // Adjust close link position
.close { .close {
position: relative; position: relative;
@@ -40,30 +57,15 @@
} }
// Alternate styles // Alternate styles
// ------------------------- //
// Generate contextual modifier classes for colorizing the alert.
.alert-success { .alert-success {
.alert-variant(@alert-success-bg, @alert-success-border, @alert-success-text); .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
} }
.alert-danger { .alert-danger {
.alert-variant(@alert-danger-bg, @alert-danger-border, @alert-danger-text); .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
} }
.alert-info { .alert-info {
.alert-variant(@alert-info-bg, @alert-info-border, @alert-info-text); .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
}
// Block alerts
// -------------------------
.alert-block {
padding-top: 15px;
padding-bottom: 15px;
> p,
> ul {
margin-bottom: 0;
}
p + p {
margin-top: 5px;
}
} }

View File

@@ -9,16 +9,16 @@
min-width: 10px; min-width: 10px;
padding: 3px 7px; padding: 3px 7px;
font-size: @font-size-small; font-size: @font-size-small;
font-weight: bold; font-weight: @badge-font-weight;
color: @badge-color; color: @badge-color;
line-height: 1; line-height: @badge-line-height;
vertical-align: middle; vertical-align: baseline;
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
background-color: @badge-bg; background-color: @badge-bg;
border-radius: 10px; border-radius: @badge-border-radius;
// Empty labels/badges collapse // Empty badges collapse automatically (not available in IE8)
&:empty { &:empty {
display: none; display: none;
} }

View File

@@ -55,7 +55,6 @@
@import "labels.less"; @import "labels.less";
@import "badges.less"; @import "badges.less";
@import "progress-bars.less"; @import "progress-bars.less";
@import "accordion.less";
@import "carousel.less"; @import "carousel.less";
@import "jumbotron.less"; @import "jumbotron.less";

View File

@@ -3,11 +3,32 @@
// -------------------------------------------------- // --------------------------------------------------
// Button carets // Button carets
.btn .caret { //
border-top-color: @btn-default-color; // Match the button text color to the arrow/caret for indicating dropdown-ness.
.caret {
.btn-default & {
border-top-color: @btn-default-color;
}
.btn-primary &,
.btn-success &,
.btn-warning &,
.btn-danger &,
.btn-info & {
border-top-color: #fff;
}
} }
.dropup .btn .caret { .dropup .caret {
border-bottom-color: @btn-default-color; .btn-default & {
border-bottom-color: @btn-default-color;
}
.btn-primary &,
.btn-success &,
.btn-warning &,
.btn-danger &,
.btn-info & {
border-bottom-color: #fff;
}
} }
// Make the div behave like a button // Make the div behave like a button
@@ -21,15 +42,26 @@
float: left; float: left;
// Bring the "active" button to the front // Bring the "active" button to the front
&:hover, &:hover,
&:active { &:focus,
&:active,
&.active {
z-index: 2; z-index: 2;
} }
&:focus {
// Remove focus outline when dropdown JS adds it after closing the menu
outline: none;
}
} }
} }
// Prevent double borders when buttons are next to each other // Prevent double borders when buttons are next to each other
.btn-group .btn + .btn { .btn-group {
margin-left: -1px; .btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -1px;
}
} }
// Optional: Group multiple button groups together for a toolbar // Optional: Group multiple button groups together for a toolbar
@@ -90,6 +122,14 @@
} }
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-xs > .btn { .btn-xs(); }
.btn-group-sm > .btn { .btn-sm(); }
.btn-group-lg > .btn { .btn-lg(); }
// Split button dropdowns // Split button dropdowns
// ---------------------- // ----------------------
@@ -99,7 +139,7 @@
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
} }
.btn-group > .btn-large + .dropdown-toggle { .btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
} }
@@ -116,38 +156,70 @@
margin-left: 0; margin-left: 0;
} }
// Carets in other button sizes // Carets in other button sizes
.btn-large .caret { .btn-lg .caret {
border-width: 5px; border-width: @caret-width-large;
} }
// Upside down carets for .dropup // Upside down carets for .dropup
.dropup .btn-large .caret { .dropup .btn-lg .caret {
border-bottom-width: 5px; border-bottom-width: @caret-width-large;
} }
// Vertical button groups // Vertical button groups
// ---------------------- // ----------------------
.btn-group-vertical > .btn { .btn-group-vertical {
display: block; > .btn,
float: none; > .btn-group {
width: 100%; display: block;
max-width: 100%; float: none;
+ .btn { width: 100%;
max-width: 100%;
}
// Clear floats so dropdown menus can be properly placed
> .btn-group {
.clearfix();
> .btn {
float: none;
}
}
> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
margin-top: -1px; margin-top: -1px;
margin-left: 0;
} }
} }
.btn-group-vertical .btn {
.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) { &:not(:first-child):not(:last-child) {
border-radius: 0; border-radius: 0;
} }
&:first-child { &:first-child:not(:last-child) {
border-top-right-radius: @border-radius-base;
.border-bottom-radius(0); .border-bottom-radius(0);
} }
&:last-child { &:last-child:not(:first-child) {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0); .border-top-radius(0);
} }
} }
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child {
> .btn:last-child,
> .dropdown-toggle {
.border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child > .btn:first-child {
.border-top-radius(0);
}
// Justified button groups // Justified button groups
@@ -156,6 +228,7 @@
.btn-group-justified { .btn-group-justified {
display: table; display: table;
width: 100%; width: 100%;
table-layout: fixed;
.btn { .btn {
float: none; float: none;
display: table-cell; display: table-cell;
@@ -165,7 +238,7 @@
// Checkbox and radio options // Checkbox and radio options
.btn-group[data-toggle="buttons"] > .btn > input[type="radio"], [data-toggle="buttons"] > .btn > input[type="radio"],
.btn-group[data-toggle="buttons"] > .btn > input[type="checkbox"] { [data-toggle="buttons"] > .btn > input[type="checkbox"] {
display: none; display: none;
} }

View File

@@ -12,7 +12,7 @@
padding: @padding-base-vertical @padding-base-horizontal; padding: @padding-base-vertical @padding-base-horizontal;
margin-bottom: 0; // For input.btn margin-bottom: 0; // For input.btn
font-size: @font-size-base; font-size: @font-size-base;
font-weight: 500; font-weight: @btn-font-weight;
line-height: @line-height-base; line-height: @line-height-base;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@@ -20,6 +20,7 @@
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @border-radius-base; border-radius: @border-radius-base;
white-space: nowrap; white-space: nowrap;
.user-select(none);
&:focus { &:focus {
.tab-focus(); .tab-focus();
@@ -27,7 +28,7 @@
&:hover, &:hover,
&:focus { &:focus {
color: @btn-hover-color; color: @btn-default-color;
text-decoration: none; text-decoration: none;
} }
@@ -53,26 +54,26 @@
// -------------------------------------------------- // --------------------------------------------------
.btn-default { .btn-default {
.btn-pseudo-states(@btn-default-color, @btn-default-bg, @btn-default-border); .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
} }
.btn-primary { .btn-primary {
.btn-pseudo-states(@btn-primary-color, @btn-primary-bg, @btn-primary-border); .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
} }
// Warning appears as orange // Warning appears as orange
.btn-warning { .btn-warning {
.btn-pseudo-states(@btn-warning-color, @btn-warning-bg, @btn-warning-border); .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
} }
// Danger and error appear as red // Danger and error appear as red
.btn-danger { .btn-danger {
.btn-pseudo-states(@btn-danger-color, @btn-danger-bg, @btn-danger-border); .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
} }
// Success appears as green // Success appears as green
.btn-success { .btn-success {
.btn-pseudo-states(@btn-success-color, @btn-success-bg, @btn-success-border); .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
} }
// Info appears as blue-green // Info appears as blue-green
.btn-info { .btn-info {
.btn-pseudo-states(@btn-info-color, @btn-info-bg, @btn-info-border); .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
} }
@@ -109,7 +110,7 @@
fieldset[disabled] & { fieldset[disabled] & {
&:hover, &:hover,
&:focus { &:focus {
color: @gray-dark; color: @btn-link-disabled-color;
text-decoration: none; text-decoration: none;
} }
} }
@@ -119,16 +120,17 @@
// Button Sizes // Button Sizes
// -------------------------------------------------- // --------------------------------------------------
.btn-large { .btn-lg {
padding: @padding-large-vertical @padding-large-horizontal; // line-height: ensure even-numbered height of button next to large input
font-size: @font-size-large; .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
border-radius: @border-radius-large;
} }
.btn-small { .btn-sm,
padding: @padding-small-vertical @padding-small-horizontal; .btn-xs {
font-size: @font-size-small; // line-height: ensure proper height of button next to small input
line-height: 1.5; // ensure proper height of button next to small input .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
border-radius: @border-radius-small; }
.btn-xs {
padding: 3px 5px;
} }

View File

@@ -69,9 +69,9 @@
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 15%; width: @carousel-control-width;
.opacity(.5); .opacity(@carousel-control-opacity);
font-size: 20px; font-size: @carousel-control-font-size;
color: @carousel-control-color; color: @carousel-control-color;
text-align: center; text-align: center;
text-shadow: @carousel-text-shadow; text-shadow: @carousel-text-shadow;
@@ -81,13 +81,11 @@
// Set gradients for backgrounds // Set gradients for backgrounds
&.left { &.left {
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
background-color: transparent;
} }
&.right { &.right {
left: auto; left: auto;
right: 0; right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
background-color: transparent;
} }
// Hover/focus state // Hover/focus state
@@ -99,7 +97,6 @@
} }
// Toggles // Toggles
.glyphicon,
.icon-prev, .icon-prev,
.icon-next { .icon-next {
position: absolute; position: absolute;
@@ -113,7 +110,7 @@
margin-left: -10px; margin-left: -10px;
font-family: serif; font-family: serif;
} }
// Non-glyphicon toggles
.icon-prev { .icon-prev {
&:before { &:before {
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
@@ -127,14 +124,17 @@
} }
// Optional indicator pips // Optional indicator pips
// ----------------------------- //
// Add an unordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators { .carousel-indicators {
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
left: 50%; left: 50%;
z-index: 15; z-index: 15;
width: 120px; width: 60%;
margin-left: -60px; margin-left: -30%;
padding-left: 0; padding-left: 0;
list-style: none; list-style: none;
text-align: center; text-align: center;
@@ -181,7 +181,6 @@
@media screen and (min-width: @screen-tablet) { @media screen and (min-width: @screen-tablet) {
// Scale up the controls a smidge // Scale up the controls a smidge
.carousel-control .glyphicon,
.carousel-control .icon-prev, .carousel-control .icon-prev,
.carousel-control .icon-next { .carousel-control .icon-next {
width: 30px; width: 30px;

View File

@@ -6,7 +6,7 @@
.close { .close {
float: right; float: right;
font-size: (@font-size-base * 1.5); font-size: (@font-size-base * 1.5);
font-weight: bold; font-weight: @close-font-weight;
line-height: 1; line-height: 1;
color: @close-color; color: @close-color;
text-shadow: @close-text-shadow; text-shadow: @close-text-shadow;

View File

@@ -16,7 +16,7 @@ code {
color: @code-color; color: @code-color;
background-color: @code-bg; background-color: @code-bg;
white-space: nowrap; white-space: nowrap;
border-radius: 4px; border-radius: @border-radius-base;
} }
// Blocks of code // Blocks of code
@@ -28,7 +28,7 @@ pre {
line-height: @line-height-base; line-height: @line-height-base;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
color: @gray-dark; color: @pre-color;
background-color: @pre-bg; background-color: @pre-bg;
border: 1px solid @pre-border-color; border: 1px solid @pre-border-color;
border-radius: @border-radius-base; border-radius: @border-radius-base;
@@ -41,6 +41,7 @@ pre {
// Account for some code outputs that place code tags in pre tags // Account for some code outputs that place code tags in pre tags
code { code {
padding: 0; padding: 0;
font-size: inherit;
color: inherit; color: inherit;
white-space: pre-wrap; white-space: pre-wrap;
background-color: transparent; background-color: transparent;
@@ -50,6 +51,6 @@ pre {
// Enable scrollable blocks of code // Enable scrollable blocks of code
.pre-scrollable { .pre-scrollable {
max-height: 340px; max-height: @pre-scrollable-max-height;
overflow-y: scroll; overflow-y: scroll;
} }

View File

@@ -4,21 +4,29 @@
// Dropdown arrow/caret // Dropdown arrow/caret
// --------------------
.caret { .caret {
display: inline-block; display: inline-block;
width: 0; width: 0;
height: 0; height: 0;
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: 4px solid @dropdown-caret-color; border-top: @caret-width-base solid @dropdown-caret-color;
border-right: 4px solid transparent; border-right: @caret-width-base solid transparent;
border-left: 4px solid transparent; border-left: @caret-width-base solid transparent;
content: ""; content: "";
} }
// The dropdown wrapper (div)
.dropdown {
position: relative;
}
// Prevent the focus on the dropdown toggle when closing dropdowns
.dropdown-toggle:focus {
outline: 0;
}
// The dropdown menu (ul) // The dropdown menu (ul)
// ----------------------
.dropdown-menu { .dropdown-menu {
position: absolute; position: absolute;
top: 100%; top: 100%;
@@ -30,12 +38,13 @@
padding: 5px 0; padding: 5px 0;
margin: 2px 0 0; // override default ul margin: 2px 0 0; // override default ul
list-style: none; list-style: none;
font-size: @font-size-base;
background-color: @dropdown-bg; background-color: @dropdown-bg;
border: 1px solid @dropdown-fallback-border; // IE8 fallback border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdown-border; border: 1px solid @dropdown-border;
border-radius: @border-radius-base; border-radius: @border-radius-base;
.box-shadow(0 6px 12px rgba(0,0,0,.175)); .box-shadow(0 6px 12px rgba(0,0,0,.175));
.background-clip(padding-box); background-clip: padding-box;
// Aligns the dropdown menu to right // Aligns the dropdown menu to right
&.pull-right { &.pull-right {
@@ -61,18 +70,17 @@
} }
// Hover/Focus state // Hover/Focus state
// -----------
.dropdown-menu > li > a { .dropdown-menu > li > a {
&:hover, &:hover,
&:focus { &:focus {
text-decoration: none; text-decoration: none;
color: @dropdown-link-hover-color; color: @dropdown-link-hover-color;
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
background-color: darken(@dropdown-link-hover-bg, 5%);
} }
} }
// Active state // Active state
// ------------
.dropdown-menu > .active > a { .dropdown-menu > .active > a {
&, &,
&:hover, &:hover,
@@ -81,17 +89,19 @@
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
background-color: darken(@dropdown-link-active-bg, 5%);
} }
} }
// Disabled state // Disabled state
// -------------- //
// Gray out text and ensure the hover/focus state remains gray // Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a { .dropdown-menu > .disabled > a {
&, &,
&:hover, &:hover,
&:focus { &:focus {
color: @gray-light; color: @dropdown-link-disabled-color;
} }
} }
// Nuke hover/focus effects // Nuke hover/focus effects
@@ -107,7 +117,6 @@
} }
// Open state for the dropdown // Open state for the dropdown
// ---------------------------
.open { .open {
// Show the menu // Show the menu
> .dropdown-menu { > .dropdown-menu {
@@ -121,19 +130,15 @@
} }
// Dropdown section headers // Dropdown section headers
// ---------------------------
.dropdown-header { .dropdown-header {
display: block; display: block;
padding: 3px 20px; padding: 3px 20px;
font-size: @font-size-small; font-size: @font-size-small;
line-height: @line-height-base; line-height: @line-height-base;
color: @gray-light; color: @dropdown-header-color;
} }
// Backdrop to catch body clicks on mobile, etc. // Backdrop to catch body clicks on mobile, etc.
// ---------------------------
.dropdown-backdrop { .dropdown-backdrop {
position: fixed; position: fixed;
left: 0; left: 0;
@@ -144,16 +149,16 @@
} }
// Right aligned dropdowns // Right aligned dropdowns
// ---------------------------
.pull-right > .dropdown-menu { .pull-right > .dropdown-menu {
right: 0; right: 0;
left: auto; left: auto;
} }
// Allow for dropdowns to go bottom up (aka, dropup-menu) // Allow for dropdowns to go bottom up (aka, dropup-menu)
// ------------------------------------------------------ //
// Just add .dropup after the standard .dropdown class and you're set, bro. // Just add .dropup after the standard .dropdown class and you're set, bro.
// TODO: abstract this so that the navbar fixed styles are not placed here? // TODO: abstract this so that the navbar fixed styles are not placed here?
.dropup, .dropup,
.navbar-fixed-bottom .dropdown { .navbar-fixed-bottom .dropdown {
// Reverse the caret // Reverse the caret

View File

@@ -20,7 +20,7 @@ legend {
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
font-size: (@font-size-base * 1.5); font-size: (@font-size-base * 1.5);
line-height: inherit; line-height: inherit;
color: @gray-dark; color: @legend-color;
border: 0; border: 0;
border-bottom: 1px solid @legend-border-color; border-bottom: 1px solid @legend-border-color;
} }
@@ -77,7 +77,7 @@ input[type="checkbox"]:focus {
// See https://github.com/twbs/bootstrap/issues/8350 for more. // See https://github.com/twbs/bootstrap/issues/8350 for more.
input[type="number"] { input[type="number"] {
&::-webkit-outer-spin-button, &::-webkit-outer-spin-button,
&::-webkit-inner-spin-button { &::-webkit-inner-spin-button {
height: auto; height: auto;
} }
} }
@@ -121,7 +121,7 @@ input[type="number"] {
padding: @padding-base-vertical @padding-base-horizontal; padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base; font-size: @font-size-base;
line-height: @line-height-base; line-height: @line-height-base;
color: @gray; color: @input-color;
vertical-align: middle; vertical-align: middle;
background-color: @input-bg; background-color: @input-bg;
border: 1px solid @input-border; border: 1px solid @input-border;
@@ -129,11 +129,8 @@ input[type="number"] {
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
&:focus { // Customize the `:focus` state to imitate native WebKit styles.
border-color: rgba(82,168,236,.8); .form-control-focus();
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
}
// Disabled and read-only inputs // Disabled and read-only inputs
// Note: HTML5 says that inputs under a fieldset > legend:first-child won't be // Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
@@ -211,36 +208,13 @@ input[type="number"] {
} }
// Form control sizing // Form control sizing
// .input-sm {
// Relative text size, padding, and border-radii changes for form controls. For .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
.form-control {
&.input-large {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
&.input-small {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
} }
select {
&.input-large { .input-lg {
height: @input-height-large; .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
line-height: @input-height-large;
}
&.input-small {
height: @input-height-small;
line-height: @input-height-small;
}
} }
@@ -250,15 +224,26 @@ select {
// Warning // Warning
.has-warning { .has-warning {
.form-control-validation(@state-warning-text, @state-warning-text, @state-warning-bg); .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
} }
// Error // Error
.has-error { .has-error {
.form-control-validation(@state-danger-text, @state-danger-text, @state-danger-bg); .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
} }
// Success // Success
.has-success { .has-success {
.form-control-validation(@state-success-text, @state-success-text, @state-success-bg); .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
}
// Static form control text
//
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.
.form-control-static {
margin-bottom: 0; // Remove default margin from `p`
padding-top: @padding-base-vertical;
} }
@@ -273,3 +258,75 @@ select {
margin-bottom: 10px; margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast color: lighten(@text-color, 25%); // lighten the text some for contrast
} }
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline {
// Kick in the inline
@media (min-width: @screen-tablet) {
// Inline-block all the things for "inline"
.form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
// In navbar-form, allow folks to *not* use `.form-group`
.form-control {
display: inline-block;
}
// Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match (which also avoids
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
.radio,
.checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
float: none;
margin-left: 0;
}
}
}
// Horizontal forms
//
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.
.form-horizontal .control-label,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
padding-top: @padding-base-vertical;
}
.form-horizontal {
.form-group {
.make-row();
}
}
// Only right align form labels here when the columns stop stacking
@media (min-width: @screen-tablet) {
.form-horizontal .control-label {
text-align: right;
}
}

View File

@@ -2,6 +2,7 @@
// Grid system // Grid system
// -------------------------------------------------- // --------------------------------------------------
// Set the container width, and override it for fixed navbars in media queries // Set the container width, and override it for fixed navbars in media queries
.container { .container {
.container-fixed(); .container-fixed();
@@ -13,18 +14,18 @@
} }
// Common styles for small and large grid columns // Common styles for small and large grid columns
.col-1, .col-xs-1,
.col-2, .col-xs-2,
.col-3, .col-xs-3,
.col-4, .col-xs-4,
.col-5, .col-xs-5,
.col-6, .col-xs-6,
.col-7, .col-xs-7,
.col-8, .col-xs-8,
.col-9, .col-xs-9,
.col-10, .col-xs-10,
.col-11, .col-xs-11,
.col-12, .col-xs-12,
.col-sm-1, .col-sm-1,
.col-sm-2, .col-sm-2,
.col-sm-3, .col-sm-3,
@@ -37,6 +38,18 @@
.col-sm-10, .col-sm-10,
.col-sm-11, .col-sm-11,
.col-sm-12, .col-sm-12,
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11,
.col-md-12,
.col-lg-1, .col-lg-1,
.col-lg-2, .col-lg-2,
.col-lg-3, .col-lg-3,
@@ -58,40 +71,49 @@
} }
// Extra small grid
// //
// Container and grid column sizing // Grid classes for extra small devices like smartphones. No offset, push, or
// pull classes are present here due to the size of the target.
// //
// Note that `.col-xs-12` doesn't get floated on purpose—there's no need since
// it's full-width.
// Tiny device columns (smartphones) .col-xs-1,
.col-1, .col-xs-2,
.col-2, .col-xs-3,
.col-3, .col-xs-4,
.col-4, .col-xs-5,
.col-5, .col-xs-6,
.col-6, .col-xs-7,
.col-7, .col-xs-8,
.col-8, .col-xs-9,
.col-9, .col-xs-10,
.col-10, .col-xs-11 {
.col-11,
.col-12 {
float: left; float: left;
} }
.col-1 { width: percentage((1 / @grid-columns)); } .col-xs-1 { width: percentage((1 / @grid-columns)); }
.col-2 { width: percentage((2 / @grid-columns)); } .col-xs-2 { width: percentage((2 / @grid-columns)); }
.col-3 { width: percentage((3 / @grid-columns)); } .col-xs-3 { width: percentage((3 / @grid-columns)); }
.col-4 { width: percentage((4 / @grid-columns)); } .col-xs-4 { width: percentage((4 / @grid-columns)); }
.col-5 { width: percentage((5 / @grid-columns)); } .col-xs-5 { width: percentage((5 / @grid-columns)); }
.col-6 { width: percentage((6 / @grid-columns)); } .col-xs-6 { width: percentage((6 / @grid-columns)); }
.col-7 { width: percentage((7 / @grid-columns)); } .col-xs-7 { width: percentage((7 / @grid-columns)); }
.col-8 { width: percentage((8 / @grid-columns)); } .col-xs-8 { width: percentage((8 / @grid-columns)); }
.col-9 { width: percentage((9 / @grid-columns)); } .col-xs-9 { width: percentage((9 / @grid-columns)); }
.col-10 { width: percentage((10/ @grid-columns)); } .col-xs-10 { width: percentage((10/ @grid-columns)); }
.col-11 { width: percentage((11/ @grid-columns)); } .col-xs-11 { width: percentage((11/ @grid-columns)); }
.col-12 { width: 100%; } .col-xs-12 { width: 100%; }
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
//
// Note that `.col-sm-12` doesn't get floated on purpose—there's no need since
// it's full-width.
// Small device columns (phones to tablets)
@media (min-width: @screen-tablet) { @media (min-width: @screen-tablet) {
.container { .container {
max-width: @container-tablet; max-width: @container-tablet;
@@ -107,8 +129,7 @@
.col-sm-8, .col-sm-8,
.col-sm-9, .col-sm-9,
.col-sm-10, .col-sm-10,
.col-sm-11, .col-sm-11 {
.col-sm-12 {
float: left; float: left;
} }
.col-sm-1 { width: percentage((1 / @grid-columns)); } .col-sm-1 { width: percentage((1 / @grid-columns)); }
@@ -125,36 +146,134 @@
.col-sm-12 { width: 100%; } .col-sm-12 { width: 100%; }
// Push and pull columns for source order changes // Push and pull columns for source order changes
.col-push-1 { left: percentage((1 / @grid-columns)); } .col-sm-push-1 { left: percentage((1 / @grid-columns)); }
.col-push-2 { left: percentage((2 / @grid-columns)); } .col-sm-push-2 { left: percentage((2 / @grid-columns)); }
.col-push-3 { left: percentage((3 / @grid-columns)); } .col-sm-push-3 { left: percentage((3 / @grid-columns)); }
.col-push-4 { left: percentage((4 / @grid-columns)); } .col-sm-push-4 { left: percentage((4 / @grid-columns)); }
.col-push-5 { left: percentage((5 / @grid-columns)); } .col-sm-push-5 { left: percentage((5 / @grid-columns)); }
.col-push-6 { left: percentage((6 / @grid-columns)); } .col-sm-push-6 { left: percentage((6 / @grid-columns)); }
.col-push-7 { left: percentage((7 / @grid-columns)); } .col-sm-push-7 { left: percentage((7 / @grid-columns)); }
.col-push-8 { left: percentage((8 / @grid-columns)); } .col-sm-push-8 { left: percentage((8 / @grid-columns)); }
.col-push-9 { left: percentage((9 / @grid-columns)); } .col-sm-push-9 { left: percentage((9 / @grid-columns)); }
.col-push-10 { left: percentage((10/ @grid-columns)); } .col-sm-push-10 { left: percentage((10/ @grid-columns)); }
.col-push-11 { left: percentage((11/ @grid-columns)); } .col-sm-push-11 { left: percentage((11/ @grid-columns)); }
.col-pull-1 { right: percentage((1 / @grid-columns)); } .col-sm-pull-1 { right: percentage((1 / @grid-columns)); }
.col-pull-2 { right: percentage((2 / @grid-columns)); } .col-sm-pull-2 { right: percentage((2 / @grid-columns)); }
.col-pull-3 { right: percentage((3 / @grid-columns)); } .col-sm-pull-3 { right: percentage((3 / @grid-columns)); }
.col-pull-4 { right: percentage((4 / @grid-columns)); } .col-sm-pull-4 { right: percentage((4 / @grid-columns)); }
.col-pull-5 { right: percentage((5 / @grid-columns)); } .col-sm-pull-5 { right: percentage((5 / @grid-columns)); }
.col-pull-6 { right: percentage((6 / @grid-columns)); } .col-sm-pull-6 { right: percentage((6 / @grid-columns)); }
.col-pull-7 { right: percentage((7 / @grid-columns)); } .col-sm-pull-7 { right: percentage((7 / @grid-columns)); }
.col-pull-8 { right: percentage((8 / @grid-columns)); } .col-sm-pull-8 { right: percentage((8 / @grid-columns)); }
.col-pull-9 { right: percentage((9 / @grid-columns)); } .col-sm-pull-9 { right: percentage((9 / @grid-columns)); }
.col-pull-10 { right: percentage((10/ @grid-columns)); } .col-sm-pull-10 { right: percentage((10/ @grid-columns)); }
.col-pull-11 { right: percentage((11/ @grid-columns)); } .col-sm-pull-11 { right: percentage((11/ @grid-columns)); }
// Offsets
.col-sm-offset-1 { margin-left: percentage((1 / @grid-columns)); }
.col-sm-offset-2 { margin-left: percentage((2 / @grid-columns)); }
.col-sm-offset-3 { margin-left: percentage((3 / @grid-columns)); }
.col-sm-offset-4 { margin-left: percentage((4 / @grid-columns)); }
.col-sm-offset-5 { margin-left: percentage((5 / @grid-columns)); }
.col-sm-offset-6 { margin-left: percentage((6 / @grid-columns)); }
.col-sm-offset-7 { margin-left: percentage((7 / @grid-columns)); }
.col-sm-offset-8 { margin-left: percentage((8 / @grid-columns)); }
.col-sm-offset-9 { margin-left: percentage((9 / @grid-columns)); }
.col-sm-offset-10 { margin-left: percentage((10/ @grid-columns)); }
.col-sm-offset-11 { margin-left: percentage((11/ @grid-columns)); }
} }
// Medium and large device columns (desktop and up)
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
//
// Note that `.col-md-12` doesn't get floated on purpose—there's no need since
// it's full-width.
@media (min-width: @screen-desktop) { @media (min-width: @screen-desktop) {
.container { .container {
max-width: @container-desktop; max-width: @container-desktop;
} }
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11 {
float: left;
}
.col-md-1 { width: percentage((1 / @grid-columns)); }
.col-md-2 { width: percentage((2 / @grid-columns)); }
.col-md-3 { width: percentage((3 / @grid-columns)); }
.col-md-4 { width: percentage((4 / @grid-columns)); }
.col-md-5 { width: percentage((5 / @grid-columns)); }
.col-md-6 { width: percentage((6 / @grid-columns)); }
.col-md-7 { width: percentage((7 / @grid-columns)); }
.col-md-8 { width: percentage((8 / @grid-columns)); }
.col-md-9 { width: percentage((9 / @grid-columns)); }
.col-md-10 { width: percentage((10/ @grid-columns)); }
.col-md-11 { width: percentage((11/ @grid-columns)); }
.col-md-12 { width: 100%; }
// Push and pull columns for source order changes
.col-md-push-1 { left: percentage((1 / @grid-columns)); }
.col-md-push-2 { left: percentage((2 / @grid-columns)); }
.col-md-push-3 { left: percentage((3 / @grid-columns)); }
.col-md-push-4 { left: percentage((4 / @grid-columns)); }
.col-md-push-5 { left: percentage((5 / @grid-columns)); }
.col-md-push-6 { left: percentage((6 / @grid-columns)); }
.col-md-push-7 { left: percentage((7 / @grid-columns)); }
.col-md-push-8 { left: percentage((8 / @grid-columns)); }
.col-md-push-9 { left: percentage((9 / @grid-columns)); }
.col-md-push-10 { left: percentage((10/ @grid-columns)); }
.col-md-push-11 { left: percentage((11/ @grid-columns)); }
.col-md-pull-1 { right: percentage((1 / @grid-columns)); }
.col-md-pull-2 { right: percentage((2 / @grid-columns)); }
.col-md-pull-3 { right: percentage((3 / @grid-columns)); }
.col-md-pull-4 { right: percentage((4 / @grid-columns)); }
.col-md-pull-5 { right: percentage((5 / @grid-columns)); }
.col-md-pull-6 { right: percentage((6 / @grid-columns)); }
.col-md-pull-7 { right: percentage((7 / @grid-columns)); }
.col-md-pull-8 { right: percentage((8 / @grid-columns)); }
.col-md-pull-9 { right: percentage((9 / @grid-columns)); }
.col-md-pull-10 { right: percentage((10/ @grid-columns)); }
.col-md-pull-11 { right: percentage((11/ @grid-columns)); }
// Offsets
.col-md-offset-1 { margin-left: percentage((1 / @grid-columns)); }
.col-md-offset-2 { margin-left: percentage((2 / @grid-columns)); }
.col-md-offset-3 { margin-left: percentage((3 / @grid-columns)); }
.col-md-offset-4 { margin-left: percentage((4 / @grid-columns)); }
.col-md-offset-5 { margin-left: percentage((5 / @grid-columns)); }
.col-md-offset-6 { margin-left: percentage((6 / @grid-columns)); }
.col-md-offset-7 { margin-left: percentage((7 / @grid-columns)); }
.col-md-offset-8 { margin-left: percentage((8 / @grid-columns)); }
.col-md-offset-9 { margin-left: percentage((9 / @grid-columns)); }
.col-md-offset-10 { margin-left: percentage((10/ @grid-columns)); }
.col-md-offset-11 { margin-left: percentage((11/ @grid-columns)); }
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
//
// Note that `.col-lg-12` doesn't get floated on purpose—there's no need since
// it's full-width.
@media (min-width: @screen-large-desktop) {
.container {
max-width: @container-large-desktop;
}
.col-lg-1, .col-lg-1,
.col-lg-2, .col-lg-2,
.col-lg-3, .col-lg-3,
@@ -165,8 +284,7 @@
.col-lg-8, .col-lg-8,
.col-lg-9, .col-lg-9,
.col-lg-10, .col-lg-10,
.col-lg-11, .col-lg-11 {
.col-lg-12 {
float: left; float: left;
} }
.col-lg-1 { width: percentage((1 / @grid-columns)); } .col-lg-1 { width: percentage((1 / @grid-columns)); }
@@ -182,23 +300,41 @@
.col-lg-11 { width: percentage((11/ @grid-columns)); } .col-lg-11 { width: percentage((11/ @grid-columns)); }
.col-lg-12 { width: 100%; } .col-lg-12 { width: 100%; }
// Offsets // Push and pull columns for source order changes
.col-offset-1 { margin-left: percentage((1 / @grid-columns)); } .col-lg-push-1 { left: percentage((1 / @grid-columns)); }
.col-offset-2 { margin-left: percentage((2 / @grid-columns)); } .col-lg-push-2 { left: percentage((2 / @grid-columns)); }
.col-offset-3 { margin-left: percentage((3 / @grid-columns)); } .col-lg-push-3 { left: percentage((3 / @grid-columns)); }
.col-offset-4 { margin-left: percentage((4 / @grid-columns)); } .col-lg-push-4 { left: percentage((4 / @grid-columns)); }
.col-offset-5 { margin-left: percentage((5 / @grid-columns)); } .col-lg-push-5 { left: percentage((5 / @grid-columns)); }
.col-offset-6 { margin-left: percentage((6 / @grid-columns)); } .col-lg-push-6 { left: percentage((6 / @grid-columns)); }
.col-offset-7 { margin-left: percentage((7 / @grid-columns)); } .col-lg-push-7 { left: percentage((7 / @grid-columns)); }
.col-offset-8 { margin-left: percentage((8 / @grid-columns)); } .col-lg-push-8 { left: percentage((8 / @grid-columns)); }
.col-offset-9 { margin-left: percentage((9 / @grid-columns)); } .col-lg-push-9 { left: percentage((9 / @grid-columns)); }
.col-offset-10 { margin-left: percentage((10/ @grid-columns)); } .col-lg-push-10 { left: percentage((10/ @grid-columns)); }
.col-offset-11 { margin-left: percentage((11/ @grid-columns)); } .col-lg-push-11 { left: percentage((11/ @grid-columns)); }
}
// Large desktops and up .col-lg-pull-1 { right: percentage((1 / @grid-columns)); }
@media (min-width: @screen-large-desktop) { .col-lg-pull-2 { right: percentage((2 / @grid-columns)); }
.container { .col-lg-pull-3 { right: percentage((3 / @grid-columns)); }
max-width: @container-large-desktop; .col-lg-pull-4 { right: percentage((4 / @grid-columns)); }
} .col-lg-pull-5 { right: percentage((5 / @grid-columns)); }
.col-lg-pull-6 { right: percentage((6 / @grid-columns)); }
.col-lg-pull-7 { right: percentage((7 / @grid-columns)); }
.col-lg-pull-8 { right: percentage((8 / @grid-columns)); }
.col-lg-pull-9 { right: percentage((9 / @grid-columns)); }
.col-lg-pull-10 { right: percentage((10/ @grid-columns)); }
.col-lg-pull-11 { right: percentage((11/ @grid-columns)); }
// Offsets
.col-lg-offset-1 { margin-left: percentage((1 / @grid-columns)); }
.col-lg-offset-2 { margin-left: percentage((2 / @grid-columns)); }
.col-lg-offset-3 { margin-left: percentage((3 / @grid-columns)); }
.col-lg-offset-4 { margin-left: percentage((4 / @grid-columns)); }
.col-lg-offset-5 { margin-left: percentage((5 / @grid-columns)); }
.col-lg-offset-6 { margin-left: percentage((6 / @grid-columns)); }
.col-lg-offset-7 { margin-left: percentage((7 / @grid-columns)); }
.col-lg-offset-8 { margin-left: percentage((8 / @grid-columns)); }
.col-lg-offset-9 { margin-left: percentage((9 / @grid-columns)); }
.col-lg-offset-10 { margin-left: percentage((10/ @grid-columns)); }
.col-lg-offset-11 { margin-left: percentage((11/ @grid-columns)); }
} }

View File

@@ -5,6 +5,7 @@
// Base styles // Base styles
// ------------------------- // -------------------------
.input-group { .input-group {
position: relative; // For dropdowns
display: table; display: table;
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
@@ -21,6 +22,19 @@
} }
} }
// Sizing options
//
// Remix the default form control sizing classes into new ones for easier
// manipulation.
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn { .input-lg(); }
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-lg > .input-group-btn > .btn { .input-sm(); }
// Display as table-cell // Display as table-cell
// ------------------------- // -------------------------
.input-group-addon, .input-group-addon,
@@ -43,23 +57,22 @@
// Text input groups // Text input groups
// ------------------------- // -------------------------
.input-group-addon { .input-group-addon {
.box-sizing(border-box);
padding: @padding-base-vertical @padding-base-horizontal; padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base; font-size: @font-size-base;
font-weight: normal; font-weight: normal;
line-height: @line-height-base; line-height: 1;
text-align: center; text-align: center;
background-color: @gray-lighter; background-color: @input-group-addon-bg;
border: 1px solid @input-group-addon-border-color; border: 1px solid @input-group-addon-border-color;
border-radius: @border-radius-base; border-radius: @border-radius-base;
// Sizing // Sizing
&.input-small { &.input-sm {
padding: @padding-small-vertical @padding-small-horizontal; padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small; font-size: @font-size-small;
border-radius: @border-radius-small; border-radius: @border-radius-small;
} }
&.input-large { &.input-lg {
padding: @padding-large-vertical @padding-large-horizontal; padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large; font-size: @font-size-large;
border-radius: @border-radius-large; border-radius: @border-radius-large;
@@ -112,42 +125,3 @@
z-index: 2; z-index: 2;
} }
} }
// Inline forms
// --------------------------------------------------
.form-inline {
.form-control,
.radio,
.checkbox {
display: inline-block;
}
.radio,
.checkbox {
margin-top: 0;
margin-bottom: 0;
}
}
// Horizontal forms
// --------------------------------------------------
// Horizontal forms are built on grid classes.
.form-horizontal .control-label {
padding-top: 9px;
}
.form-horizontal {
.form-group {
.make-row();
}
}
// Only right align form labels here when the columns stop stacking
@media (min-width: @screen-tablet) {
.form-horizontal .control-label {
text-align: right;
}
}

View File

@@ -6,13 +6,12 @@
display: inline; display: inline;
padding: .25em .6em; padding: .25em .6em;
font-size: 75%; font-size: 75%;
font-weight: 500; font-weight: bold;
line-height: 1; line-height: 1;
color: @label-color; color: @label-color;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; vertical-align: baseline;
background-color: @gray-light;
border-radius: .25em; border-radius: .25em;
// Add hover effects, but only for links // Add hover effects, but only for links
@@ -22,13 +21,22 @@
color: @label-link-hover-color; color: @label-link-hover-color;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
background-color: darken(@gray-light, 10%);
} }
} }
// Empty labels collapse automatically (not available in IE8)
&:empty {
display: none;
}
} }
// Colors // Colors
// Contextual variations (linked labels get darker on :hover) // Contextual variations (linked labels get darker on :hover)
.label-default {
.label-variant(@label-default-bg);
}
.label-danger { .label-danger {
.label-variant(@label-danger-bg); .label-variant(@label-danger-bg);
} }

View File

@@ -9,7 +9,6 @@
// No need to set list-style: none; since .list-group-item is block level // No need to set list-style: none; since .list-group-item is block level
margin-bottom: 20px; margin-bottom: 20px;
padding-left: 0; // reset padding because ul and ol padding-left: 0; // reset padding because ul and ol
background-color: @list-group-bg;
} }
// Individual list items // Individual list items
@@ -18,61 +17,49 @@
.list-group-item { .list-group-item {
position: relative; position: relative;
display: block; display: block;
padding: 10px 30px 10px 15px; padding: 10px 15px;
// Place the border on the list items and negative margin up for better styling // Place the border on the list items and negative margin up for better styling
margin-bottom: -1px; margin-bottom: -1px;
background-color: @list-group-bg;
border: 1px solid @list-group-border; border: 1px solid @list-group-border;
// Round the first and last items // Round the first and last items
&:first-child { &:first-child {
.border-top-radius(@border-radius-base); .border-top-radius(@list-group-border-radius);
} }
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
.border-bottom-radius(@border-radius-base); .border-bottom-radius(@list-group-border-radius);
} }
// Align badges within list items // Align badges within list items
> .badge { > .badge {
float: right; float: right;
margin-right: -15px;
} }
} > .badge + .badge {
margin-right: 5px;
// 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 {
// Colorize content accordingly
.list-group-item-heading {
color: @list-group-link-heading-color;
} }
.list-group-item-text {
// Linked list items
a& {
color: @list-group-link-color; color: @list-group-link-color;
}
// Hover state .list-group-item-heading {
&:hover, color: @list-group-link-heading-color;
&:focus { }
text-decoration: none;
background-color: @list-group-hover-bg; // Hover state
&:hover,
&:focus {
text-decoration: none;
background-color: @list-group-hover-bg;
}
} }
// Active class on item itself, not parent // Active class on item itself, not parent
&.active { &.active,
&.active:hover,
&.active:focus {
z-index: 2; // Place active items above their siblings for proper border styling z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-color; color: @list-group-active-color;
background-color: @list-group-active-bg; background-color: @list-group-active-bg;
@@ -87,3 +74,15 @@ a.list-group-item {
} }
} }
} }
// Custom content options
// -------------------------
.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}

View File

@@ -44,12 +44,12 @@
} }
// Sizing shortcuts // Sizing shortcuts
.size(@width, @height) { .size(@width; @height) {
width: @width; width: @width;
height: @height; height: @height;
} }
.square(@size) { .square(@size) {
.size(@size, @size); .size(@size; @size);
} }
// Placeholder text // Placeholder text
@@ -130,25 +130,25 @@
// Transformations // Transformations
.rotate(@degrees) { .rotate(@degrees) {
-webkit-transform: rotate(@degrees); -webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); -ms-transform: rotate(@degrees); // IE9+
transform: rotate(@degrees); transform: rotate(@degrees);
} }
.scale(@ratio) { .scale(@ratio) {
-webkit-transform: scale(@ratio); -webkit-transform: scale(@ratio);
-ms-transform: scale(@ratio); -ms-transform: scale(@ratio); // IE9+
transform: scale(@ratio); transform: scale(@ratio);
} }
.translate(@x, @y) { .translate(@x; @y) {
-webkit-transform: translate(@x, @y); -webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y); -ms-transform: translate(@x, @y); // IE9+
transform: translate(@x, @y); transform: translate(@x, @y);
} }
.skew(@x, @y) { .skew(@x; @y) {
-webkit-transform: skew(@x, @y); -webkit-transform: skew(@x, @y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885 -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
transform: skew(@x, @y); transform: skew(@x, @y);
} }
.translate3d(@x, @y, @z) { .translate3d(@x; @y; @z) {
-webkit-transform: translate3d(@x, @y, @z); -webkit-transform: translate3d(@x, @y, @z);
transform: translate3d(@x, @y, @z); transform: translate3d(@x, @y, @z);
} }
@@ -158,19 +158,9 @@
// Default value is `visible`, but can be changed to `hidden` // Default value is `visible`, but can be changed to `hidden`
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
.backface-visibility(@visibility){ .backface-visibility(@visibility){
-webkit-backface-visibility: @visibility; -webkit-backface-visibility: @visibility;
-moz-backface-visibility: @visibility; -moz-backface-visibility: @visibility;
backface-visibility: @visibility; backface-visibility: @visibility;
}
// Background clipping
.background-clip(@clip) {
background-clip: @clip;
}
// Background sizing
.background-size(@size) {
background-size: @size;
} }
// Box sizing // Box sizing
@@ -185,7 +175,7 @@
.user-select(@select) { .user-select(@select) {
-webkit-user-select: @select; -webkit-user-select: @select;
-moz-user-select: @select; -moz-user-select: @select;
-ms-user-select: @select; -ms-user-select: @select; // IE10+
-o-user-select: @select; -o-user-select: @select;
user-select: @select; user-select: @select;
} }
@@ -197,7 +187,7 @@
} }
// CSS3 Content Columns // CSS3 Content Columns
.content-columns(@column-count, @column-gap: @grid-gutter-width) { .content-columns(@column-count; @column-gap: @grid-gutter-width) {
-webkit-column-count: @column-count; -webkit-column-count: @column-count;
-moz-column-count: @column-count; -moz-column-count: @column-count;
column-count: @column-count; column-count: @column-count;
@@ -211,7 +201,7 @@
word-wrap: break-word; word-wrap: break-word;
-webkit-hyphens: @mode; -webkit-hyphens: @mode;
-moz-hyphens: @mode; -moz-hyphens: @mode;
-ms-hyphens: @mode; -ms-hyphens: @mode; // IE10+
-o-hyphens: @mode; -o-hyphens: @mode;
hyphens: @mode; hyphens: @mode;
} }
@@ -235,8 +225,7 @@
// //
// Creates two color stops, start and end, by specifying a color and position for each color stop. // Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below. // Color stops are not available in IE9 and below.
.horizontal(@start-color: #555; @start-percent: 0%; @end-color: #333; @end-percent: 100%) { .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-color: @end-color;
background-image: -webkit-gradient(linear, @start-percent top, @end-percent top, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+ background-image: -webkit-gradient(linear, @start-percent top, @end-percent top, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1+, Chrome 10+ background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1+, Chrome 10+
background-image: -moz-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // FF 3.6+ background-image: -moz-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // FF 3.6+
@@ -249,8 +238,7 @@
// //
// Creates two color stops, start and end, by specifying a color and position for each color stop. // Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below. // Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @start-percent: 0%; @end-color: #333; @end-percent: 100%) { .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-color: @end-color;
background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+ background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @start-color, @start-percent, @end-color, @end-percent); // Safari 5.1+, Chrome 10+ background-image: -webkit-linear-gradient(top, @start-color, @start-percent, @end-color, @end-percent); // Safari 5.1+, Chrome 10+
background-image: -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // FF 3.6+ background-image: -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // FF 3.6+
@@ -259,15 +247,13 @@
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
} }
.directional(@start-color: #555, @end-color: #333, @deg: 45deg) { .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
background-color: @end-color;
background-repeat: repeat-x; background-repeat: repeat-x;
background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1+, Chrome 10+ background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1+, Chrome 10+
background-image: -moz-linear-gradient(@deg, @start-color, @end-color); // FF 3.6+ background-image: -moz-linear-gradient(@deg, @start-color, @end-color); // FF 3.6+
background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10 background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10
} }
.horizontal-three-colors(@start-color: #00b3ee, @mid-color: #7a43b6, @color-stop: 50%, @end-color: #c3325f) { .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-color: mix(@mid-color, @end-color, 80%);
background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color)); background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color));
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: -moz-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); background-image: -moz-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
@@ -275,9 +261,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
} }
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
.vertical-three-colors(@start-color: #00b3ee, @mid-color: #7a43b6, @color-stop: 50%, @end-color: #c3325f) {
background-color: mix(@mid-color, @end-color, 80%);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color)); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color));
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color); background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -moz-linear-gradient(top, @start-color, @mid-color @color-stop, @end-color); background-image: -moz-linear-gradient(top, @start-color, @mid-color @color-stop, @end-color);
@@ -285,16 +269,14 @@
background-repeat: no-repeat; background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
} }
.radial(@inner-color: #555, @outer-color: #333) { .radial(@inner-color: #555; @outer-color: #333) {
background-color: @outer-color;
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@inner-color), to(@outer-color)); background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@inner-color), to(@outer-color));
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color); background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
background-image: -moz-radial-gradient(circle, @inner-color, @outer-color); background-image: -moz-radial-gradient(circle, @inner-color, @outer-color);
background-image: radial-gradient(circle, @inner-color, @outer-color); background-image: radial-gradient(circle, @inner-color, @outer-color);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.striped(@color: #555, @angle: 45deg) { .striped(@color: #555; @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-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: -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: -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);
@@ -316,7 +298,7 @@
// -------------------------------------------------- // --------------------------------------------------
// Short retina mixin for setting background-image and -size // Short retina mixin for setting background-image and -size
.img-retina(@file-1x, @file-2x, @width-1x, @height-1x) { .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}"); background-image: url("@{file-1x}");
@media @media
@@ -345,9 +327,28 @@
background-color: @color; background-color: @color;
} }
// Panels
// -------------------------
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
border-color: @border;
.panel-heading {
color: @heading-text-color;
background-color: @heading-bg-color;
border-color: @heading-border;
+ .panel-collapse .panel-body {
border-top-color: @border;
}
}
.panel-footer {
+ .panel-collapse .panel-body {
border-bottom-color: @border;
}
}
}
// Alerts // Alerts
// ------------------------- // -------------------------
.alert-variant(@background, @border, @text-color) { .alert-variant(@background; @border; @text-color) {
background-color: @background; background-color: @background;
border-color: @border; border-color: @border;
color: @text-color; color: @text-color;
@@ -359,11 +360,11 @@
} }
} }
// Button pseudo states // Button variants
// ------------------------- // -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active, // Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons // and disabled options for all buttons
.btn-pseudo-states(@color, @background, @border) { .button-variant(@color; @background; @border) {
color: @color; color: @color;
background-color: @background; background-color: @background;
border-color: @border; border-color: @border;
@@ -372,8 +373,9 @@
&:focus, &:focus,
&:active, &:active,
&.active { &.active {
background-color: darken(@background, 5%); color: @color;
border-color: darken(@border, 10%); background-color: darken(@background, 8%);
border-color: darken(@border, 12%);
} }
&.disabled, &.disabled,
@@ -390,6 +392,39 @@
} }
} }
// Button sizes
// -------------------------
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
}
// Pagination
// -------------------------
.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
> li {
> a,
> span {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius);
}
}
}
}
// Labels // Labels
// ------------------------- // -------------------------
.label-variant(@color) { .label-variant(@color) {
@@ -405,7 +440,7 @@
// Navbar vertical align // Navbar vertical align
// ------------------------- // -------------------------
// Vertically center elements in the navbar. // Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin. // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
.navbar-vertical-align(@element-height) { .navbar-vertical-align(@element-height) {
margin-top: ((@navbar-height - @element-height) / 2); margin-top: ((@navbar-height - @element-height) / 2);
margin-bottom: ((@navbar-height - @element-height) / 2); margin-bottom: ((@navbar-height - @element-height) / 2);
@@ -448,65 +483,34 @@
} }
// Creates a wrapper for a series of columns // Creates a wrapper for a series of columns
.make-row() { .make-row(@gutter: @grid-gutter-width) {
// Then clear the floated columns // Then clear the floated columns
.clearfix(); .clearfix();
@media (min-width: @screen-small) { .container & {
margin-left: (@grid-gutter-width / -2); @media (min-width: @screen-small) {
margin-right: (@grid-gutter-width / -2); margin-left: (@gutter / -2);
margin-right: (@gutter / -2);
}
} }
// Negative margin nested rows out to align the content of columns // Negative margin nested rows out to align the content of columns
.row { .row {
margin-left: (@grid-gutter-width / -2); margin-left: (@gutter / -2);
margin-right: (@grid-gutter-width / -2); margin-right: (@gutter / -2);
} }
} }
// Generate the columns // Generate the extra small columns
.make-column(@columns) { .make-xs-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
// Calculate width based on number of columns available
@media (min-width: @grid-float-breakpoint) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
// Generate the column offsets
.make-column-offset(@columns) {
@media (min-width: @grid-float-breakpoint) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-column-push(@columns) {
@media (min-width: @grid-float-breakpoint) {
left: percentage((@columns / @grid-columns));
}
}
.make-column-pull(@columns) {
@media (min-width: @grid-float-breakpoint) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the small columns
.make-small-column(@columns) {
position: relative; position: relative;
float: left; float: left;
// Prevent columns from collapsing when empty // Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding // Inner gutter via padding
padding-left: (@grid-gutter-width / 2); padding-left: (@gutter / 2);
padding-right: (@grid-gutter-width / 2); padding-right: (@gutter / 2);
@max-width: (@grid-float-breakpoint - 1); @max-width: (@screen-small - 1);
// Calculate width based on number of columns available // Calculate width based on number of columns available
@media (max-width: @max-width) { @media (max-width: @max-width) {
@@ -514,13 +518,112 @@
} }
} }
// Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-small) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
// Generate the small column offsets
.make-sm-column-offset(@columns) {
@media (min-width: @screen-small) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-push(@columns) {
@media (min-width: @screen-small) {
left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-pull(@columns) {
@media (min-width: @screen-small) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-medium) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
// Generate the large column offsets
.make-md-column-offset(@columns) {
@media (min-width: @screen-medium) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-md-column-push(@columns) {
@media (min-width: @screen-medium) {
left: percentage((@columns / @grid-columns));
}
}
.make-md-column-pull(@columns) {
@media (min-width: @screen-medium) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-large) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
// Generate the large column offsets
.make-lg-column-offset(@columns) {
@media (min-width: @screen-large) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-push(@columns) {
@media (min-width: @screen-large) {
left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-pull(@columns) {
@media (min-width: @screen-large) {
right: percentage((@columns / @grid-columns));
}
}
// Form validation states // Form validation states
// //
// Used in forms.less to generate the form validation CSS for warnings, errors, // Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes. // and successes.
.form-control-validation(@text-color: #555, @border-color: #ccc, @background-color: #f5f5f5) { .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
// Color the label and help text // Color the label and help text
.help-block, .help-block,
.control-label { .control-label {
@@ -528,7 +631,6 @@
} }
// Set the border and box shadow on specific inputs to match // Set the border and box shadow on specific inputs to match
.form-control { .form-control {
padding-right: 32px; // to account for the feedback icon
border-color: @border-color; border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
&:focus { &:focus {
@@ -544,3 +646,48 @@
background-color: @background-color; background-color: @background-color;
} }
} }
// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `@input-focus-border` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.
.form-control-focus(@color: @input-border-focus) {
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
&:focus {
border-color: @color;
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
height: @input-height;
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
select& {
height: @input-height;
line-height: @input-height;
}
textarea& {
height: auto;
}
}

View File

@@ -29,7 +29,7 @@
.translate(0, -25%); .translate(0, -25%);
.transition-transform(~"0.3s ease-out"); .transition-transform(~"0.3s ease-out");
} }
&.fade.in .modal-dialog { .translate(0, 0)} &.in .modal-dialog { .translate(0, 0)}
} }
// Shell div to position the modal with bottom padding // Shell div to position the modal with bottom padding
@@ -49,7 +49,7 @@
border: 1px solid @modal-content-border-color; border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large; border-radius: @border-radius-large;
.box-shadow(0 3px 9px rgba(0,0,0,.5)); .box-shadow(0 3px 9px rgba(0,0,0,.5));
.background-clip(padding-box); background-clip: padding-box;
// Remove focus outline from opened modal // Remove focus outline from opened modal
outline: none; outline: none;
} }
@@ -65,7 +65,7 @@
background-color: @modal-backdrop-bg; background-color: @modal-backdrop-bg;
// Fade for backdrop // Fade for backdrop
&.fade { .opacity(0); } &.fade { .opacity(0); }
&.fade.in { .opacity(.5); } &.in { .opacity(.5); }
} }
// Modal header // Modal header

View File

@@ -2,34 +2,186 @@
// Navbars // Navbars
// -------------------------------------------------- // --------------------------------------------------
// Wrapper and base class // Wrapper and base class
//
// Provide a static navbar from which we expand to create full-width, fixed, and
// other navbar variations.
.navbar { .navbar {
position: relative; position: relative;
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode) min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
margin-bottom: 20px; margin-bottom: @navbar-margin-bottom;
padding-left: @navbar-padding-horizontal;
padding-right: @navbar-padding-horizontal;
background-color: @navbar-bg; background-color: @navbar-bg;
border-radius: @border-radius-base; border: 1px solid @navbar-border;
// Prevent floats from breaking the navbar // Prevent floats from breaking the navbar
.clearfix(); .clearfix();
@media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius;
}
} }
// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.
.navbar-header {
padding-left: @navbar-padding-horizontal;
padding-right: @navbar-padding-horizontal;
.clearfix();
@media (min-width: @grid-float-breakpoint) {
float: left;
}
}
// Navbar collapse (body)
//
// Group your navbar content into this for easy collapsing and expanding across
// various device sizes. By default, this content is collapsed when <768px, but
// will expand past that for a horizontal display.
//
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
// vertically and include a `max-height` to overflow in case you have too much
// content for the user's viewport.
.navbar-collapse {
padding: 5px @navbar-padding-horizontal;
border-top: 1px solid darken(@navbar-bg, 7%);
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
// Clear floated elements and prevent collapsing of padding
.clearfix();
// This is not automatically added to the `.navbar-fixed-top` because it causes
// z-index bugs in iOS7 (possibly earlier).
max-height: 340px;
overflow-x: visible;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
@media (min-width: @grid-float-breakpoint) {
width: auto;
padding-top: 0;
padding-bottom: 0;
border-top: 0;
box-shadow: none;
}
}
//
// Navbar alignment options
//
// Display the navbar across the entirity of the page or fixed it to the top or
// bottom of the page.
// Static top (unfixed, but 100% wide) navbar
.navbar-static-top {
@media (min-width: @grid-float-breakpoint) {
border-width: 0 0 1px;
border-radius: 0;
}
}
// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: @zindex-navbar-fixed;
border-width: 0 0 1px;
// Undo the rounded corners
@media (min-width: @grid-float-breakpoint) {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0; // override .navbar defaults
}
// Brand/project name
.navbar-brand {
float: left;
margin-right: (@navbar-padding-horizontal / 2);
padding-top: @navbar-padding-vertical;
padding-bottom: @navbar-padding-vertical;
font-size: @font-size-large;
line-height: @line-height-computed;
color: @navbar-brand-color;
&:hover,
&:focus {
color: @navbar-brand-hover-color;
text-decoration: none;
background-color: @navbar-brand-hover-bg;
}
}
// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.
.navbar-toggle {
position: relative;
float: right;
padding: 9px 10px;
.navbar-vertical-align(34px);
background-color: transparent;
border: 1px solid @navbar-toggle-border-color;
border-radius: @border-radius-base;
&:hover,
&:focus {
background-color: @navbar-toggle-hover-bg;
}
// Bars
.icon-bar {
display: block;
width: 22px;
height: 2px;
background-color: @navbar-toggle-icon-bar-bg;
border-radius: 1px;
}
.icon-bar + .icon-bar {
margin-top: 4px;
}
}
// Navbar nav links // Navbar nav links
// ------------------------- //
// Builds on top of the `.nav` components with it's own modifier class to make
// the nav the full height of the horizontal nav (above 768px).
.navbar-nav { .navbar-nav {
// Space out from .navbar .brand and .btn-navbar when stacked in mobile views margin-left: -@navbar-padding-horizontal;
margin-top: 10px; margin-right: -@navbar-padding-horizontal;
margin-bottom: 15px;
@media (min-width: @grid-float-breakpoint) {
margin-left: 0;
margin-right: 0;
}
> li > a { > li > a {
padding-top: ((@navbar-height - @line-height-computed) / 2); padding-top: 10px;
padding-bottom: ((@navbar-height - @line-height-computed) / 2); padding-bottom: 10px;
color: @navbar-link-color; color: @navbar-link-color;
line-height: 20px; line-height: @line-height-computed;
border-radius: @border-radius-base;
&:hover, &:hover,
&:focus { &:focus {
color: @navbar-link-hover-color; color: @navbar-link-hover-color;
@@ -53,115 +205,110 @@
} }
} }
// Right aligned contents @media (max-width: @screen-phone-max) {
// Make them full width first so that they align properly on mobile // Dropdowns get custom display
&.pull-right { .open .dropdown-menu {
width: 100%; position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
box-shadow: none;
> li > a,
.dropdown-header {
padding: 5px 15px 5px 25px;
}
> li > a {
color: @navbar-link-color;
line-height: @line-height-computed;
&:hover,
&:focus {
color: @navbar-link-hover-color;
background-color: @navbar-link-hover-bg;
background-image: none;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-link-active-color;
background-color: @navbar-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-link-disabled-color;
background-color: @navbar-link-disabled-bg;
}
}
}
} }
} }
// Component alignment
// //
// Navbar alignment options // Repurpose the pull utilities as their own navbar utilities to avoid specifity
// -------------------------------------------------- // issues with parents and chaining. Only do this when the navbar is uncollapsed
// though so that navbar contents properly stack and align in mobile.
// Static navbar @media (min-width: @grid-float-breakpoint) {
.navbar-static-top { .navbar-left { .pull-left(); }
border-radius: 0; .navbar-right { .pull-right(); }
} }
// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: @zindex-navbar-fixed;
border-radius: 0;
}
.navbar-fixed-top {
top: 0;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0; // override .navbar defaults
}
//
// Navbar optional components
// --------------------------------------------------
// Brand/project name
.navbar-brand {
display: block;
max-width: 200px;
margin-left: auto;
margin-right: auto;
padding: @navbar-padding-vertical @navbar-padding-horizontal;
font-size: @font-size-large;
font-weight: 500;
line-height: @line-height-computed;
color: @navbar-brand-color;
text-align: center;
&:hover,
&:focus {
color: @navbar-brand-hover-color;
text-decoration: none;
background-color: @navbar-brand-hover-bg;
}
}
// Collapsible navbar toggle
.navbar-toggle {
position: absolute;
top: floor((@navbar-height - 32) / 2);
right: 10px;
width: 48px;
height: 32px;
padding: 8px 12px;
background-color: transparent;
border: 1px solid @navbar-toggle-border-color;
border-radius: @border-radius-base;
&:hover,
&:focus {
background-color: @navbar-toggle-hover-bg;
}
// Bars
.icon-bar {
display: block;
width: 22px;
height: 2px;
background-color: @navbar-toggle-icon-bar-bg;
border-radius: 1px;
}
.icon-bar + .icon-bar {
margin-top: 4px;
}
}
// Navbar form // Navbar form
//
// Extension of the `.form-inline` with some extra flavor for optimum display in
// our navbars.
.navbar-form { .navbar-form {
margin-left: -@navbar-padding-horizontal;
margin-right: -@navbar-padding-horizontal;
padding: 10px @navbar-padding-horizontal;
border-top: 1px solid darken(@navbar-bg, 7%);
border-bottom: 1px solid darken(@navbar-bg, 7%);
// Mixin behavior for optimum display
.form-inline(); .form-inline();
.navbar-vertical-align(@input-height-base); // Vertically center in navbar
.form-group {
@media (max-width: @screen-phone-max) {
margin-bottom: 5px;
}
}
// Vertically center in expanded, horizontal navbar
.navbar-vertical-align(@input-height-base);
// Undo 100% width for pull classes
@media (min-width: @grid-float-breakpoint) {
width: auto;
border: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
}
} }
// Dropdown menus // Dropdown menus
// Menu position and menu carets // Menu position and menu carets
.navbar-nav > li > .dropdown-menu { .navbar-nav > li > .dropdown-menu {
margin-top: 0; margin-top: 0;
border-top-left-radius: 0; .border-top-radius(0);
border-top-right-radius: 0;
} }
// Menu position and menu caret support for dropups via extra dropup class // Menu position and menu caret support for dropups via extra dropup class
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
border-bottom-left-radius: 0; .border-bottom-radius(0);
border-bottom-right-radius: 0;
} }
// Dropdown menu items and carets // Dropdown menu items and carets
@@ -206,6 +353,7 @@
.navbar-inverse { .navbar-inverse {
background-color: @navbar-inverse-bg; background-color: @navbar-inverse-bg;
border-color: @navbar-inverse-border;
.navbar-brand { .navbar-brand {
color: @navbar-inverse-brand-color; color: @navbar-inverse-brand-color;
@@ -260,6 +408,10 @@
} }
} }
.navbar-collapse {
border-top-color: darken(@navbar-inverse-bg, 7%);
}
// Dropdowns // Dropdowns
.navbar-nav { .navbar-nav {
> .open > a { > .open > a {
@@ -288,7 +440,41 @@
} }
} }
} }
@media (max-width: @screen-phone-max) {
// Dropdowns get custom display
.open .dropdown-menu {
> .dropdown-header {
border-color: @navbar-inverse-border;
}
> li > a {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
background-color: @navbar-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-active-color;
background-color: @navbar-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
background-color: @navbar-inverse-link-disabled-bg;
}
}
}
}
} }
} }
@@ -298,11 +484,6 @@
@media screen and (min-width: @grid-float-breakpoint) { @media screen and (min-width: @grid-float-breakpoint) {
.navbar-brand {
float: left;
margin-left: -(@navbar-padding-horizontal);
margin-right: 5px;
}
.navbar-nav { .navbar-nav {
float: left; float: left;
// undo margin to make nav extend full height of navbar // undo margin to make nav extend full height of navbar
@@ -312,14 +493,10 @@
> li { > li {
float: left; float: left;
> a { > a {
border-radius: 0; padding-top: ((@navbar-height - @line-height-computed) / 2);
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
} }
} }
&.pull-right {
float: right;
width: auto;
}
} }
// Required to make the collapsing navbar work on regular desktops // Required to make the collapsing navbar work on regular desktops
@@ -329,9 +506,10 @@
left: auto; left: auto;
display: none; display: none;
} }
.nav-collapse.collapse { .navbar-collapse.collapse {
display: block !important; display: block !important;
height: auto !important; height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important; overflow: visible !important;
} }
@@ -354,6 +532,7 @@
// Add a class to make any element properly align itself vertically within the navbars. // Add a class to make any element properly align itself vertically within the navbars.
.navbar-text { .navbar-text {
float: left;
.navbar-vertical-align(@line-height-computed); .navbar-vertical-align(@line-height-computed);
} }

View File

@@ -56,23 +56,19 @@
} }
} }
// Redeclare pull classes because of specificity
// Todo: consider making these utilities !important to avoid this bullshit
> .pull-right {
float: right;
}
// Dividers (basically an hr) within the dropdown // Dividers (basically an hr) within the dropdown
.nav-divider { .nav-divider {
.nav-divider(); .nav-divider();
} }
// Prevent IE8 from misplacing imgs
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
> li > a > img {
max-width: none;
}
} }
// Nav variations
// --------------------------------------------------
// Tabs // Tabs
// ------------------------- // -------------------------
@@ -154,6 +150,10 @@
} }
} }
// Nav variations
// --------------------------------------------------
// Justified nav links // Justified nav links
// ------------------------- // -------------------------
@@ -181,11 +181,9 @@
> .active > a { > .active > a {
border-bottom-color: @nav-tabs-justified-active-link-border-color; border-bottom-color: @nav-tabs-justified-active-link-border-color;
} }
} }
// Tabbable tabs // Tabbable tabs
// ------------------------- // -------------------------

View File

@@ -6,13 +6,13 @@
padding-left: 0; padding-left: 0;
margin: @line-height-computed 0; margin: @line-height-computed 0;
border-radius: @border-radius-base; border-radius: @border-radius-base;
> li { > li {
display: inline; // Remove list-style and block-level defaults display: inline; // Remove list-style and block-level defaults
> a, > a,
> span { > span {
float: left; // Collapse white-space float: left; // Collapse white-space
padding: 4px 12px; padding: @padding-base-vertical @padding-base-horizontal;
line-height: @line-height-base; line-height: @line-height-base;
text-decoration: none; text-decoration: none;
background-color: @pagination-bg; background-color: @pagination-bg;
@@ -33,7 +33,7 @@
} }
} }
} }
> li > a:hover, > li > a:hover,
> li > a:focus, > li > a:focus,
> .active > a, > .active > a,
@@ -45,7 +45,7 @@
color: @pagination-active-color; color: @pagination-active-color;
cursor: default; cursor: default;
} }
> .disabled { > .disabled {
> span, > span,
> a, > a,
@@ -62,47 +62,11 @@
// -------------------------------------------------- // --------------------------------------------------
// Large // Large
.pagination-large { .pagination-lg {
> li { .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
> a,
> span {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius-large);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius-large);
}
}
}
} }
// Small // Small
.pagination-small { .pagination-sm {
> li { .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
> a,
> span {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius-small);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius-small);
}
}
}
} }

View File

@@ -5,22 +5,54 @@
// Base class // Base class
.panel { .panel {
padding: 15px; margin-bottom: @line-height-computed;
margin-bottom: 20px;
background-color: @panel-bg; background-color: @panel-bg;
border: 1px solid @panel-border; border: 1px solid @panel-border;
border-radius: @panel-border-radius; border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05)); .box-shadow(0 1px 1px rgba(0,0,0,.05));
} }
// Panel contents
.panel-body {
padding: 15px;
}
// List groups in panels
//
// By default, space out list group content from panel headings to account for
// any kind of custom content between the two.
.panel {
.list-group {
margin-bottom: 0;
.list-group-item {
border-width: 1px 0;
// Remove border radius for top one
&:first-child {
.border-top-radius(0);
}
// But keep it for the last one
&:last-child {
border-bottom: 0;
}
}
}
}
// Collapse space between when there's no additional content.
.panel-heading + .list-group {
.list-group-item:first-child {
border-top-width: 0;
}
}
// Optional heading // Optional heading
.panel-heading { .panel-heading {
margin: -15px -15px 15px;
padding: 10px 15px; padding: 10px 15px;
background-color: @panel-heading-bg; background-color: @panel-heading-bg;
border-bottom: 1px solid @panel-border; border-bottom: 1px solid @panel-border;
border-top-left-radius: (@panel-border-radius - 1); .border-top-radius(@panel-border-radius - 1);
border-top-right-radius: (@panel-border-radius - 1);
} }
// Within heading, strip any `h*` tag of it's default margins for spacing. // Within heading, strip any `h*` tag of it's default margins for spacing.
@@ -28,75 +60,69 @@
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
font-size: (@font-size-base * 1.25); font-size: (@font-size-base * 1.25);
font-weight: 500; > a {
color: inherit;
}
} }
// Optional footer (stays gray in every modifier class) // Optional footer (stays gray in every modifier class)
.panel-footer { .panel-footer {
margin: 15px -15px -15px;
padding: 10px 15px; padding: 10px 15px;
background-color: @panel-footer-bg; background-color: @panel-footer-bg;
border-top: 1px solid @panel-border; border-top: 1px solid @panel-border;
border-bottom-left-radius: (@panel-border-radius - 1); .border-bottom-radius(@panel-border-radius - 1);
border-bottom-right-radius: (@panel-border-radius - 1);
} }
// Collapsable panels (aka, accordion)
//
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
// the help of our collapse JavaScript plugin.
.panel-group {
// Tighten up margin so it's only between panels
.panel {
margin-bottom: 0;
border-radius: @panel-border-radius;
overflow: hidden; // crop contents when collapsed
+ .panel {
margin-top: 5px;
}
}
.panel-heading {
border-bottom: 0;
+ .panel-collapse .panel-body {
border-top: 1px solid @panel-border;
}
}
.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {
border-bottom: 1px solid @panel-border;
}
}
// New subcomponent for wrapping collapsable content for proper animations
.panel-collapse {
}
}
// Contextual variations // Contextual variations
.panel-primary { .panel-primary {
border-color: @panel-primary-border; .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
.panel-heading {
color: @panel-primary-text;
background-color: @panel-primary-heading-bg;
border-color: @panel-primary-border;
}
} }
.panel-success { .panel-success {
border-color: @panel-success-border; .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
.panel-heading {
color: @panel-success-text;
background-color: @panel-success-heading-bg;
border-color: @panel-success-border;
}
} }
.panel-warning { .panel-warning {
border-color: @panel-warning-border; .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
.panel-heading {
color: @panel-warning-text;
background-color: @panel-warning-heading-bg;
border-color: @panel-warning-border;
}
} }
.panel-danger { .panel-danger {
border-color: @panel-danger-border; .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
.panel-heading {
color: @panel-danger-text;
background-color: @panel-danger-heading-bg;
border-color: @panel-danger-border;
}
} }
.panel-info { .panel-info {
border-color: @panel-info-border; .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
.panel-heading {
color: @panel-info-text;
background-color: @panel-info-heading-bg;
border-color: @panel-info-border;
}
}
// List groups in panels
.list-group-flush {
margin: 15px -15px -15px;
.list-group-item {
border-width: 1px 0;
// Remove border radius for top one
&:first-child {
.border-top-radius(0);
}
// But keep it for the last one
&:last-child {
border-bottom: 0;
}
}
} }

View File

@@ -13,8 +13,6 @@
padding: 1px; padding: 1px;
text-align: left; // Reset given new insertion method text-align: left; // Reset given new insertion method
background-color: @popover-bg; background-color: @popover-bg;
-webkit-bg-clip: padding-box;
-moz-bg-clip: padding;
background-clip: padding-box; background-clip: padding-box;
border: 1px solid @popover-fallback-border-color; border: 1px solid @popover-fallback-border-color;
border: 1px solid @popover-border-color; border: 1px solid @popover-border-color;

View File

@@ -18,19 +18,13 @@
to { background-position: 0 0; } to { background-position: 0 0; }
} }
// IE9
@-ms-keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Opera // Opera
@-o-keyframes progress-bar-stripes { @-o-keyframes progress-bar-stripes {
from { background-position: 0 0; } from { background-position: 0 0; }
to { background-position: 40px 0; } to { background-position: 40px 0; }
} }
// Spec // Spec and IE10+
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { background-position: 40px 0; } from { background-position: 40px 0; }
to { background-position: 0 0; } to { background-position: 0 0; }
@@ -67,7 +61,7 @@
// Striped bars // Striped bars
.progress-striped .progress-bar { .progress-striped .progress-bar {
#gradient > .striped(@progress-bar-bg); #gradient > .striped(@progress-bar-bg);
.background-size(40px 40px); background-size: 40px 40px;
} }
// Call animation for the active one // Call animation for the active one

View File

@@ -35,70 +35,100 @@
// Visibility utilities // Visibility utilities
// For Phones .visible-xs {
.visible-sm {
.responsive-visibility(); .responsive-visibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-invisibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-invisibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-invisibility();
}
}
.visible-sm {
.responsive-invisibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-visibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-invisibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-invisibility();
}
} }
.visible-md { .visible-md {
.responsive-invisibility(); .responsive-invisibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-invisibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-visibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-invisibility();
}
} }
.visible-lg { .visible-lg {
.responsive-invisibility(); .responsive-invisibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-invisibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-invisibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-visibility();
}
} }
.hidden-sm { .hidden-xs {
.responsive-invisibility(); .responsive-invisibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-visibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-visibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-visibility();
}
}
.hidden-sm {
.responsive-visibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-invisibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-visibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-visibility();
}
} }
.hidden-md { .hidden-md {
.responsive-visibility(); .responsive-visibility();
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.responsive-visibility();
}
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-invisibility();
}
@media (min-width: @screen-large-desktop) {
.responsive-visibility();
}
} }
.hidden-lg { .hidden-lg {
.responsive-visibility(); .responsive-visibility();
} @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
// Tablets & small desktops only
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
.visible-sm {
.responsive-invisibility();
}
.visible-md {
.responsive-visibility(); .responsive-visibility();
} }
.visible-lg { @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
.responsive-invisibility();
}
.hidden-sm {
.responsive-visibility(); .responsive-visibility();
} }
.hidden-md { @media (min-width: @screen-large-desktop) {
.responsive-invisibility();
}
.hidden-lg {
.responsive-visibility();
}
}
// For desktops
@media (min-width: @screen-desktop) {
.visible-sm {
.responsive-invisibility();
}
.visible-md {
.responsive-invisibility();
}
.visible-lg {
.responsive-visibility();
}
.hidden-sm {
.responsive-visibility();
}
.hidden-md {
.responsive-visibility();
}
.hidden-lg {
.responsive-invisibility(); .responsive-invisibility();
} }
} }

View File

@@ -6,7 +6,9 @@
// Reset the box-sizing // Reset the box-sizing
// ------------------------- // -------------------------
* { *,
*:before,
*:after {
.box-sizing(border-box); .box-sizing(border-box);
} }
@@ -79,7 +81,7 @@ img {
// Perfect circle // Perfect circle
.img-circle { .img-circle {
border-radius: 500px; // crank the border-radius so it works with most reasonably sized images border-radius: 50%; // set radius in percents
} }
@@ -93,3 +95,17 @@ hr {
border-top: 1px solid @hr-border; border-top: 1px solid @hr-border;
} }
// Only display content to screen readers
// See: http://a11yproject.com/posts/how-to-hide-content/
// -------------------------
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
border: 0;
}

View File

@@ -162,7 +162,7 @@ table {
> th.active, > th.active,
&.active > td, &.active > td,
&.active > th { &.active > th {
background-color: @table-bg-hover; background-color: @table-bg-active;
} }
> td.success, > td.success,
> th.success, > th.success,

View File

@@ -10,7 +10,7 @@
// Can be `a`, `div`, or `img` // Can be `a`, `div`, or `img`
.thumbnail, .thumbnail,
.img-thumbnail { .img-thumbnail {
padding: 4px; padding: @thumbnail-padding;
line-height: @line-height-base; line-height: @line-height-base;
background-color: @thumbnail-bg; background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border; border: 1px solid @thumbnail-border;
@@ -37,6 +37,6 @@ a.thumbnail:focus {
margin-right: auto; margin-right: auto;
} }
.thumbnail .caption { .thumbnail .caption {
padding: 9px; padding: @thumbnail-caption-padding;
color: @thumbnail-caption-color; color: @thumbnail-caption-color;
} }

View File

@@ -13,7 +13,7 @@
line-height: 1.4; line-height: 1.4;
.opacity(0); .opacity(0);
&.in { .opacity(1); } &.in { .opacity(.9); }
&.top { margin-top: -3px; padding: 5px 0; } &.top { margin-top: -3px; padding: 5px 0; }
&.right { margin-left: 3px; padding: 0 5px; } &.right { margin-left: 3px; padding: 0 5px; }
&.bottom { margin-top: 3px; padding: 5px 0; } &.bottom { margin-top: 3px; padding: 5px 0; }

View File

@@ -141,18 +141,25 @@ dt {
dd { dd {
margin-left: 0; // Undo browser default margin-left: 0; // Undo browser default
} }
// Horizontal layout (like forms)
.dl-horizontal { // Horizontal description lists
dt { //
float: left; // Defaults to being stacked without any of the below styles applied, until the
width: (@component-offset-horizontal - 20); // grid breakpoint is reached (default of ~768px).
clear: left;
text-align: right; @media (min-width: @grid-float-breakpoint) {
.text-overflow(); .dl-horizontal {
} dt {
dd { float: left;
.clearfix(); // Clear the floated `dt` if an empty `dd` is present width: (@component-offset-horizontal - 20);
margin-left: @component-offset-horizontal; clear: left;
text-align: right;
.text-overflow();
}
dd {
margin-left: @component-offset-horizontal;
.clearfix(); // Clear the floated `dt` if an empty `dd` is present
}
} }
} }
@@ -195,7 +202,6 @@ blockquote {
// Float right with text-align: right // Float right with text-align: right
&.pull-right { &.pull-right {
float: right;
padding-right: 15px; padding-right: 15px;
padding-left: 0; padding-left: 0;
border-right: 5px solid @blockquote-border-color; border-right: 5px solid @blockquote-border-color;

View File

@@ -10,10 +10,10 @@
.clearfix(); .clearfix();
} }
.pull-right { .pull-right {
float: right; float: right !important;
} }
.pull-left { .pull-left {
float: left; float: left !important;
} }

View File

@@ -60,21 +60,26 @@
// ------------------------- // -------------------------
// Based on 14px font-size and 1.428 line-height (~20px to start) // Based on 14px font-size and 1.428 line-height (~20px to start)
@padding-base-vertical: 8px; @padding-base-vertical: 6px;
@padding-base-horizontal: 12px; @padding-base-horizontal: 12px;
@padding-large-vertical: 14px; @padding-large-vertical: 10px;
@padding-large-horizontal: 16px; @padding-large-horizontal: 16px;
@padding-small-vertical: 5px; @padding-small-vertical: 5px;
@padding-small-horizontal: 10px; @padding-small-horizontal: 10px;
@line-height-large: 1.33;
@line-height-small: 1.5;
@border-radius-base: 4px; @border-radius-base: 4px;
@border-radius-large: 6px; @border-radius-large: 6px;
@border-radius-small: 3px; @border-radius-small: 3px;
@component-active-bg: @brand-primary; @component-active-bg: @brand-primary;
@caret-width-base: 4px;
@caret-width-large: 5px;
// Tables // Tables
// ------------------------- // -------------------------
@@ -93,31 +98,33 @@
// Buttons // Buttons
// ------------------------- // -------------------------
@btn-default-color: #fff; @btn-font-weight: bold;
@btn-default-bg: #474949;
@btn-default-border: @btn-default-bg;
@btn-primary-color: @btn-default-color; @btn-default-color: #333;
@btn-default-bg: #fff;
@btn-default-border: #ccc;
@btn-primary-color: #fff;
@btn-primary-bg: @brand-primary; @btn-primary-bg: @brand-primary;
@btn-primary-border: @btn-primary-bg; @btn-primary-border: darken(@btn-primary-bg, 5%);
@btn-success-color: @btn-default-color; @btn-success-color: #fff;
@btn-success-bg: @brand-success; @btn-success-bg: @brand-success;
@btn-success-border: @btn-success-bg; @btn-success-border: darken(@btn-success-bg, 5%);
@btn-warning-color: @btn-default-color; @btn-warning-color: #fff;
@btn-warning-bg: @brand-warning; @btn-warning-bg: @brand-warning;
@btn-warning-border: @btn-warning-bg; @btn-warning-border: darken(@btn-warning-bg, 5%);
@btn-danger-color: @btn-default-color; @btn-danger-color: #fff;
@btn-danger-bg: @brand-danger; @btn-danger-bg: @brand-danger;
@btn-danger-border: @btn-danger-bg; @btn-danger-border: darken(@btn-danger-bg, 5%);
@btn-info-color: @btn-default-color; @btn-info-color: #fff;
@btn-info-bg: @brand-info; @btn-info-bg: @brand-info;
@btn-info-border: @btn-info-bg; @btn-info-border: darken(@btn-info-bg, 5%);
@btn-hover-color: @btn-default-color; @btn-link-disabled-color: @gray-light;
// Forms // Forms
@@ -126,17 +133,21 @@
@input-bg: #fff; @input-bg: #fff;
@input-bg-disabled: @gray-lighter; @input-bg-disabled: @gray-lighter;
@input-color: @gray;
@input-border: #ccc; @input-border: #ccc;
@input-border-radius: @border-radius-base; @input-border-radius: @border-radius-base;
@input-border-focus: #66afe9;
@input-color-placeholder: @gray-light; @input-color-placeholder: @gray-light;
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); @input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
@input-height-large: (ceil(@font-size-large * @line-height-base) + (@padding-large-vertical * 2) + 2); @input-height-large: (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
@input-height-small: (ceil(@font-size-small * @line-height-base) + (@padding-small-vertical * 2) + 2); @input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
@legend-color: @gray-dark;
@legend-border-color: #e5e5e5; @legend-border-color: #e5e5e5;
@input-group-addon-bg: @gray-lighter;
@input-group-addon-border-color: @input-border; @input-group-addon-border-color: @input-border;
@@ -155,6 +166,10 @@
@dropdown-link-hover-color: #fff; @dropdown-link-hover-color: #fff;
@dropdown-link-hover-bg: @dropdown-link-active-bg; @dropdown-link-hover-bg: @dropdown-link-active-bg;
@dropdown-link-disabled-color: @gray-light;
@dropdown-header-color: @gray-light;
@dropdown-caret-color: #000; @dropdown-caret-color: #000;
@@ -174,15 +189,54 @@
@zindex-modal-background: 1040; @zindex-modal-background: 1040;
@zindex-modal: 1050; @zindex-modal: 1050;
// Media queries breakpoints
// --------------------------------------------------
// Extra small screen / phone
@screen-xsmall: 480px;
@screen-phone: @screen-xsmall;
// Small screen / tablet
@screen-small: 768px;
@screen-tablet: @screen-small;
// Medium screen / desktop
@screen-medium: 992px;
@screen-desktop: @screen-medium;
// Large screen / wide desktop
@screen-large: 1200px;
@screen-large-desktop: @screen-large;
// So media queries don't overlap when required, provide a maximum
@screen-phone-max: (@screen-small - 1);
@screen-small-max: (@screen-medium - 1);
@screen-tablet-max: (@screen-desktop - 1);
@screen-desktop-max: (@screen-large-desktop - 1);
// Grid system
// --------------------------------------------------
// Number of columns in the grid system
@grid-columns: 12;
// Padding, to be divided by two and applied to the left and right of all columns
@grid-gutter-width: 30px;
// Point at which the navbar stops collapsing
@grid-float-breakpoint: @screen-tablet;
// Navbar // Navbar
// ------------------------- // -------------------------
// Basics of a navbar // Basics of a navbar
@navbar-height: 50px; @navbar-height: 50px;
@navbar-margin-bottom: @line-height-computed;
@navbar-color: #777; @navbar-color: #777;
@navbar-bg: #eee; @navbar-bg: #f8f8f8;
@navbar-padding-horizontal: floor(@grid-gutter-width / 2); // ~15px @navbar-border: darken(@navbar-bg, 6.5%);
@navbar-border-radius: @border-radius-base;
@navbar-padding-horizontal: floor(@grid-gutter-width / 2);
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); @navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
// Navbar links // Navbar links
@@ -190,7 +244,7 @@
@navbar-link-hover-color: #333; @navbar-link-hover-color: #333;
@navbar-link-hover-bg: transparent; @navbar-link-hover-bg: transparent;
@navbar-link-active-color: #555; @navbar-link-active-color: #555;
@navbar-link-active-bg: darken(@navbar-bg, 10%); @navbar-link-active-bg: darken(@navbar-bg, 6.5%);
@navbar-link-disabled-color: #ccc; @navbar-link-disabled-color: #ccc;
@navbar-link-disabled-bg: transparent; @navbar-link-disabled-bg: transparent;
@@ -210,6 +264,7 @@
// Reset inverted navbar basics // Reset inverted navbar basics
@navbar-inverse-color: @gray-light; @navbar-inverse-color: @gray-light;
@navbar-inverse-bg: #222; @navbar-inverse-bg: #222;
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
// Inverted navbar links // Inverted navbar links
@navbar-inverse-link-color: @gray-light; @navbar-inverse-link-color: @gray-light;
@@ -314,7 +369,7 @@
// ------------------------- // -------------------------
@tooltip-max-width: 200px; @tooltip-max-width: 200px;
@tooltip-color: #fff; @tooltip-color: #fff;
@tooltip-bg: rgba(0,0,0,.9); @tooltip-bg: #000;
@tooltip-arrow-width: 5px; @tooltip-arrow-width: 5px;
@tooltip-arrow-color: @tooltip-bg; @tooltip-arrow-color: @tooltip-bg;
@@ -339,6 +394,8 @@
// Labels // Labels
// ------------------------- // -------------------------
@label-default-bg: @gray-light;
@label-success-bg: @brand-success; @label-success-bg: @brand-success;
@label-info-bg: @brand-info; @label-info-bg: @brand-info;
@label-warning-bg: @brand-warning; @label-warning-bg: @brand-warning;
@@ -366,10 +423,13 @@
// Alerts // Alerts
// ------------------------- // -------------------------
@alert-padding: 15px;
@alert-border-radius: @border-radius-base;
@alert-link-font-weight: bold;
@alert-bg: @state-warning-bg; @alert-bg: @state-warning-bg;
@alert-text: @state-warning-text; @alert-text: @state-warning-text;
@alert-border: @state-warning-border; @alert-border: @state-warning-border;
@alert-border-radius: @border-radius-base;
@alert-success-bg: @state-success-bg; @alert-success-bg: @state-success-bg;
@alert-success-text: @state-success-text; @alert-success-text: @state-success-text;
@@ -442,11 +502,14 @@
// Thumbnails // Thumbnails
// ------------------------- // -------------------------
@thumbnail-caption-color: @text-color; @thumbnail-padding: 4px;
@thumbnail-bg: @body-bg; @thumbnail-bg: @body-bg;
@thumbnail-border: #ddd; @thumbnail-border: #ddd;
@thumbnail-border-radius: @border-radius-base; @thumbnail-border-radius: @border-radius-base;
@thumbnail-caption-color: @text-color;
@thumbnail-caption-padding: 9px;
// Wells // Wells
// ------------------------- // -------------------------
@@ -462,11 +525,15 @@
// ------------------------- // -------------------------
@badge-color: #fff; @badge-color: #fff;
@badge-link-hover-color: #fff; @badge-link-hover-color: #fff;
@badge-bg: @gray-light; @badge-bg: @gray-light;
@badge-active-color: @link-color; @badge-active-color: @link-color;
@badge-active-bg: #fff; @badge-active-bg: #fff;
@badge-font-weight: bold;
@badge-line-height: 1;
@badge-border-radius: 10px;
// Breadcrumbs // Breadcrumbs
// ------------------------- // -------------------------
@@ -477,12 +544,16 @@
// Carousel // Carousel
// ------------------------ // ------------------------
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); @carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
@carousel-control-color: #fff; @carousel-control-color: #fff;
@carousel-control-width: 15%;
@carousel-control-opacity: .5;
@carousel-control-font-size: 20px;
@carousel-indicator-border-color: #fff;
@carousel-indicator-active-bg: #fff; @carousel-indicator-active-bg: #fff;
@carousel-indicator-border-color: #fff;
@carousel-caption-color: #fff; @carousel-caption-color: #fff;
@@ -490,6 +561,7 @@
// Close // Close
// ------------------------ // ------------------------
@close-color: #000; @close-color: #000;
@close-font-weight: bold;
@close-text-shadow: 0 1px 0 #fff; @close-text-shadow: 0 1px 0 #fff;
@@ -499,7 +571,9 @@
@code-bg: #f9f2f4; @code-bg: #f9f2f4;
@pre-bg: #f5f5f5; @pre-bg: #f5f5f5;
@pre-color: @gray-dark;
@pre-border-color: #ccc; @pre-border-color: #ccc;
@pre-scrollable-max-height: 340px;
// Type // Type
// ------------------------ // ------------------------
@@ -520,49 +594,14 @@
@component-offset-horizontal: 180px; @component-offset-horizontal: 180px;
// Media queries breakpoints
// --------------------------------------------------
// Tiny screen / phone
@screen-tiny: 480px;
@screen-phone: @screen-tiny;
// Small screen / tablet
@screen-small: 768px;
@screen-tablet: @screen-small;
// Medium screen / desktop
@screen-medium: 992px;
@screen-desktop: @screen-medium;
// So media queries don't overlap when required, provide a maximum
@screen-small-max: (@screen-medium - 1);
@screen-tablet-max: @screen-small-max;
// Large screen / wide desktop
@screen-large: 1200px;
@screen-large-desktop: @screen-large;
// Container sizes // Container sizes
// -------------------------------------------------- // --------------------------------------------------
// Small screen / tablet // Small screen / tablet
@container-tablet: 728px; @container-tablet: 720px;
// Medium screen / desktop // Medium screen / desktop
@container-desktop: 940px; @container-desktop: 940px;
// Large screen / wide desktop // Large screen / wide desktop
@container-large-desktop: 1170px; @container-large-desktop: 1140px;
// Grid system
// --------------------------------------------------
// Number of columns in the grid system
@grid-columns: 12;
// Padding, to be divided by two and applied to the left and right of all columns
@grid-gutter-width: 30px;
// Point at which the navbar stops collapsing
@grid-float-breakpoint: @screen-tablet;

View File

@@ -19,11 +19,11 @@
} }
// Sizes // Sizes
.well-large { .well-lg {
padding: 24px; padding: 24px;
border-radius: @border-radius-large; border-radius: @border-radius-large;
} }
.well-small { .well-sm {
padding: 9px; padding: 9px;
border-radius: @border-radius-small; border-radius: @border-radius-small;
} }

View File

@@ -21,7 +21,7 @@ define('POST_EXCERPT_LENGTH', 40);
function roots_main_class() { function roots_main_class() {
if (roots_display_sidebar()) { if (roots_display_sidebar()) {
// Classes on pages with the sidebar // Classes on pages with the sidebar
$class = 'col-sm-8 col-lg-8'; $class = 'col-sm-8 col-md-8 col-lg-8';
} else { } else {
// Classes on full width pages // Classes on full width pages
$class = 'col-lg-12'; $class = 'col-lg-12';
@@ -34,7 +34,7 @@ function roots_main_class() {
* .sidebar classes * .sidebar classes
*/ */
function roots_sidebar_class() { function roots_sidebar_class() {
return 'col-sm-4 col-lg-4'; return 'col-sm-4 col-md-4 col-lg-4';
} }
/** /**

View File

@@ -1,14 +1,16 @@
<header class="banner navbar navbar-static-top" role="banner"> <header class="banner navbar navbar-static-top" role="banner">
<div class="container"> <div class="container">
<a class="navbar-brand" href="<?php echo home_url(); ?>/"> <div class="navbar-header">
<?php bloginfo('name'); ?> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
</a> <span class="sr-only">Toggle navigation</span>
<button data-target=".nav-main" data-toggle="collapse" type="button" class="navbar-toggle"> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> </button>
</button> <a class="navbar-brand" href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a>
<nav class="nav-main nav-collapse collapse" role="navigation"> </div>
<nav class="collapse navbar-collapse" role="navigation">
<?php <?php
if (has_nav_menu('primary_navigation')) : if (has_nav_menu('primary_navigation')) :
wp_nav_menu(array('theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav')); wp_nav_menu(array('theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav'));