diff --git a/xstatic/pkg/bootstrap_scss/__init__.py b/xstatic/pkg/bootstrap_scss/__init__.py index 52fe830..d842c22 100644 --- a/xstatic/pkg/bootstrap_scss/__init__.py +++ b/xstatic/pkg/bootstrap_scss/__init__.py @@ -11,7 +11,7 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar') # please use a all-lowercase valid python # package name -VERSION = '2.0.1' # version of the packaged files, please use the upstream +VERSION = '3.1.1' # version of the packaged files, please use the upstream # version number BUILD = '1' # our package build number, so we can release new builds # with fixes for xstatic stuff. diff --git a/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.eot b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..4a4ca86 Binary files /dev/null and b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.eot differ diff --git a/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.svg b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..e3e2dc7 --- /dev/null +++ b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + \ No newline at end of file diff --git a/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.ttf b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..67fa00b Binary files /dev/null and b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.ttf differ diff --git a/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.woff b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..8c54182 Binary files /dev/null and b/xstatic/pkg/bootstrap_scss/data/fonts/bootstrap/glyphicons-halflings-regular.woff differ diff --git a/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings-white.png b/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings-white.png deleted file mode 100644 index a20760b..0000000 Binary files a/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings.png b/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings.png deleted file mode 100644 index 92d4445..0000000 Binary files a/xstatic/pkg/bootstrap_scss/data/img/glyphicons-halflings.png and /dev/null differ diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js index 4412304..8ae571b 100644 --- a/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js +++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js @@ -1,132 +1,126 @@ -/* =================================================== - * bootstrap-transition.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ -!function( $ ) { +if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } - $(function () { - - "use strict" - - /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) - * ======================================================= */ - - $.support.transition = (function () { - var thisBody = document.body || document.documentElement - , thisStyle = thisBody.style - , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined - - return support && { - end: (function () { - var transitionEnd = "TransitionEnd" - if ( $.browser.webkit ) { - transitionEnd = "webkitTransitionEnd" - } else if ( $.browser.mozilla ) { - transitionEnd = "transitionend" - } else if ( $.browser.opera ) { - transitionEnd = "oTransitionEnd" - } - return transitionEnd - }()) - } - })() - - }) - -}( window.jQuery );/* ========================================================== - * bootstrap-alert.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ +/* ======================================================================== + * Bootstrap: transition.js v3.1.1 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ -!function( $ ){ ++function ($) { + 'use strict'; - "use strict" + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ - /* ALERT CLASS DEFINITION - * ====================== */ + function transitionEnd() { + var el = document.createElement('bootstrap') - var dismiss = '[data-dismiss="alert"]' - , Alert = function ( el ) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype = { - - constructor: Alert - - , close: function ( e ) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - $parent.trigger('close') - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent - .trigger('close') - .removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() + var transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd', + 'MozTransition' : 'transitionend', + 'OTransition' : 'oTransitionEnd otransitionend', + 'transition' : 'transitionend' } + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.1.1 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.hasClass('alert') ? $this : $this.parent() + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent.trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(150) : + removeElement() } - /* ALERT PLUGIN DEFINITION - * ======================= */ + // ALERT PLUGIN DEFINITION + // ======================= - $.fn.alert = function ( option ) { + var old = $.fn.alert + + $.fn.alert = function (option) { return this.each(function () { var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call($this) }) } @@ -134,479 +128,628 @@ $.fn.alert.Constructor = Alert - /* ALERT DATA-API - * ============== */ - - $(function () { - $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) - }) - -}( window.jQuery );/* ============================================================ - * bootstrap-button.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - -!function( $ ){ - - "use strict" - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function ( element, options ) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype = { - - constructor: Button - - , setState: function ( state ) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - , toggle: function () { - var $parent = this.$element.parent('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } + // ALERT NO CONFLICT + // ================= + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this } - /* BUTTON PLUGIN DEFINITION - * ======================== */ + // ALERT DATA-API + // ============== - $.fn.button = function ( option ) { + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.1.1 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (!data.resetText) $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + var old = $.fn.button + + $.fn.button = function (option) { return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() else if (option) data.setState(option) }) } - $.fn.button.defaults = { - loadingText: 'loading...' - } - $.fn.button.Constructor = Button - /* BUTTON DATA-API - * =============== */ + // BUTTON NO CONFLICT + // ================== - $(function () { - $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - }) - -}( window.jQuery );/* ========================================================== - * bootstrap-carousel.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function( $ ){ - - "use strict" - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.carousel.defaults, options) - this.options.slide && this.slide(this.options.slide) + $.fn.button.noConflict = function () { + $.fn.button = old + return this } - Carousel.prototype = { - cycle: function () { - this.interval = setInterval($.proxy(this.next, this), this.options.interval) - return this + // BUTTON DATA-API + // =============== + + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + e.preventDefault() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.1.1 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getActiveIndex = function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + + return this.$items.index(this.$active) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getActiveIndex() + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) } - , to: function (pos) { - var $active = this.$element.find('.active') - , children = $active.parent().children() - , activePos = children.index($active) - , that = this + this.interval = clearInterval(this.interval) - if (pos > (children.length - 1) || pos < 0) return + return this + } - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } - if (activePos == pos) { - return this.pause().cycle() - } + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } - return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || $active[type]() + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var fallback = type == 'next' ? 'first' : 'last' + var that = this + + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() } - , pause: function () { - clearInterval(this.interval) - this.interval = null - return this + if ($next.hasClass('active')) return this.sliding = false + + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid.bs.carousel', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) } - , next: function () { - if (this.sliding) return - return this.slide('next') - } - - , prev: function () { - if (this.sliding) return - return this.slide('prev') - } - - , slide: function (type, next) { - var $active = this.$element.find('.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - - if (!$next.length) return - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - if (!$.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger('slide') - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } else { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.trigger('slide') - this.$element.one($.support.transition.end, function () { + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one($.support.transition.end, function () { $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) }) - } - - isCycling && this.cycle() - - return this + .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid.bs.carousel') } + isCycling && this.cycle() + + return this } - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ + // CAROUSEL PLUGIN DEFINITION + // ========================== - $.fn.carousel = function ( option ) { + var old = $.fn.carousel + + $.fn.carousel = function (option) { return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = typeof option == 'object' && option - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (typeof option == 'string' || (option = options.slide)) data[option]() - else data.cycle() - }) - } + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide - $.fn.carousel.defaults = { - interval: 5000 + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) } $.fn.carousel.Constructor = Carousel - /* CAROUSEL DATA-API - * ================= */ + // CAROUSEL NO CONFLICT + // ==================== - $(function () { - $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) - $target.carousel(options) - e.preventDefault() + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + }) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + $carousel.carousel($carousel.data()) }) }) -}( window.jQuery );/* ============================================================= - * bootstrap-collapse.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ +}(jQuery); -!function( $ ){ +/* ======================================================================== + * Bootstrap: collapse.js v3.1.1 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ - "use strict" - var Collapse = function ( element, options ) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) ++function ($) { + 'use strict'; - if (this.options["parent"]) { - this.$parent = $(this.options["parent"]) - } + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ - this.options.toggle && this.toggle() + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.transitioning = null + + if (this.options.parent) this.$parent = $(this.options.parent) + if (this.options.toggle) this.toggle() } - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension = this.dimension() - , scroll = $.camelCase(['scroll', dimension].join('-')) - , actives = this.$parent && this.$parent.find('.in') - , hasData - - if (actives && actives.length) { - hasData = actives.data('collapse') - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', 'show', 'shown') - this.$element[dimension](this.$element[0][scroll]) - - } - - , hide: function () { - var dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', 'hide', 'hidden') - this.$element[dimension](0) - } - - , reset: function ( size ) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element.addClass('collapse') - } - - , transition: function ( method, startEvent, completeEvent ) { - var that = this - , complete = function () { - if (startEvent == 'show') that.reset() - that.$element.trigger(completeEvent) - } - - this.$element - .trigger(startEvent) - [method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - + Collapse.DEFAULTS = { + toggle: true } - /* COLLAPSIBLE PLUGIN DEFINITION - * ============================== */ + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } - $.fn.collapse = function ( option ) { + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var actives = this.$parent && this.$parent.find('> .panel > .in') + + if (actives && actives.length) { + var hasData = actives.data('bs.collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing') + [dimension](0) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in') + [dimension]('auto') + this.transitioning = 0 + this.$element.trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + [dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element + [dimension](this.$element[dimension]()) + [0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse') + .removeClass('in') + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .trigger('hidden.bs.collapse') + .removeClass('collapsing') + .addClass('collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + var old = $.fn.collapse + + $.fn.collapse = function (option) { return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = typeof option == 'object' && option - if (!data) $this.data('collapse', (data = new Collapse(this, options))) + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') option = !option + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } - $.fn.collapse.defaults = { - toggle: true - } - $.fn.collapse.Constructor = Collapse - /* COLLAPSIBLE DATA-API - * ==================== */ + // COLLAPSE NO CONFLICT + // ==================== - $(function () { - $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $(target).collapse(option) - }) - }) - -}( window.jQuery );/* ============================================================ - * bootstrap-dropdown.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } -!function( $ ){ + // COLLAPSE DATA-API + // ================= - "use strict" + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + var target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + var $target = $(target) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $this.data() + var parent = $this.attr('data-parent') + var $parent = parent && $(parent) - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle="dropdown"]' - , Dropdown = function ( element ) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function ( e ) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - , isActive - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - $parent.length || ($parent = $this.parent()) - - isActive = $parent.hasClass('open') - - clearMenus() - !isActive && $parent.toggleClass('open') - - return false + if (!data || !data.transitioning) { + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') + $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') } + $target.collapse(option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.1.1 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle=dropdown]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) } - function clearMenus() { - $(toggle).parent().removeClass('open') + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('
').insertAfter($(this)).on('click', clearMenus) + } + + var relatedTarget = { relatedTarget: this } + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $parent + .toggleClass('open') + .trigger('shown.bs.dropdown', relatedTarget) + + $this.focus() + } + + return false + } + + Dropdown.prototype.keydown = function (e) { + if (!/(38|40|27)/.test(e.keyCode)) return + + var $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) { + if (e.which == 27) $parent.find(toggle).focus() + return $this.click() + } + + var desc = ' li:not(.divider):visible a' + var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc) + + if (!$items.length) return + + var index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items.eq(index).focus() + } + + function clearMenus(e) { + $(backdrop).remove() + $(toggle).each(function () { + var $parent = getParent($(this)) + var relatedTarget = { relatedTarget: this } + if (!$parent.hasClass('open')) return + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + if (e.isDefaultPrevented()) return + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() } - /* DROPDOWN PLUGIN DEFINITION - * ========================== */ + // DROPDOWN PLUGIN DEFINITION + // ========================== - $.fn.dropdown = function ( option ) { + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { return this.each(function () { var $this = $(this) - , data = $this.data('dropdown') - if (!data) $this.data('dropdown', (data = new Dropdown(this))) + var data = $this.data('bs.dropdown') + + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) if (typeof option == 'string') data[option].call($this) }) } @@ -614,138 +757,176 @@ $.fn.dropdown.Constructor = Dropdown - /* APPLY TO STANDARD DROPDOWN ELEMENTS - * =================================== */ - - $(function () { - $('html').on('click.dropdown.data-api', clearMenus) - $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) - }) - -}( window.jQuery );/* ========================================================= - * bootstrap-modal.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - - -!function( $ ){ - - "use strict" - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function ( content, options ) { - this.options = options - this.$element = $(content) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - } - - Modal.prototype = { - - constructor: Modal - - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } - - , show: function () { - var that = this - - if (this.isShown) return - - $('body').addClass('modal-open') - - this.isShown = true - this.$element.trigger('show') - - escape.call(this) - backdrop.call(this, function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position - - that.$element - .show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') - - }) - } - - , hide: function ( e ) { - e && e.preventDefault() - - if (!this.isShown) return - - var that = this - this.isShown = false - - $('body').removeClass('modal-open') - - escape.call(this) - - this.$element - .trigger('hide') - .removeClass('in') - - $.support.transition && this.$element.hasClass('fade') ? - hideWithTransition.call(this) : - hideModal.call(this) - } + // DROPDOWN NO CONFLICT + // ==================== + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this } - /* MODAL PRIVATE METHODS - * ===================== */ + // APPLY TO STANDARD DROPDOWN ELEMENTS + // =================================== - function hideWithTransition() { + $(document) + .on('click.bs.dropdown.data-api', clearMenus) + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) + .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: modal.js v3.1.1 + * http://getbootstrap.com/javascript/#modals + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // MODAL CLASS DEFINITION + // ====================== + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + this.$backdrop = + this.isShown = null + + if (this.options.remote) { + this.$element + .find('.modal-content') + .load(this.options.remote, $.proxy(function () { + this.$element.trigger('loaded.bs.modal') + }, this)) + } + } + + Modal.DEFAULTS = { + backdrop: true, + keyboard: true, + show: true + } + + Modal.prototype.toggle = function (_relatedTarget) { + return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) + } + + Modal.prototype.show = function (_relatedTarget) { var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - hideModal.call(that) - }, 500) + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - hideModal.call(that) + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.escape() + + this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) // don't move modals dom position + } + + that.$element + .show() + .scrollTop(0) + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + + that.enforceFocus() + + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) + + transition ? + that.$element.find('.modal-dialog') // wait for modal to slide in + .one($.support.transition.end, function () { + that.$element.focus().trigger(e) + }) + .emulateTransitionEnd(300) : + that.$element.focus().trigger(e) }) } - function hideModal( that ) { - this.$element - .hide() - .trigger('hidden') + Modal.prototype.hide = function (e) { + if (e) e.preventDefault() - backdrop.call(this) + e = $.Event('hide.bs.modal') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.bs.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + .off('click.dismiss.bs.modal') + + $.support.transition && this.$element.hasClass('fade') ? + this.$element + .one($.support.transition.end, $.proxy(this.hideModal, this)) + .emulateTransitionEnd(300) : + this.hideModal() } - function backdrop( callback ) { + Modal.prototype.enforceFocus = function () { + $(document) + .off('focusin.bs.modal') // guard against infinite focus loop + .on('focusin.bs.modal', $.proxy(function (e) { + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + this.$element.focus() + } + }, this)) + } + + Modal.prototype.escape = function () { + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { + e.which == 27 && this.hide() + }, this)) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.bs.modal') + } + } + + Modal.prototype.hideModal = function () { var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden.bs.modal') + }) + } + + Modal.prototype.removeBackdrop = function () { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } + + Modal.prototype.backdrop = function (callback) { + var animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { var doAnimate = $.support.transition && animate @@ -753,683 +934,858 @@ this.$backdrop = $('') .appendTo(document.body) - if (this.options.backdrop != 'static') { - this.$backdrop.click($.proxy(this.hide, this)) - } + this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { + if (e.target !== e.currentTarget) return + this.options.backdrop == 'static' + ? this.$element[0].focus.call(this.$element[0]) + : this.hide.call(this) + }, this)) if (doAnimate) this.$backdrop[0].offsetWidth // force reflow this.$backdrop.addClass('in') + if (!callback) return + doAnimate ? - this.$backdrop.one($.support.transition.end, callback) : + this.$backdrop + .one($.support.transition.end, callback) + .emulateTransitionEnd(150) : callback() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass('in') - $.support.transition && this.$element.hasClass('fade')? - this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) : - removeBackdrop.call(this) + $.support.transition && this.$element.hasClass('fade') ? + this.$backdrop + .one($.support.transition.end, callback) + .emulateTransitionEnd(150) : + callback() } else if (callback) { callback() } } - function removeBackdrop() { - this.$backdrop.remove() - this.$backdrop = null - } - function escape() { - var that = this - if (this.isShown && this.options.keyboard) { - $(document).on('keyup.dismiss.modal', function ( e ) { - e.which == 27 && that.hide() - }) - } else if (!this.isShown) { - $(document).off('keyup.dismiss.modal') - } - } + // MODAL PLUGIN DEFINITION + // ======================= + var old = $.fn.modal - /* MODAL PLUGIN DEFINITION - * ======================= */ - - $.fn.modal = function ( option ) { + $.fn.modal = function (option, _relatedTarget) { return this.each(function () { - var $this = $(this) - , data = $this.data('modal') - , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option]() - else if (options.show) data.show() - }) - } + var $this = $(this) + var data = $this.data('bs.modal') + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - $.fn.modal.defaults = { - backdrop: true - , keyboard: true - , show: true + if (!data) $this.data('bs.modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option](_relatedTarget) + else if (options.show) data.show(_relatedTarget) + }) } $.fn.modal.Constructor = Modal - /* MODAL DATA-API - * ============== */ + // MODAL NO CONFLICT + // ================= - $(function () { - $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data()) + $.fn.modal.noConflict = function () { + $.fn.modal = old + return this + } - e.preventDefault() - $target.modal(option) - }) + + // MODAL DATA-API + // ============== + + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { + var $this = $(this) + var href = $this.attr('href') + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) + + if ($this.is('a')) e.preventDefault() + + $target + .modal(option, this) + .one('hide', function () { + $this.is(':visible') && $this.focus() + }) }) -}( window.jQuery );/* =========================================================== - * bootstrap-tooltip.js v2.0.1 - * http://twitter.github.com/bootstrap/javascript.html#tooltips + $(document) + .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') }) + .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: tooltip.js v3.1.1 + * http://getbootstrap.com/javascript/#tooltip * Inspired by the original jQuery.tipsy by Jason Frame - * =========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ -!function( $ ) { - "use strict" ++function ($) { + 'use strict'; - /* TOOLTIP PUBLIC CLASS DEFINITION - * =============================== */ + // TOOLTIP PUBLIC CLASS DEFINITION + // =============================== + + var Tooltip = function (element, options) { + this.type = + this.options = + this.enabled = + this.timeout = + this.hoverState = + this.$element = null - var Tooltip = function ( element, options ) { this.init('tooltip', element, options) } - Tooltip.prototype = { + Tooltip.DEFAULTS = { + animation: true, + placement: 'top', + selector: false, + template: ' and elements
-// --------------------------------------------------------
+//
+// Code (inline and block)
+// --------------------------------------------------
+
// Inline and block code styles
-code, pre {
- padding: 0 3px 2px;
- @include font-family-monospace();
- font-size: $baseFontSize - 1;
- color: $grayDark;
- @include border-radius(3px);
+code,
+kbd,
+pre,
+samp {
+ font-family: $font-family-monospace;
}
// Inline code
code {
- padding: 3px 4px;
- color: #d14;
- background-color: #f7f7f9;
- border: 1px solid #e1e1e8;
+ padding: 2px 4px;
+ font-size: 90%;
+ color: $code-color;
+ background-color: $code-bg;
+ white-space: nowrap;
+ border-radius: $border-radius-base;
+}
+
+// User input typically entered via keyboard
+kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: $kbd-color;
+ background-color: $kbd-bg;
+ border-radius: $border-radius-small;
+ box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}
// Blocks of code
pre {
display: block;
- padding: ($baseLineHeight - 1) / 2;
- margin: 0 0 $baseLineHeight / 2;
- font-size: 12px;
- line-height: $baseLineHeight;
- background-color: #f5f5f5;
- border: 1px solid #ccc; // fallback for IE7-8
- border: 1px solid rgba(0,0,0,.15);
- @include border-radius(4px);
- white-space: pre;
- white-space: pre-wrap;
+ padding: (($line-height-computed - 1) / 2);
+ margin: 0 0 ($line-height-computed / 2);
+ font-size: ($font-size-base - 1); // 14px to 13px
+ line-height: $line-height-base;
word-break: break-all;
word-wrap: break-word;
-
- // Make prettyprint styles more spaced out for readability
- &.prettyprint {
- margin-bottom: $baseLineHeight;
- }
+ color: $pre-color;
+ background-color: $pre-bg;
+ border: 1px solid $pre-border-color;
+ border-radius: $border-radius-base;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
+ font-size: inherit;
color: inherit;
+ white-space: pre-wrap;
background-color: transparent;
- border: 0;
+ border-radius: 0;
}
}
// Enable scrollable blocks of code
.pre-scrollable {
- max-height: 340px;
+ max-height: $pre-scrollable-max-height;
overflow-y: scroll;
-}
\ No newline at end of file
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_component-animations.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_component-animations.scss
index 186f121..86632fd 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_component-animations.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_component-animations.scss
@@ -1,18 +1,29 @@
-// COMPONENT ANIMATIONS
-// --------------------
+//
+// Component animations
+// --------------------------------------------------
+
+// Heads up!
+//
+// We don't use the `.opacity()` mixin here since it causes a bug with text
+// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
.fade {
- @include transition(opacity .15s linear);
opacity: 0;
+ @include transition(opacity .15s linear);
&.in {
opacity: 1;
}
}
.collapse {
- @include transition(height .35s ease);
- position:relative;
- overflow:hidden;
+ display: none;
+ &.in {
+ display: block;
+ }
+}
+.collapsing {
+ position: relative;
height: 0;
- &.in { height: auto; }
-}
\ No newline at end of file
+ overflow: hidden;
+ @include transition(height .35s ease);
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_dropdowns.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_dropdowns.scss
index 085b5c3..526be5b 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_dropdowns.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_dropdowns.scss
@@ -1,126 +1,213 @@
-// DROPDOWN MENUS
-// --------------
+//
+// Dropdown menus
+// --------------------------------------------------
+
-// Use the .menu class on any
element within the topbar or ul.tabs and you'll get some superfancy dropdowns
-.dropdown {
- position: relative;
-}
-.dropdown-toggle {
- // The caret makes the toggle a bit too tall in IE7
- *margin-bottom: -3px;
-}
-.dropdown-toggle:active, .open .dropdown-toggle {
- outline: 0;
-}
// Dropdown arrow/caret
.caret {
display: inline-block;
width: 0;
height: 0;
- text-indent: -99999px;
- // IE7 won't do the border trick if there's a text indent, but it doesn't
- // do the content that text-indent is hiding, either, so we're ok.
- *text-indent: 0;
- vertical-align: top;
- border-left: 4px solid transparent;
- border-right: 4px solid transparent;
- border-top: 4px solid $black;
- @include opacity(0.3);
- content: "\2193";
-}
-.dropdown .caret {
- margin-top: 8px;
margin-left: 2px;
+ vertical-align: middle;
+ border-top: $caret-width-base solid;
+ border-right: $caret-width-base solid transparent;
+ border-left: $caret-width-base solid transparent;
}
-.dropdown:hover .caret, .open.dropdown .caret {
- @include opacity(1);
+
+// 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)
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
- z-index: $zindexDropdown;
- float: left;
+ z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
+ float: left;
min-width: 160px;
- _width: 160px;
- padding: 4px 0;
- margin: 0; // override default ul
+ padding: 5px 0;
+ margin: 2px 0 0; // override default ul
list-style: none;
- background-color: $white;
- border-color: #ccc;
- border-color: rgba(0,0,0,.2);
- border-style: solid;
- border-width: 1px;
- @include border-radius(0 0 5px 5px);
- @include box-shadow(0 5px 10px rgba(0,0,0,.2));
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
- *border-right-width: 2px;
- *border-bottom-width: 2px;
+ font-size: $font-size-base;
+ background-color: $dropdown-bg;
+ border: 1px solid $dropdown-fallback-border; // IE8 fallback
+ border: 1px solid $dropdown-border;
+ border-radius: $border-radius-base;
+ @include box-shadow(0 6px 12px rgba(0,0,0,.175));
+ background-clip: padding-box;
- // Allow for dropdowns to go bottom up (aka, dropup-menu)
- &.bottom-up {
- top: auto;
- bottom: 100%;
- margin-bottom: 2px;
+ // Aligns the dropdown menu to right
+ //
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
+ &.pull-right {
+ right: 0;
+ left: auto;
}
// Dividers (basically an hr) within the dropdown
.divider {
- height: 1px;
- margin: 5px 1px;
- overflow: hidden;
- background-color: #e5e5e5;
- border-bottom: 1px solid $white;
-
- // IE7 needs a set width since we gave a height. Restricting just
- // to IE7 to keep the 1px left/right space in other browsers.
- // It is unclear where IE is getting the extra space that we need
- // to negative-margin away, but so it goes.
- *width: 100%;
- *margin: -5px 0 5px;
+ @include nav-divider($dropdown-divider-bg);
}
// Links within the dropdown menu
- a {
+ > li > a {
display: block;
- padding: 3px 15px;
+ padding: 3px 20px;
clear: both;
font-weight: normal;
- line-height: $baseLineHeight;
- color: $gray;
- white-space: nowrap;
+ line-height: $line-height-base;
+ color: $dropdown-link-color;
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
}
}
-// Hover state
-.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
- color: $white;
- text-decoration: none;
- background-color: $linkColor;
+// Hover/Focus state
+.dropdown-menu > li > a {
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ color: $dropdown-link-hover-color;
+ background-color: $dropdown-link-hover-bg;
+ }
+}
+
+// Active state
+.dropdown-menu > .active > a {
+ &,
+ &:hover,
+ &:focus {
+ color: $dropdown-link-active-color;
+ text-decoration: none;
+ outline: 0;
+ background-color: $dropdown-link-active-bg;
+ }
+}
+
+// Disabled state
+//
+// Gray out text and ensure the hover/focus state remains gray
+
+.dropdown-menu > .disabled > a {
+ &,
+ &:hover,
+ &:focus {
+ color: $dropdown-link-disabled-color;
+ }
+}
+// Nuke hover/focus effects
+.dropdown-menu > .disabled > a {
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: transparent;
+ background-image: none; // Remove CSS gradient
+ @include reset-filter();
+ cursor: not-allowed;
+ }
}
// Open state for the dropdown
-.dropdown.open {
- // IE7's z-index only goes to the nearest positioned ancestor, which would
- // make the menu appear below buttons that appeared later on the page
- *z-index: $zindexDropdown;
-
- .dropdown-toggle {
- color: $white;
- background: #ccc;
- background: rgba(0,0,0,.3);
- }
- .dropdown-menu {
+.open {
+ // Show the menu
+ > .dropdown-menu {
display: block;
}
+
+ // Remove the outline when :focus is triggered
+ > a {
+ outline: 0;
+ }
}
-// Typeahead
-.typeahead {
- margin-top: 2px; // give it some space to breathe
- @include border-radius(4px);
+// Menu positioning
+//
+// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
+// menu with the parent.
+.dropdown-menu-right {
+ left: auto; // Reset the default from `.dropdown-menu`
+ right: 0;
}
+// With v3, we enabled auto-flipping if you have a dropdown within a right
+// aligned nav component. To enable the undoing of that, we provide an override
+// to restore the default dropdown menu alignment.
+//
+// This is only for left-aligning a dropdown menu within a `.navbar-right` or
+// `.pull-right` nav component.
+.dropdown-menu-left {
+ left: 0;
+ right: auto;
+}
+
+// Dropdown section headers
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: $font-size-small;
+ line-height: $line-height-base;
+ color: $dropdown-header-color;
+}
+
+// Backdrop to catch body clicks on mobile, etc.
+.dropdown-backdrop {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ z-index: ($zindex-dropdown - 10);
+}
+
+// Right aligned dropdowns
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+
+// Allow for dropdowns to go bottom up (aka, dropup-menu)
+//
+// 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?
+
+.dropup,
+.navbar-fixed-bottom .dropdown {
+ // Reverse the caret
+ .caret {
+ border-top: 0;
+ border-bottom: $caret-width-base solid;
+ content: "";
+ }
+ // Different positioning for bottom up menu
+ .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+ }
+}
+
+
+// Component alignment
+//
+// Reiterate per navbar.less and the modified component alignment there.
+
+@media (min-width: $grid-float-breakpoint) {
+ .navbar-right {
+ .dropdown-menu {
+ right: 0; left: auto;
+ }
+ // Necessary for overrides of the default right aligned menu.
+ // Will remove come v4 in all likelihood.
+ .dropdown-menu-left {
+ left: 0; right: auto;
+ }
+ }
+}
+
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_forms.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_forms.scss
index 8c7aa42..2628238 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_forms.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_forms.scss
@@ -1,463 +1,436 @@
-// Forms.less
-// Base styles for various input types, form layouts, and states
-// -------------------------------------------------------------
+//
+// Forms
+// --------------------------------------------------
-// GENERAL STYLES
-// --------------
-
-// Make all forms have space below them
-form {
- margin: 0 0 $baseLineHeight;
-}
+// Normalize non-controls
+//
+// Restyle and baseline non-control form elements.
fieldset {
padding: 0;
margin: 0;
border: 0;
+ // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,
+ // so we reset that to ensure it behaves more like a standard block element.
+ // See https://github.com/twbs/bootstrap/issues/12359.
+ min-width: 0;
}
-// Groups of fields with labels on top (legends)
legend {
display: block;
width: 100%;
padding: 0;
- margin-bottom: $baseLineHeight * 1.5;
- font-size: $baseFontSize * 1.5;
- line-height: $baseLineHeight * 2;
- color: $grayDark;
+ margin-bottom: $line-height-computed;
+ font-size: ($font-size-base * 1.5);
+ line-height: inherit;
+ color: $legend-color;
border: 0;
- border-bottom: 1px solid #eee;
-
- // Small
- small {
- font-size: $baseLineHeight * .75;
- color: $grayLight;
- }
+ border-bottom: 1px solid $legend-border-color;
}
-// Set font for forms
-label, input, button, select, textarea {
- @include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
-}
-
-input, button, select, textarea {
- @include font-family-sans-serif(); // And only set font-family here for those that need it (note the missing label element)
-}
-
-// Identify controls by their labels
label {
- display: block;
- margin-bottom: 5px;
- color: $grayDark;
-}
-
-// Inputs, Textareas, Selects
-input, textarea, select, .uneditable-input {
display: inline-block;
- width: 210px;
- height: $baseLineHeight;
- padding: 4px;
- margin-bottom: 9px;
- font-size: $baseFontSize;
- line-height: $baseLineHeight;
- color: $gray;
- border: 1px solid #ccc;
- @include border-radius(3px);
-}
-.uneditable-textarea {
- width: auto;
- height: auto;
+ margin-bottom: 5px;
+ font-weight: bold;
}
-// Inputs within a label
-label input, label textarea, label select {
+
+// Normalize form controls
+//
+// While most of our form styles require extra classes, some basic normalization
+// is required to ensure optimum display with or without those classes to better
+// address browser inconsistencies.
+
+// Override content-box in Normalize (* isn't specific enough)
+input[type="search"] {
+ @include box-sizing(border-box);
+}
+
+// Position radios and checkboxes better
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9; /* IE8-9 */
+ line-height: normal;
+}
+
+// Set the height of file controls to match text inputs
+input[type="file"] {
display: block;
}
-// Mini reset for unique input types
-input[type="image"], input[type="checkbox"], input[type="radio"] {
- width: auto;
- height: auto;
- padding: 0;
- margin: 3px 0;
- *margin-top: 0; /* IE7 */
- line-height: normal;
- cursor: pointer;
- @include border-radius(0);
- border: 0 \9; /* IE9 and down */
-}
-input[type="image"] {
- border: 0;
-}
-
-// Reset the file input to browser defaults
-input[type="file"] {
- width: auto;
- padding: initial;
- line-height: initial;
- border: initial;
- background-color: $white;
- background-color: initial;
- @include box-shadow(none);
-}
-
-// Help out input buttons
-input[type="button"], input[type="reset"], input[type="submit"] {
- width: auto;
- height: auto;
-}
-
-// Set the height of select and file controls to match text inputs
-select, input[type="file"] {
- height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
- *margin-top: 4px; /* For IE7, add top margin to align select with labels */
- line-height: 28px;
-}
-
-// Reset line-height for IE
-input[type="file"] {
- line-height: 18px \9;
-}
-
-// Chrome on Linux and Mobile Safari need background-color
-select {
- width: 220px; // default input width + 10px of padding that doesn't get applied
- background-color: $white;
+// Make range inputs behave like textual form controls
+input[type="range"] {
+ display: block;
+ width: 100%;
}
// Make multiple select elements height not fixed
-select[multiple], select[size] {
+select[multiple],
+select[size] {
height: auto;
}
-// Remove shadow from image inputs
-input[type="image"] {
- @include box-shadow(none);
-}
-
-// Make textarea height behave
-textarea {
- height: auto;
-}
-
-// Hidden inputs
-input[type="hidden"] {
- display: none;
-}
-
-
-
-// CHECKBOXES & RADIOS
-// -------------------
-
-// Indent the labels to position radios/checkboxes as hanging
-.radio, .checkbox {
- padding-left: 18px;
-}
-.radio input[type="radio"], .checkbox input[type="checkbox"] {
- float: left;
- margin-left: -18px;
-}
-
-// Move the options list down to align with labels
-.controls > .radio:first-child, .controls > .checkbox:first-child {
- padding-top: 5px; // has to be padding because margin collaspes
-}
-
-// Radios and checkboxes on same line
-// TODO v3: Convert .inline to .control-inline
-.radio.inline, .checkbox.inline {
- display: inline-block;
- padding-top: 5px;
- margin-bottom: 0;
- vertical-align: middle;
-}
-.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
- margin-left: 10px; // space out consecutive inline controls
-}
-
-
-
-// FOCUS STATE
-// -----------
-
-input, textarea {
- @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
- $transition: border linear .2s, box-shadow linear .2s;
- @include transition($transition);
-}
-input:focus, textarea:focus {
- border-color: rgba(82,168,236,.8);
- $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
- @include box-shadow($shadow);
- outline: 0;
- outline: thin dotted \9; /* IE6-9 */
-}
-input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, select:focus {
- @include box-shadow(none); // override for file inputs
+// Focus for file, radio, and checkbox
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
@include tab-focus();
}
-
-
-// INPUT SIZES
-// -----------
-
-// General classes for quick sizes
-.input-mini { width: 60px; }
-.input-small { width: 90px; }
-.input-medium { width: 150px; }
-.input-large { width: 210px; }
-.input-xlarge { width: 270px; }
-.input-xxlarge { width: 530px; }
-
-// Grid style input sizes
-input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
- float: none;
- margin-left: 0;
+// Adjust output element
+output {
+ display: block;
+ padding-top: ($padding-base-vertical + 1);
+ font-size: $font-size-base;
+ line-height: $line-height-base;
+ color: $input-color;
}
+// Common form controls
+//
+// Shared size and type resets for form controls. Apply `.form-control` to any
+// of the following form controls:
+//
+// select
+// textarea
+// input[type="text"]
+// input[type="password"]
+// input[type="datetime"]
+// input[type="datetime-local"]
+// input[type="date"]
+// input[type="month"]
+// input[type="time"]
+// input[type="week"]
+// input[type="number"]
+// input[type="email"]
+// input[type="url"]
+// input[type="search"]
+// input[type="tel"]
+// input[type="color"]
-// GRID SIZING FOR INPUTS
-// ----------------------
+.form-control {
+ display: block;
+ width: 100%;
+ height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
+ padding: $padding-base-vertical $padding-base-horizontal;
+ font-size: $font-size-base;
+ line-height: $line-height-base;
+ color: $input-color;
+ background-color: $input-bg;
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
+ border: 1px solid $input-border;
+ border-radius: $input-border-radius;
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
+ @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
-@include inputGridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth);
+ // Customize the `:focus` state to imitate native WebKit styles.
+ @include form-control-focus();
+ // Placeholder
+ @include placeholder();
+ // Disabled and read-only inputs
+ //
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
+ // don't honor that edge case; we style them as disabled anyway.
+ &[disabled],
+ &[readonly],
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ background-color: $input-bg-disabled;
+ opacity: 1; // iOS fix for unreadable disabled content
+ }
+ // [converter] extracted textarea& to textarea.form-control
+}
-// DISABLED STATE
-// --------------
-
-// Disabled and read-only inputs
-input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
- background-color: #f5f5f5;
- border-color: #ddd;
- cursor: not-allowed;
+// Reset height for `textarea`s
+textarea.form-control {
+ height: auto;
}
+// Search inputs in iOS
+//
+// This overrides the extra rounded corners on search inputs in iOS so that our
+// `.form-control` class can properly style them. Note that this cannot simply
+// be added to `.form-control` as it's not specific enough. For details, see
+// https://github.com/twbs/bootstrap/issues/11586.
-
-// FORM FIELD FEEDBACK STATES
-// --------------------------
-
-// Warning
-.control-group.warning {
- @include formFieldState($warningText, $warningText, $warningBackground);
-}
-// Error
-.control-group.error {
- @include formFieldState($errorText, $errorText, $errorBackground);
-}
-// Success
-.control-group.success {
- @include formFieldState($successText, $successText, $successBackground);
+input[type="search"] {
+ -webkit-appearance: none;
}
-// HTML5 invalid states
-// Shares styles with the .control-group.error above
-input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
- color: #b94a48;
- border-color: #ee5f5b;
- &:focus {
- border-color: darken(#ee5f5b, 10%);
- @include box-shadow(0 0 6px lighten(#ee5f5b, 20%));
+
+// Special styles for iOS date input
+//
+// In Mobile Safari, date inputs require a pixel line-height that matches the
+// given height of the input.
+
+input[type="date"] {
+ line-height: $input-height-base;
+}
+
+
+// Form groups
+//
+// Designed to help with the organization and spacing of vertical forms. For
+// horizontal forms, use the predefined grid classes.
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+
+// Checkboxes and radios
+//
+// Indent the labels to position radios/checkboxes as hanging controls.
+
+.radio,
+.checkbox {
+ display: block;
+ min-height: $line-height-computed; // clear the floating input if there is no label text
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding-left: 20px;
+ label {
+ display: inline;
+ font-weight: normal;
+ cursor: pointer;
+ }
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+ float: left;
+ margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
+}
+
+// Radios and checkboxes on same line
+.radio-inline,
+.checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ vertical-align: middle;
+ font-weight: normal;
+ cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px; // space out consecutive inline controls
+}
+
+// Apply same disabled cursor tweak as for inputs
+//
+// Note: Neither radios nor checkboxes can be readonly.
+input[type="radio"],
+input[type="checkbox"],
+.radio,
+.radio-inline,
+.checkbox,
+.checkbox-inline {
+ &[disabled],
+ fieldset[disabled] & {
+ cursor: not-allowed;
}
}
+// Form control sizing
+//
+// Build on `.form-control` with modifier classes to decrease or increase the
+// height and font-size of form controls.
-// FORM ACTIONS
-// ------------
+@include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
-.form-actions {
- padding: ($baseLineHeight - 1) 20px $baseLineHeight;
- margin-top: $baseLineHeight;
- margin-bottom: $baseLineHeight;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
+@include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
+
+
+// Form control feedback states
+//
+// Apply contextual and semantic states to individual form controls.
+
+.has-feedback {
+ // Enable absolute positioning
+ position: relative;
+
+ // Ensure icons don't overlap text
+ .form-control {
+ padding-right: ($input-height-base * 1.25);
+ }
+
+ // Feedback icon (requires .glyphicon classes)
+ .form-control-feedback {
+ position: absolute;
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
+ right: 0;
+ display: block;
+ width: $input-height-base;
+ height: $input-height-base;
+ line-height: $input-height-base;
+ text-align: center;
+ }
}
-// For text that needs to appear as an input but should not be an input
-.uneditable-input {
- display: block;
- background-color: $white;
- border-color: #eee;
- @include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
- cursor: not-allowed;
+// Feedback states
+.has-success {
+ @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
+}
+.has-warning {
+ @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
+}
+.has-error {
+ @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
}
-// Placeholder text gets special styles; can't be bundled together though for some reason
-@include placeholder($grayLight);
+
+// 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`
+}
-
-// HELP TEXT
-// ---------
+// Help text
+//
+// Apply to any element you wish to create light text for placement immediately
+// below a form control. Use for general help, formatting, or instructional text.
.help-block {
display: block; // account for any element using help-block
margin-top: 5px;
- margin-bottom: 0;
- color: $grayLight;
-}
-
-.help-inline {
- display: inline-block;
- @include ie7-inline-block();
- margin-bottom: 9px;
- vertical-align: middle;
- padding-left: 5px;
+ margin-bottom: 10px;
+ color: lighten($text-color, 25%); // lighten the text some for contrast
}
-// INPUT GROUPS
-// ------------
+// 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.
-// Allow us to put symbols and text within the input field for a cleaner look
-.input-prepend, .input-append {
- margin-bottom: 5px;
- @include clearfix(); // Clear the float to prevent wrapping
- input, .uneditable-input {
- @include border-radius(0 3px 3px 0);
- &:focus {
- position: relative;
- z-index: 2;
+.form-inline {
+
+ // Kick in the inline
+ @media (min-width: $screen-sm-min) {
+ // Inline-block all the things for "inline"
+ .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
}
- }
- .uneditable-input {
- border-left-color: #eee;
- border-right-color: #ccc;
- }
- .add-on {
- float: left;
- display: block;
- width: auto;
- min-width: 16px;
- height: $baseLineHeight;
- margin-right: -1px;
- padding: 4px 5px;
- font-weight: normal;
- line-height: $baseLineHeight;
- color: $grayLight;
- text-align: center;
- text-shadow: 0 1px 0 $white;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- @include border-radius(3px 0 0 3px);
- }
- .active {
- background-color: lighten($green, 30);
- border-color: $green;
- }
-}
-.input-prepend {
- .add-on {
- *margin-top: 1px; /* IE6-7 */
- }
-}
-.input-append {
- input, .uneditable-input {
- float: left;
- @include border-radius(3px 0 0 3px);
- }
- .uneditable-input {
- border-right-color: #ccc;
- }
- .add-on {
- margin-right: 0;
- margin-left: -1px;
- @include border-radius(0 3px 3px 0);
- }
- input:first-child {
- // In IE7, having a hasLayout container (from clearfix's zoom:1) can make the first input
- // inherit the sum of its ancestors' margins.
- *margin-left: -160px;
- &+.add-on {
- *margin-left: -21px;
+ // In navbar-form, allow folks to *not* use `.form-group`
+ .form-control {
+ display: inline-block;
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
+ vertical-align: middle;
+ }
+ // Input groups need that 100% width though
+ .input-group > .form-control {
+ width: 100%;
+ }
+
+ .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+
+ // 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;
+ vertical-align: middle;
+ }
+ .radio input[type="radio"],
+ .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+
+ // Validation states
+ //
+ // Reposition the icon because it's now within a grid column and columns have
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
+ .has-feedback .form-control-feedback {
+ top: 0;
}
}
}
-
-// SEARCH FORM
-// -----------
-
-.search-query {
- padding-left: 14px;
- padding-right: 14px;
- margin-bottom: 0; // remove the default margin on all inputs
- @include border-radius(14px);
-}
-
-
-
-// HORIZONTAL & VERTICAL FORMS
-// ---------------------------
-
-// Common properties
-// -----------------
-
-.form-search, .form-inline, .form-horizontal {
- input, textarea, select, .help-inline, .uneditable-input {
- display: inline-block;
- margin-bottom: 0;
- }
- // Re-hide elemnts due to specifity
- .hide { display: none; }
-}
-.form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
- display: inline-block;
-}
-// Make the prepend and append add-on vertical-align: middle;
-.form-search .input-append .add-on, .form-inline .input-prepend .add-on, .form-search .input-append .add-on, .form-inline .input-prepend .add-on {
- vertical-align: middle;
-}
-// Inline checkbox/radio labels
-.form-search .radio, .form-inline .radio, .form-search .checkbox, .form-inline .checkbox {
- margin-bottom: 0;
- vertical-align: middle;
-}
-
-// Margin to space out fieldsets
-.control-group {
- margin-bottom: $baseLineHeight / 2;
-}
-
-// Legend collapses margin, so next elements is responsible for spacing
-legend + .control-group {
- margin-top: $baseLineHeight;
- -webkit-margin-top-collapse: separate;
-}
-
-// Horizontal-specific styles
-// --------------------------
+// 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 {
- // Increase spacing between groups
- .control-group {
- margin-bottom: $baseLineHeight;
- @include clearfix();
+
+ // Consistent vertical alignment of labels, radios, and checkboxes
+ .control-label,
+ .radio,
+ .checkbox,
+ .radio-inline,
+ .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
}
- // Float the labels left
- .control-label {
- float: left;
- width: 140px;
- padding-top: 5px;
- text-align: right;
+ // Account for padding we're adding to ensure the alignment and of help text
+ // and other content below items
+ .radio,
+ .checkbox {
+ min-height: ($line-height-computed + ($padding-base-vertical + 1));
}
- // Move over all input controls and content
- .controls {
- margin-left: 160px;
+
+ // Make form groups behave like rows
+ .form-group {
+ @include make-row();
}
- // Move over buttons in .form-actions to align with .controls
- .form-actions {
- padding-left: 160px;
+
+ .form-control-static {
+ padding-top: ($padding-base-vertical + 1);
+ }
+
+ // Only right align form labels here when the columns stop stacking
+ @media (min-width: $screen-sm-min) {
+ .control-label {
+ text-align: right;
+ }
+ }
+
+ // Validation states
+ //
+ // Reposition the icon because it's now within a grid column and columns have
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
+ .has-feedback .form-control-feedback {
+ top: 0;
+ right: ($grid-gutter-width / 2);
}
}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_glyphicons.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_glyphicons.scss
new file mode 100644
index 0000000..c508835
--- /dev/null
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_glyphicons.scss
@@ -0,0 +1,233 @@
+//
+// Glyphicons for Bootstrap
+//
+// Since icons are fonts, they can be placed anywhere text is placed and are
+// thus automatically sized to match the surrounding child. To use, create an
+// inline element with the appropriate classes, like so:
+//
+// Star
+
+// Import the fonts
+@font-face {
+ font-family: 'Glyphicons Halflings';
+ src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot'));
+ src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), '#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'),
+ url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), '#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'),
+ url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), '#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'),
+ url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'), '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) format('svg');
+}
+
+// Catchall baseclass
+.glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+// Individual icons
+.glyphicon-asterisk { &:before { content: "\2a"; } }
+.glyphicon-plus { &:before { content: "\2b"; } }
+.glyphicon-euro { &:before { content: "\20ac"; } }
+.glyphicon-minus { &:before { content: "\2212"; } }
+.glyphicon-cloud { &:before { content: "\2601"; } }
+.glyphicon-envelope { &:before { content: "\2709"; } }
+.glyphicon-pencil { &:before { content: "\270f"; } }
+.glyphicon-glass { &:before { content: "\e001"; } }
+.glyphicon-music { &:before { content: "\e002"; } }
+.glyphicon-search { &:before { content: "\e003"; } }
+.glyphicon-heart { &:before { content: "\e005"; } }
+.glyphicon-star { &:before { content: "\e006"; } }
+.glyphicon-star-empty { &:before { content: "\e007"; } }
+.glyphicon-user { &:before { content: "\e008"; } }
+.glyphicon-film { &:before { content: "\e009"; } }
+.glyphicon-th-large { &:before { content: "\e010"; } }
+.glyphicon-th { &:before { content: "\e011"; } }
+.glyphicon-th-list { &:before { content: "\e012"; } }
+.glyphicon-ok { &:before { content: "\e013"; } }
+.glyphicon-remove { &:before { content: "\e014"; } }
+.glyphicon-zoom-in { &:before { content: "\e015"; } }
+.glyphicon-zoom-out { &:before { content: "\e016"; } }
+.glyphicon-off { &:before { content: "\e017"; } }
+.glyphicon-signal { &:before { content: "\e018"; } }
+.glyphicon-cog { &:before { content: "\e019"; } }
+.glyphicon-trash { &:before { content: "\e020"; } }
+.glyphicon-home { &:before { content: "\e021"; } }
+.glyphicon-file { &:before { content: "\e022"; } }
+.glyphicon-time { &:before { content: "\e023"; } }
+.glyphicon-road { &:before { content: "\e024"; } }
+.glyphicon-download-alt { &:before { content: "\e025"; } }
+.glyphicon-download { &:before { content: "\e026"; } }
+.glyphicon-upload { &:before { content: "\e027"; } }
+.glyphicon-inbox { &:before { content: "\e028"; } }
+.glyphicon-play-circle { &:before { content: "\e029"; } }
+.glyphicon-repeat { &:before { content: "\e030"; } }
+.glyphicon-refresh { &:before { content: "\e031"; } }
+.glyphicon-list-alt { &:before { content: "\e032"; } }
+.glyphicon-lock { &:before { content: "\e033"; } }
+.glyphicon-flag { &:before { content: "\e034"; } }
+.glyphicon-headphones { &:before { content: "\e035"; } }
+.glyphicon-volume-off { &:before { content: "\e036"; } }
+.glyphicon-volume-down { &:before { content: "\e037"; } }
+.glyphicon-volume-up { &:before { content: "\e038"; } }
+.glyphicon-qrcode { &:before { content: "\e039"; } }
+.glyphicon-barcode { &:before { content: "\e040"; } }
+.glyphicon-tag { &:before { content: "\e041"; } }
+.glyphicon-tags { &:before { content: "\e042"; } }
+.glyphicon-book { &:before { content: "\e043"; } }
+.glyphicon-bookmark { &:before { content: "\e044"; } }
+.glyphicon-print { &:before { content: "\e045"; } }
+.glyphicon-camera { &:before { content: "\e046"; } }
+.glyphicon-font { &:before { content: "\e047"; } }
+.glyphicon-bold { &:before { content: "\e048"; } }
+.glyphicon-italic { &:before { content: "\e049"; } }
+.glyphicon-text-height { &:before { content: "\e050"; } }
+.glyphicon-text-width { &:before { content: "\e051"; } }
+.glyphicon-align-left { &:before { content: "\e052"; } }
+.glyphicon-align-center { &:before { content: "\e053"; } }
+.glyphicon-align-right { &:before { content: "\e054"; } }
+.glyphicon-align-justify { &:before { content: "\e055"; } }
+.glyphicon-list { &:before { content: "\e056"; } }
+.glyphicon-indent-left { &:before { content: "\e057"; } }
+.glyphicon-indent-right { &:before { content: "\e058"; } }
+.glyphicon-facetime-video { &:before { content: "\e059"; } }
+.glyphicon-picture { &:before { content: "\e060"; } }
+.glyphicon-map-marker { &:before { content: "\e062"; } }
+.glyphicon-adjust { &:before { content: "\e063"; } }
+.glyphicon-tint { &:before { content: "\e064"; } }
+.glyphicon-edit { &:before { content: "\e065"; } }
+.glyphicon-share { &:before { content: "\e066"; } }
+.glyphicon-check { &:before { content: "\e067"; } }
+.glyphicon-move { &:before { content: "\e068"; } }
+.glyphicon-step-backward { &:before { content: "\e069"; } }
+.glyphicon-fast-backward { &:before { content: "\e070"; } }
+.glyphicon-backward { &:before { content: "\e071"; } }
+.glyphicon-play { &:before { content: "\e072"; } }
+.glyphicon-pause { &:before { content: "\e073"; } }
+.glyphicon-stop { &:before { content: "\e074"; } }
+.glyphicon-forward { &:before { content: "\e075"; } }
+.glyphicon-fast-forward { &:before { content: "\e076"; } }
+.glyphicon-step-forward { &:before { content: "\e077"; } }
+.glyphicon-eject { &:before { content: "\e078"; } }
+.glyphicon-chevron-left { &:before { content: "\e079"; } }
+.glyphicon-chevron-right { &:before { content: "\e080"; } }
+.glyphicon-plus-sign { &:before { content: "\e081"; } }
+.glyphicon-minus-sign { &:before { content: "\e082"; } }
+.glyphicon-remove-sign { &:before { content: "\e083"; } }
+.glyphicon-ok-sign { &:before { content: "\e084"; } }
+.glyphicon-question-sign { &:before { content: "\e085"; } }
+.glyphicon-info-sign { &:before { content: "\e086"; } }
+.glyphicon-screenshot { &:before { content: "\e087"; } }
+.glyphicon-remove-circle { &:before { content: "\e088"; } }
+.glyphicon-ok-circle { &:before { content: "\e089"; } }
+.glyphicon-ban-circle { &:before { content: "\e090"; } }
+.glyphicon-arrow-left { &:before { content: "\e091"; } }
+.glyphicon-arrow-right { &:before { content: "\e092"; } }
+.glyphicon-arrow-up { &:before { content: "\e093"; } }
+.glyphicon-arrow-down { &:before { content: "\e094"; } }
+.glyphicon-share-alt { &:before { content: "\e095"; } }
+.glyphicon-resize-full { &:before { content: "\e096"; } }
+.glyphicon-resize-small { &:before { content: "\e097"; } }
+.glyphicon-exclamation-sign { &:before { content: "\e101"; } }
+.glyphicon-gift { &:before { content: "\e102"; } }
+.glyphicon-leaf { &:before { content: "\e103"; } }
+.glyphicon-fire { &:before { content: "\e104"; } }
+.glyphicon-eye-open { &:before { content: "\e105"; } }
+.glyphicon-eye-close { &:before { content: "\e106"; } }
+.glyphicon-warning-sign { &:before { content: "\e107"; } }
+.glyphicon-plane { &:before { content: "\e108"; } }
+.glyphicon-calendar { &:before { content: "\e109"; } }
+.glyphicon-random { &:before { content: "\e110"; } }
+.glyphicon-comment { &:before { content: "\e111"; } }
+.glyphicon-magnet { &:before { content: "\e112"; } }
+.glyphicon-chevron-up { &:before { content: "\e113"; } }
+.glyphicon-chevron-down { &:before { content: "\e114"; } }
+.glyphicon-retweet { &:before { content: "\e115"; } }
+.glyphicon-shopping-cart { &:before { content: "\e116"; } }
+.glyphicon-folder-close { &:before { content: "\e117"; } }
+.glyphicon-folder-open { &:before { content: "\e118"; } }
+.glyphicon-resize-vertical { &:before { content: "\e119"; } }
+.glyphicon-resize-horizontal { &:before { content: "\e120"; } }
+.glyphicon-hdd { &:before { content: "\e121"; } }
+.glyphicon-bullhorn { &:before { content: "\e122"; } }
+.glyphicon-bell { &:before { content: "\e123"; } }
+.glyphicon-certificate { &:before { content: "\e124"; } }
+.glyphicon-thumbs-up { &:before { content: "\e125"; } }
+.glyphicon-thumbs-down { &:before { content: "\e126"; } }
+.glyphicon-hand-right { &:before { content: "\e127"; } }
+.glyphicon-hand-left { &:before { content: "\e128"; } }
+.glyphicon-hand-up { &:before { content: "\e129"; } }
+.glyphicon-hand-down { &:before { content: "\e130"; } }
+.glyphicon-circle-arrow-right { &:before { content: "\e131"; } }
+.glyphicon-circle-arrow-left { &:before { content: "\e132"; } }
+.glyphicon-circle-arrow-up { &:before { content: "\e133"; } }
+.glyphicon-circle-arrow-down { &:before { content: "\e134"; } }
+.glyphicon-globe { &:before { content: "\e135"; } }
+.glyphicon-wrench { &:before { content: "\e136"; } }
+.glyphicon-tasks { &:before { content: "\e137"; } }
+.glyphicon-filter { &:before { content: "\e138"; } }
+.glyphicon-briefcase { &:before { content: "\e139"; } }
+.glyphicon-fullscreen { &:before { content: "\e140"; } }
+.glyphicon-dashboard { &:before { content: "\e141"; } }
+.glyphicon-paperclip { &:before { content: "\e142"; } }
+.glyphicon-heart-empty { &:before { content: "\e143"; } }
+.glyphicon-link { &:before { content: "\e144"; } }
+.glyphicon-phone { &:before { content: "\e145"; } }
+.glyphicon-pushpin { &:before { content: "\e146"; } }
+.glyphicon-usd { &:before { content: "\e148"; } }
+.glyphicon-gbp { &:before { content: "\e149"; } }
+.glyphicon-sort { &:before { content: "\e150"; } }
+.glyphicon-sort-by-alphabet { &:before { content: "\e151"; } }
+.glyphicon-sort-by-alphabet-alt { &:before { content: "\e152"; } }
+.glyphicon-sort-by-order { &:before { content: "\e153"; } }
+.glyphicon-sort-by-order-alt { &:before { content: "\e154"; } }
+.glyphicon-sort-by-attributes { &:before { content: "\e155"; } }
+.glyphicon-sort-by-attributes-alt { &:before { content: "\e156"; } }
+.glyphicon-unchecked { &:before { content: "\e157"; } }
+.glyphicon-expand { &:before { content: "\e158"; } }
+.glyphicon-collapse-down { &:before { content: "\e159"; } }
+.glyphicon-collapse-up { &:before { content: "\e160"; } }
+.glyphicon-log-in { &:before { content: "\e161"; } }
+.glyphicon-flash { &:before { content: "\e162"; } }
+.glyphicon-log-out { &:before { content: "\e163"; } }
+.glyphicon-new-window { &:before { content: "\e164"; } }
+.glyphicon-record { &:before { content: "\e165"; } }
+.glyphicon-save { &:before { content: "\e166"; } }
+.glyphicon-open { &:before { content: "\e167"; } }
+.glyphicon-saved { &:before { content: "\e168"; } }
+.glyphicon-import { &:before { content: "\e169"; } }
+.glyphicon-export { &:before { content: "\e170"; } }
+.glyphicon-send { &:before { content: "\e171"; } }
+.glyphicon-floppy-disk { &:before { content: "\e172"; } }
+.glyphicon-floppy-saved { &:before { content: "\e173"; } }
+.glyphicon-floppy-remove { &:before { content: "\e174"; } }
+.glyphicon-floppy-save { &:before { content: "\e175"; } }
+.glyphicon-floppy-open { &:before { content: "\e176"; } }
+.glyphicon-credit-card { &:before { content: "\e177"; } }
+.glyphicon-transfer { &:before { content: "\e178"; } }
+.glyphicon-cutlery { &:before { content: "\e179"; } }
+.glyphicon-header { &:before { content: "\e180"; } }
+.glyphicon-compressed { &:before { content: "\e181"; } }
+.glyphicon-earphone { &:before { content: "\e182"; } }
+.glyphicon-phone-alt { &:before { content: "\e183"; } }
+.glyphicon-tower { &:before { content: "\e184"; } }
+.glyphicon-stats { &:before { content: "\e185"; } }
+.glyphicon-sd-video { &:before { content: "\e186"; } }
+.glyphicon-hd-video { &:before { content: "\e187"; } }
+.glyphicon-subtitles { &:before { content: "\e188"; } }
+.glyphicon-sound-stereo { &:before { content: "\e189"; } }
+.glyphicon-sound-dolby { &:before { content: "\e190"; } }
+.glyphicon-sound-5-1 { &:before { content: "\e191"; } }
+.glyphicon-sound-6-1 { &:before { content: "\e192"; } }
+.glyphicon-sound-7-1 { &:before { content: "\e193"; } }
+.glyphicon-copyright-mark { &:before { content: "\e194"; } }
+.glyphicon-registration-mark { &:before { content: "\e195"; } }
+.glyphicon-cloud-download { &:before { content: "\e197"; } }
+.glyphicon-cloud-upload { &:before { content: "\e198"; } }
+.glyphicon-tree-conifer { &:before { content: "\e199"; } }
+.glyphicon-tree-deciduous { &:before { content: "\e200"; } }
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_grid.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_grid.scss
index d29b7aa..f71f8b9 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_grid.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_grid.scss
@@ -1,8 +1,84 @@
-// GRID SYSTEM
-// -----------
+//
+// Grid system
+// --------------------------------------------------
-// Fixed (940px)
-@include gridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth);
-// Fluid (940px)
-@include fluidGridSystemGenerate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
\ No newline at end of file
+// Container widths
+//
+// Set the container width, and override it for fixed navbars in media queries.
+
+.container {
+ @include container-fixed();
+
+ @media (min-width: $screen-sm-min) {
+ width: $container-sm;
+ }
+ @media (min-width: $screen-md-min) {
+ width: $container-md;
+ }
+ @media (min-width: $screen-lg-min) {
+ width: $container-lg;
+ }
+}
+
+
+// Fluid container
+//
+// Utilizes the mixin meant for fixed width containers, but without any defined
+// width for fluid, full width layouts.
+
+.container-fluid {
+ @include container-fixed();
+}
+
+
+// Row
+//
+// Rows contain and clear the floats of your columns.
+
+.row {
+ @include make-row();
+}
+
+
+// Columns
+//
+// Common styles for small and large grid columns
+
+@include make-grid-columns();
+
+
+// Extra small grid
+//
+// Columns, offsets, pushes, and pulls for extra small devices like
+// smartphones.
+
+@include make-grid(xs);
+
+
+// Small grid
+//
+// Columns, offsets, pushes, and pulls for the small device range, from phones
+// to tablets.
+
+@media (min-width: $screen-sm-min) {
+ @include make-grid(sm);
+}
+
+
+// Medium grid
+//
+// Columns, offsets, pushes, and pulls for the desktop device range.
+
+@media (min-width: $screen-md-min) {
+ @include make-grid(md);
+}
+
+
+// Large grid
+//
+// Columns, offsets, pushes, and pulls for the large desktop device range.
+
+@media (min-width: $screen-lg-min) {
+ @include make-grid(lg);
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_hero-unit.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_hero-unit.scss
deleted file mode 100644
index 7184ffb..0000000
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_hero-unit.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// HERO UNIT
-// ---------
-
-.hero-unit {
- padding: 60px;
- margin-bottom: 30px;
- background-color: #f5f5f5;
- @include border-radius(6px);
- h1 {
- margin-bottom: 0;
- font-size: 60px;
- line-height: 1;
- letter-spacing: -1px;
- }
- p {
- font-size: 18px;
- font-weight: 200;
- line-height: $baseLineHeight * 1.5;
- }
-}
\ No newline at end of file
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_input-groups.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_input-groups.scss
new file mode 100644
index 0000000..6c26c1d
--- /dev/null
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_input-groups.scss
@@ -0,0 +1,162 @@
+//
+// Input groups
+// --------------------------------------------------
+
+// Base styles
+// -------------------------
+.input-group {
+ position: relative; // For dropdowns
+ display: table;
+ border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
+
+ // Undo padding and float of grid classes
+ &[class*="col-"] {
+ float: none;
+ padding-left: 0;
+ padding-right: 0;
+ }
+
+ .form-control {
+ // Ensure that the input is always above the *appended* addon button for
+ // proper border colors.
+ position: relative;
+ z-index: 2;
+
+ // IE9 fubars the placeholder attribute in text inputs and the arrows on
+ // select elements in input groups. To fix it, we float the input. Details:
+ // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
+ float: left;
+
+ width: 100%;
+ margin-bottom: 0;
+ }
+}
+
+// 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 { @extend .input-lg; }
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn { @extend .input-sm; }
+
+
+// Display as table-cell
+// -------------------------
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ display: table-cell;
+
+ &:not(:first-child):not(:last-child) {
+ border-radius: 0;
+ }
+}
+// Addon and addon wrapper for buttons
+.input-group-addon,
+.input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle; // Match the inputs
+}
+
+// Text input groups
+// -------------------------
+.input-group-addon {
+ padding: $padding-base-vertical $padding-base-horizontal;
+ font-size: $font-size-base;
+ font-weight: normal;
+ line-height: 1;
+ color: $input-color;
+ text-align: center;
+ background-color: $input-group-addon-bg;
+ border: 1px solid $input-group-addon-border-color;
+ border-radius: $border-radius-base;
+
+ // Sizing
+ &.input-sm {
+ padding: $padding-small-vertical $padding-small-horizontal;
+ font-size: $font-size-small;
+ border-radius: $border-radius-small;
+ }
+ &.input-lg {
+ padding: $padding-large-vertical $padding-large-horizontal;
+ font-size: $font-size-large;
+ border-radius: $border-radius-large;
+ }
+
+ // Nuke default margins from checkboxes and radios to vertically center within.
+ input[type="radio"],
+ input[type="checkbox"] {
+ margin-top: 0;
+ }
+}
+
+// Reset rounded corners
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+ @include border-right-radius(0);
+}
+.input-group-addon:first-child {
+ border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+ @include border-left-radius(0);
+}
+.input-group-addon:last-child {
+ border-left: 0;
+}
+
+// Button input groups
+// -------------------------
+.input-group-btn {
+ position: relative;
+ // Jankily prevent input button groups from wrapping with `white-space` and
+ // `font-size` in combination with `inline-block` on buttons.
+ font-size: 0;
+ white-space: nowrap;
+
+ // Negative margin for spacing, position for bringing hovered/focused/actived
+ // element above the siblings.
+ > .btn {
+ position: relative;
+ + .btn {
+ margin-left: -1px;
+ }
+ // Bring the "active" button to the front
+ &:hover,
+ &:focus,
+ &:active {
+ z-index: 2;
+ }
+ }
+
+ // Negative margin to only have a 1px border between the two
+ &:first-child {
+ > .btn,
+ > .btn-group {
+ margin-right: -1px;
+ }
+ }
+ &:last-child {
+ > .btn,
+ > .btn-group {
+ margin-left: -1px;
+ }
+ }
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_jumbotron.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_jumbotron.scss
new file mode 100644
index 0000000..4e401e7
--- /dev/null
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_jumbotron.scss
@@ -0,0 +1,44 @@
+//
+// Jumbotron
+// --------------------------------------------------
+
+
+.jumbotron {
+ padding: $jumbotron-padding;
+ margin-bottom: $jumbotron-padding;
+ color: $jumbotron-color;
+ background-color: $jumbotron-bg;
+
+ h1,
+ .h1 {
+ color: $jumbotron-heading-color;
+ }
+ p {
+ margin-bottom: ($jumbotron-padding / 2);
+ font-size: $jumbotron-font-size;
+ font-weight: 200;
+ }
+
+ .container & {
+ border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
+ }
+
+ .container {
+ max-width: 100%;
+ }
+
+ @media screen and (min-width: $screen-sm-min) {
+ padding-top: ($jumbotron-padding * 1.6);
+ padding-bottom: ($jumbotron-padding * 1.6);
+
+ .container & {
+ padding-left: ($jumbotron-padding * 2);
+ padding-right: ($jumbotron-padding * 2);
+ }
+
+ h1,
+ .h1 {
+ font-size: ($font-size-base * 4.5);
+ }
+ }
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_labels.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_labels.scss
index 6e4c22d..8353eb1 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_labels.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_labels.scss
@@ -1,32 +1,64 @@
-// LABELS
-// ------
+//
+// Labels
+// --------------------------------------------------
-// Base
.label {
- padding: 2px 4px 3px;
- font-size: $baseFontSize * .85;
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
font-weight: bold;
- color: $white;
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
- background-color: $grayLight;
- @include border-radius(3px);
-}
+ line-height: 1;
+ color: $label-color;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
-// Hover state
-.label:hover {
- color: $white;
- text-decoration: none;
+ // Add hover effects, but only for links
+ &[href] {
+ &:hover,
+ &:focus {
+ color: $label-link-hover-color;
+ text-decoration: none;
+ cursor: pointer;
+ }
+ }
+
+ // Empty labels collapse automatically (not available in IE8)
+ &:empty {
+ display: none;
+ }
+
+ // Quick fix for labels in buttons
+ .btn & {
+ position: relative;
+ top: -1px;
+ }
}
// Colors
-.label-important { background-color: $errorText; }
-.label-important:hover { background-color: darken($errorText, 10%); }
+// Contextual variations (linked labels get darker on :hover)
-.label-warning { background-color: $orange; }
-.label-warning:hover { background-color: darken($orange, 10%); }
+.label-default {
+ @include label-variant($label-default-bg);
+}
-.label-success { background-color: $successText; }
-.label-success:hover { background-color: darken($successText, 10%); }
+.label-primary {
+ @include label-variant($label-primary-bg);
+}
-.label-info { background-color: $infoText; }
-.label-info:hover { background-color: darken($infoText, 10%); }
\ No newline at end of file
+.label-success {
+ @include label-variant($label-success-bg);
+}
+
+.label-info {
+ @include label-variant($label-info-bg);
+}
+
+.label-warning {
+ @include label-variant($label-warning-bg);
+}
+
+.label-danger {
+ @include label-variant($label-danger-bg);
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_layouts.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_layouts.scss
deleted file mode 100644
index c600522..0000000
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_layouts.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// Layouts
-// Fixed-width and fluid (with sidebar) layouts
-// --------------------------------------------
-
-
-// Container (centered, fixed-width layouts)
-.container {
- @include container-fixed();
-}
-
-// Fluid layouts (left aligned, with sidebar, min- & max-width content)
-.container-fluid {
- padding-left: $gridGutterWidth;
- padding-right: $gridGutterWidth;
- @include clearfix();
-}
\ No newline at end of file
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_list-group.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_list-group.scss
new file mode 100644
index 0000000..b608991
--- /dev/null
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_list-group.scss
@@ -0,0 +1,110 @@
+//
+// List groups
+// --------------------------------------------------
+
+
+// Base class
+//
+// Easily usable on , , or .
+
+.list-group {
+ // No need to set list-style: none; since .list-group-item is block level
+ margin-bottom: 20px;
+ padding-left: 0; // reset padding because ul and ol
+}
+
+
+// Individual list items
+//
+// Use on `li`s or `div`s within the `.list-group` parent.
+
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ // Place the border on the list items and negative margin up for better styling
+ margin-bottom: -1px;
+ background-color: $list-group-bg;
+ border: 1px solid $list-group-border;
+
+ // Round the first and last items
+ &:first-child {
+ @include border-top-radius($list-group-border-radius);
+ }
+ &:last-child {
+ margin-bottom: 0;
+ @include border-bottom-radius($list-group-border-radius);
+ }
+
+ // Align badges within list items
+ > .badge {
+ float: right;
+ }
+ > .badge + .badge {
+ margin-right: 5px;
+ }
+}
+
+
+// Linked list items
+//
+// Use anchor elements instead of `li`s or `div`s to create linked list items.
+// Includes an extra `.active` modifier class for showing selected items.
+
+a.list-group-item {
+ color: $list-group-link-color;
+
+ .list-group-item-heading {
+ color: $list-group-link-heading-color;
+ }
+
+ // Hover state
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: $list-group-hover-bg;
+ }
+
+ // Active class on item itself, not parent
+ &.active,
+ &.active:hover,
+ &.active:focus {
+ z-index: 2; // Place active items above their siblings for proper border styling
+ color: $list-group-active-color;
+ background-color: $list-group-active-bg;
+ border-color: $list-group-active-border;
+
+ // Force color to inherit for custom content
+ .list-group-item-heading {
+ color: inherit;
+ }
+ .list-group-item-text {
+ color: $list-group-active-text-color;
+ }
+ }
+}
+
+
+// Contextual variants
+//
+// Add modifier classes to change text and background color on individual items.
+// Organizationally, this must come after the `:hover` states.
+
+@include list-group-item-variant(success, $state-success-bg, $state-success-text);
+@include list-group-item-variant(info, $state-info-bg, $state-info-text);
+@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
+@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
+
+
+// Custom content options
+//
+// Extra classes for creating well-formatted content within `.list-group-item`s.
+
+.list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_media.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_media.scss
new file mode 100644
index 0000000..5ad22cd
--- /dev/null
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_media.scss
@@ -0,0 +1,56 @@
+// Media objects
+// Source: http://stubbornella.org/content/?p=497
+// --------------------------------------------------
+
+
+// Common styles
+// -------------------------
+
+// Clear the floats
+.media,
+.media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+
+// Proper spacing between instances of .media
+.media,
+.media .media {
+ margin-top: 15px;
+}
+.media:first-child {
+ margin-top: 0;
+}
+
+// For images and videos, set to block
+.media-object {
+ display: block;
+}
+
+// Reset margins on headings for tighter default spacing
+.media-heading {
+ margin: 0 0 5px;
+}
+
+
+// Media image alignment
+// -------------------------
+
+.media {
+ > .pull-left {
+ margin-right: 10px;
+ }
+ > .pull-right {
+ margin-left: 10px;
+ }
+}
+
+
+// Media list variation
+// -------------------------
+
+// Undo default ul/ol styles
+.media-list {
+ padding-left: 0;
+ list-style: none;
+}
diff --git a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_mixins.scss b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_mixins.scss
index 1731051..74ccf9f 100644
--- a/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_mixins.scss
+++ b/xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_mixins.scss
@@ -1,349 +1,243 @@
-// Mixins.less
-// Snippets of reusable CSS to develop faster and keep code readable
-// -----------------------------------------------------------------
-
-
-// UTILITY MIXINS
+//
+// Mixins
// --------------------------------------------------
+
+// Utilities
+// -------------------------
+
// Clearfix
-// --------
-// For clearing floats like a boss h5bp.com/q
+// Source: http://nicolasgallagher.com/micro-clearfix-hack/
+//
+// For modern browsers
+// 1. The space content is one way to avoid an Opera bug when the
+// contenteditable attribute is included anywhere else in the document.
+// Otherwise it causes space to appear at the top and bottom of elements
+// that are clearfixed.
+// 2. The use of `table` rather than `block` is only necessary if using
+// `:before` to contain the top-margins of child elements.
@mixin clearfix() {
- *zoom: 1;
&:before,
&:after {
- display: table;
- content: "";
+ content: " "; // 1
+ display: table; // 2
}
&:after {
clear: both;
}
}
-.clearfix { @include clearfix(); }
-// Webkit-style focus
-// ------------------
+// WebKit-style focus
@mixin tab-focus() {
// Default
- outline: thin dotted #333;
- // Webkit
+ outline: thin dotted;
+ // WebKit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
// Center-align a block level element
-// ----------------------------------
@mixin center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
-// IE7 inline-block
-// ----------------
-@mixin ie7-inline-block() {
- *display: inline; /* IE7 inline-block hack */
- *zoom: 1;
-}
-
-// IE7 likes to collapse whitespace on either side of the inline-block elements.
-// Ems because we're attempting to match the width of a space character. Left
-// version is for form buttons, which typically come after other elements, and
-// right version is for icons, which come before. Applying both is ok, but it will
-// mean that space between those elements will be .6em (~2 space characters) in IE7,
-// instead of the 1 space in other browsers.
-@mixin ie7-restore-left-whitespace() {
- *margin-left: .3em;
-
- &:first-child {
- *margin-left: 0;
- }
-}
-
-@mixin ie7-restore-right-whitespace() {
- *margin-right: .3em;
-
- &:last-child {
- *margin-left: 0;
- }
-}
-
// Sizing shortcuts
-// -------------------------
-@mixin size($height: 5px, $width: 5px) {
+@mixin size($width, $height) {
width: $width;
height: $height;
}
-@mixin square($size: 5px) {
+@mixin square($size) {
@include size($size, $size);
}
// Placeholder text
-// -------------------------
-@mixin placeholder($color: $placeholderText) {
- :-moz-placeholder {
- color: $color;
- }
- ::-webkit-input-placeholder {
- color: $color;
- }
+@mixin placeholder($color: $input-color-placeholder) {
+ &::-moz-placeholder { color: $color; // Firefox
+ opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
+ &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
+ &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
}
// Text overflow
-// ------------------------
+// Requires inline-block or block for proper styling
@mixin text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+// CSS image replacement
+//
+// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
+// mixins being reused as classes with the same name, this doesn't hold up. As
+// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
+// that we cannot chain the mixins together in Less, so they are repeated.
+//
+// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
-// FONTS
-// --------------------------------------------------
-@mixin font-family-serif() {
- font-family: Georgia, "Times New Roman", Times, serif;
+// Deprecated as of v3.0.1 (will be removed in v4)
+@mixin hide-text() {
+ font: #{0/0} a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
}
-@mixin font-family-sans-serif() {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-@mixin font-family-monospace() {
- font-family: Menlo, Monaco, "Courier New", monospace;
-}
-@mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
- font-size: $size;
- font-weight: $weight;
- line-height: $lineHeight;
-}
-@mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
- @include font-family-serif();
- @include font-shorthand($size, $weight, $lineHeight);
-}
-@mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
- @include font-family-sans-serif();
- @include font-shorthand($size, $weight, $lineHeight);
-}
-@mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
- @include font-family-monospace();
- @include font-shorthand($size, $weight, $lineHeight);
+// New mixin to use as of v3.0.1
+@mixin text-hide() {
+ @include hide-text();
}
-// GRID SYSTEM
-// --------------------------------------------------
-
-// Site container
-// -------------------------
-@mixin container-fixed() {
- width: $gridRowWidth;
- margin-left: auto;
- margin-right: auto;
- @include clearfix();
-}
-
-// Le grid system
-// -------------------------
-
-// Setup the mixins to be used
-@mixin gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
- width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
-}
-@mixin gridSystemOffset($gridColumnWidth, $gridGutterWidth, $columns) {
- margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
-}
-@mixin gridSystemGridColumn($gridGutterWidth) {
- float: left;
- margin-left: $gridGutterWidth;
-}
-// Take these values and mixins, and make 'em do their thang
-@mixin gridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
- // Row surrounds the columns
- .row {
- margin-left: $gridGutterWidth * -1;
- @include clearfix();
- }
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
- [class*="span"] {
- @include gridSystemGridColumn($gridGutterWidth);
- }
- // Default columns
- @for $i from 1 through $gridColumns {
- .span#{$i} { @include gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i) }
- }
- .container { @include gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $gridColumns) }
-
- // Offset column options
- @for $i from 1 through $gridColumns - 1 {
- .offset#{$i} { @include gridSystemOffset($gridColumnWidth, $gridGutterWidth, $i) }
- }
-}
-
-// Fluid grid system
-// -------------------------
-@mixin fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $columns) {
- width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
-}
-@mixin fluidGridSystemGridColumn($fluidGridGutterWidth) {
- float: left;
- margin-left: $fluidGridGutterWidth;
-}
-// Take these values and mixins, and make 'em do their thang
-@mixin fluidGridSystemGenerate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
- // Row surrounds the columns
- .row-fluid {
- width: 100%;
- @include clearfix();
-
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
- > [class*="span"] {
- @include fluidGridSystemGridColumn($fluidGridGutterWidth);
- }
- > [class*="span"]:first-child {
- margin-left: 0;
- }
- // Default columns
- @for $i from 1 through $gridColumns {
- > .span#{$i} { @include fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $i); }
- }
- }
-}
-
-// Input grid system
-// -------------------------
-@mixin inputGridSystemInputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
- width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 10;
-}
-@mixin inputGridSystemGenerate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
- input, textarea, .uneditable-input {
- @for $i from 1 through $gridColumns {
- &.span#{$i} { @include inputGridSystemInputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i); }
- }
- }
-}
-
-// Make a grid
-// -------------------------
-// Use makeRow() and makeColumn() to assign semantic layouts grid system behaviour
-@mixin makeRow() {
- margin-left: $gridGutterWidth * -1;
- @include clearfix();
-}
-@mixin makeColumn($columns: 1) {
- float: left;
- margin-left: $gridGutterWidth;
- width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
-}
-
-
-// Form field states (used in forms.less)
-// --------------------------------------------------
-
-// Mixin for form field states
-@mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
- // Set the text color
- > label, .help-block, .help-inline {
- color: $textColor;
- }
- // Style inputs accordingly
- input, select, textarea {
- color: $textColor;
- border-color: $borderColor;
- &:focus {
- border-color: darken($borderColor, 10%);
- @include box-shadow(0 0 6px lighten($borderColor, 20%));
- }
- }
- // Give a small background color for input-prepend/-append
- .input-prepend .add-on, .input-append .add-on {
- color: $textColor;
- background-color: $backgroundColor;
- border-color: $textColor;
- }
-}
-
-
// CSS3 PROPERTIES
// --------------------------------------------------
-// Border Radius
-@mixin border-radius($radius: 5px) {
- -webkit-border-radius: $radius;
- -moz-border-radius: $radius;
- border-radius: $radius;
+// Single side border-radius
+@mixin border-top-radius($radius) {
+ border-top-right-radius: $radius;
+ border-top-left-radius: $radius;
+}
+@mixin border-right-radius($radius) {
+ border-bottom-right-radius: $radius;
+ border-top-right-radius: $radius;
+}
+@mixin border-bottom-radius($radius) {
+ border-bottom-right-radius: $radius;
+ border-bottom-left-radius: $radius;
+}
+@mixin border-left-radius($radius) {
+ border-bottom-left-radius: $radius;
+ border-top-left-radius: $radius;
}
// Drop shadows
-@mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
- -webkit-box-shadow: $shadow;
- -moz-box-shadow: $shadow;
+//
+// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
+// supported browsers that have box shadow capabilities now support the
+// standard `box-shadow` property.
+@mixin box-shadow($shadow...) {
+ -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
box-shadow: $shadow;
}
// Transitions
-@mixin transition($transition) {
+@mixin transition($transition...) {
-webkit-transition: $transition;
- -moz-transition: $transition;
- -ms-transition: $transition;
- -o-transition: $transition;
transition: $transition;
}
+@mixin transition-property($transition-property...) {
+ -webkit-transition-property: $transition-property;
+ transition-property: $transition-property;
+}
+@mixin transition-delay($transition-delay) {
+ -webkit-transition-delay: $transition-delay;
+ transition-delay: $transition-delay;
+}
+@mixin transition-duration($transition-duration...) {
+ -webkit-transition-duration: $transition-duration;
+ transition-duration: $transition-duration;
+}
+@mixin transition-transform($transition...) {
+ -webkit-transition: -webkit-transform $transition;
+ -moz-transition: -moz-transform $transition;
+ -o-transition: -o-transform $transition;
+ transition: transform $transition;
+}
// Transformations
@mixin rotate($degrees) {
-webkit-transform: rotate($degrees);
- -moz-transform: rotate($degrees);
- -ms-transform: rotate($degrees);
- -o-transform: rotate($degrees);
+ -ms-transform: rotate($degrees); // IE9 only
transform: rotate($degrees);
}
-@mixin scale($ratio) {
- -webkit-transform: scale($ratio);
- -moz-transform: scale($ratio);
- -ms-transform: scale($ratio);
- -o-transform: scale($ratio);
- transform: scale($ratio);
+@mixin scale($scale-args...) {
+ -webkit-transform: scale($scale-args);
+ -ms-transform: scale($scale-args); // IE9 only
+ transform: scale($scale-args);
}
-@mixin translate($x: 0, $y: 0) {
+@mixin translate($x, $y) {
-webkit-transform: translate($x, $y);
- -moz-transform: translate($x, $y);
- -ms-transform: translate($x, $y);
- -o-transform: translate($x, $y);
+ -ms-transform: translate($x, $y); // IE9 only
transform: translate($x, $y);
}
-
-@mixin skew($x: 0, $y: 0) {
+@mixin skew($x, $y) {
-webkit-transform: skew($x, $y);
- -moz-transform: skew($x, $y);
- -ms-transform: skew($x, $y);
- -o-transform: skew($x, $y);
+ -ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
transform: skew($x, $y);
}
-
-@mixin translate3d($x: 0, $y: 0, $z: 0) {
- -webkit-transform: translate($x, $y, $z);
- -moz-transform: translate($x, $y, $z);
- -ms-transform: translate($x, $y, $z);
- -o-transform: translate($x, $y, $z);
- transform: translate($x, $y, $z);
+@mixin translate3d($x, $y, $z) {
+ -webkit-transform: translate3d($x, $y, $z);
+ transform: translate3d($x, $y, $z);
}
-// Background clipping
-// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
-@mixin background-clip($clip) {
- -webkit-background-clip: $clip;
- -moz-background-clip: $clip;
- background-clip: $clip;
+@mixin rotateX($degrees) {
+ -webkit-transform: rotateX($degrees);
+ -ms-transform: rotateX($degrees); // IE9 only
+ transform: rotateX($degrees);
+}
+@mixin rotateY($degrees) {
+ -webkit-transform: rotateY($degrees);
+ -ms-transform: rotateY($degrees); // IE9 only
+ transform: rotateY($degrees);
+}
+@mixin perspective($perspective) {
+ -webkit-perspective: $perspective;
+ -moz-perspective: $perspective;
+ perspective: $perspective;
+}
+@mixin perspective-origin($perspective) {
+ -webkit-perspective-origin: $perspective;
+ -moz-perspective-origin: $perspective;
+ perspective-origin: $perspective;
+}
+@mixin transform-origin($origin) {
+ -webkit-transform-origin: $origin;
+ -moz-transform-origin: $origin;
+ -ms-transform-origin: $origin; // IE9 only
+ transform-origin: $origin;
}
-// Background sizing
-@mixin background-size($size){
- -webkit-background-size: $size;
- -moz-background-size: $size;
- -o-background-size: $size;
- background-size: $size;
+// Animations
+@mixin animation($animation) {
+ -webkit-animation: $animation;
+ animation: $animation;
+}
+@mixin animation-name($name) {
+ -webkit-animation-name: $name;
+ animation-name: $name;
+}
+@mixin animation-duration($duration) {
+ -webkit-animation-duration: $duration;
+ animation-duration: $duration;
+}
+@mixin animation-timing-function($timing-function) {
+ -webkit-animation-timing-function: $timing-function;
+ animation-timing-function: $timing-function;
+}
+@mixin animation-delay($delay) {
+ -webkit-animation-delay: $delay;
+ animation-delay: $delay;
+}
+@mixin animation-iteration-count($iteration-count) {
+ -webkit-animation-iteration-count: $iteration-count;
+ animation-iteration-count: $iteration-count;
+}
+@mixin animation-direction($direction) {
+ -webkit-animation-direction: $direction;
+ animation-direction: $direction;
}
+// Backface visibility
+// Prevent browsers from flickering when using CSS 3D transforms.
+// Default value is `visible`, but can be changed to `hidden`
+@mixin backface-visibility($visibility){
+ -webkit-backface-visibility: $visibility;
+ -moz-backface-visibility: $visibility;
+ backface-visibility: $visibility;
+}
// Box sizing
@mixin box-sizing($boxmodel) {
@@ -357,174 +251,697 @@
@mixin user-select($select) {
-webkit-user-select: $select;
-moz-user-select: $select;
- -o-user-select: $select;
+ -ms-user-select: $select; // IE10+
user-select: $select;
}
// Resize anything
-@mixin resizable($direction: both) {
+@mixin resizable($direction) {
resize: $direction; // Options: horizontal, vertical, both
overflow: auto; // Safari fix
}
// CSS3 Content Columns
-@mixin content-columns($columnCount, $columnGap: $gridColumnGutter) {
- -webkit-column-count: $columnCount;
- -moz-column-count: $columnCount;
- column-count: $columnCount;
- -webkit-column-gap: $columnGap;
- -moz-column-gap: $columnGap;
- column-gap: $columnGap;
+@mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
+ -webkit-column-count: $column-count;
+ -moz-column-count: $column-count;
+ column-count: $column-count;
+ -webkit-column-gap: $column-gap;
+ -moz-column-gap: $column-gap;
+ column-gap: $column-gap;
+}
+
+// Optional hyphenation
+@mixin hyphens($mode: auto) {
+ word-wrap: break-word;
+ -webkit-hyphens: $mode;
+ -moz-hyphens: $mode;
+ -ms-hyphens: $mode; // IE10+
+ -o-hyphens: $mode;
+ hyphens: $mode;
}
// Opacity
-@mixin opacity($opacity: 1) {
+@mixin opacity($opacity) {
opacity: $opacity;
- filter: alpha(opacity=$opacity * 100);
+ // IE8 filter
+ $opacity-ie: ($opacity * 100);
+ filter: #{alpha(opacity=$opacity-ie)};
}
-// BACKGROUNDS
+// GRADIENTS
// --------------------------------------------------
-// Add an alphatransparency value to any background or border color (via Elyse Holladay)
-@mixin translucent-background($color: $white, $alpha: 1) {
- background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
-}
-@mixin translucent-border($color: $white, $alpha: 1) {
- border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
- @include background-clip(padding-box);
+
+
+// Horizontal gradient, from left to right
+//
+// 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.
+@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
+ background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1-6, Chrome 10+
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
}
-// Gradient Bar Colors for buttons and alerts
-@mixin gradientBar($primaryColor, $secondaryColor) {
- @include gradient-vertical($primaryColor, $secondaryColor);
- border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
+// Vertical gradient, from top to bottom
+//
+// 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.
+@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
+ background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
}
-// Gradients
-@mixin gradient-horizontal($startColor: #555, $endColor: #333) {
- background-color: $endColor;
- background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
- background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
- background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
- background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
- background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
- background-image: linear-gradient(left, $startColor, $endColor); // Le standard
+@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=1); // IE9 and down
+ background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
+ background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
}
-@mixin gradient-vertical($startColor: #555, $endColor: #333) {
- background-color: mix($startColor, $endColor, 60%);
- background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
- background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
- background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
- background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
- background-image: linear-gradient(top, $startColor, $endColor); // The standard
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down
-}
-@mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
- background-color: $endColor;
- background-repeat: repeat-x;
- background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
- background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
- background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
- background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
- background-image: linear-gradient($deg, $startColor, $endColor); // The standard
-}
-@mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
- background-color: mix($midColor, $endColor, 80%);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
- background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
- background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
- background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
- background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
- background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
+@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
+ background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
background-repeat: no-repeat;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
}
-@mixin gradient-radial($innerColor: #555, $outerColor: #333) {
- background-color: $outerColor;
- background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
- background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
- background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
- background-image: -ms-radial-gradient(circle, $innerColor, $outerColor);
+@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
+ background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
background-repeat: no-repeat;
- // Opera cannot do radial gradients yet
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
}
-@mixin gradient-striped($color, $angle: -45deg) {
- background-color: $color;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
- background-image: -ms-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, rgba(255,255,255,0) 75%, rgba(255,255,255,0));
+@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
+ background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
+ background-repeat: no-repeat;
}
+@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
+ background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
+ background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
+}
+
// Reset filters for IE
+//
+// When you need to remove a gradient background, do not forget to use this to reset
+// the IE filter for IE9 and below.
@mixin reset-filter() {
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
-// Mixin for generating button backgrounds
-// ---------------------------------------
-@mixin buttonBackground($startColor, $endColor) {
- // gradientBar will set the background to a pleasing blend of these, to support IE<=9
- @include gradientBar($startColor, $endColor);
- @include reset-filter();
- // in these cases the gradient won't cover the background, so we override
- &:hover, &:active, &.active, &.disabled, &[disabled] {
- background-color: $endColor;
- }
+// Retina images
+//
+// Short retina mixin for setting background-image and -size
- // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
- &:active, &.active {
- background-color: darken($endColor, 10%) \9;
+@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
+ background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
+
+ @media
+ only screen and (-webkit-min-device-pixel-ratio: 2),
+ only screen and ( min--moz-device-pixel-ratio: 2),
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
+ only screen and ( min-device-pixel-ratio: 2),
+ only screen and ( min-resolution: 192dpi),
+ only screen and ( min-resolution: 2dppx) {
+ background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
+ background-size: $width-1x $height-1x;
}
}
+// Responsive image
+//
+// Keep images from scaling beyond the width of their parents.
+
+@mixin img-responsive($display: block) {
+ display: $display;
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
+}
+
+
// COMPONENT MIXINS
// --------------------------------------------------
-// POPOVER ARROWS
+// Horizontal dividers
// -------------------------
-// For tipsies and popovers
-@mixin popoverArrowTop($arrowWidth: 5px) {
- bottom: 0;
- left: 50%;
- margin-left: -$arrowWidth;
- border-left: $arrowWidth solid transparent;
- border-right: $arrowWidth solid transparent;
- border-top: $arrowWidth solid $black;
+// Dividers (basically an hr) within dropdowns and nav lists
+@mixin nav-divider($color: #e5e5e5) {
+ height: 1px;
+ margin: (($line-height-computed / 2) - 1) 0;
+ overflow: hidden;
+ background-color: $color;
}
-@mixin popoverArrowLeft($arrowWidth: 5px) {
- top: 50%;
- right: 0;
- margin-top: -$arrowWidth;
- border-top: $arrowWidth solid transparent;
- border-bottom: $arrowWidth solid transparent;
- border-left: $arrowWidth solid $black;
+
+// Panels
+// -------------------------
+@mixin 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;
+ }
+ }
}
-@mixin popoverArrowBottom($arrowWidth: 5px) {
- top: 0;
- left: 50%;
- margin-left: -$arrowWidth;
- border-left: $arrowWidth solid transparent;
- border-right: $arrowWidth solid transparent;
- border-bottom: $arrowWidth solid $black;
+
+// Alerts
+// -------------------------
+@mixin alert-variant($background, $border, $text-color) {
+ background-color: $background;
+ border-color: $border;
+ color: $text-color;
+
+ hr {
+ border-top-color: darken($border, 5%);
+ }
+ .alert-link {
+ color: darken($text-color, 10%);
+ }
}
-@mixin popoverArrowRight($arrowWidth: 5px) {
- top: 50%;
- left: 0;
- margin-top: -$arrowWidth;
- border-top: $arrowWidth solid transparent;
- border-bottom: $arrowWidth solid transparent;
- border-right: $arrowWidth solid $black;
+
+// Tables
+// -------------------------
+@mixin table-row-variant($state, $background) {
+ // Exact selectors below required to override `.table-striped` and prevent
+ // inheritance to nested tables.
+ .table > thead > tr,
+ .table > tbody > tr,
+ .table > tfoot > tr {
+ > td.#{$state},
+ > th.#{$state},
+ &.#{$state} > td,
+ &.#{$state} > th {
+ background-color: $background;
+ }
+ }
+
+ // Hover states for `.table-hover`
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
+ .table-hover > tbody > tr {
+ > td.#{$state}:hover,
+ > th.#{$state}:hover,
+ &.#{$state}:hover > td,
+ &.#{$state}:hover > th {
+ background-color: darken($background, 5%);
+ }
+ }
+}
+
+// List Groups
+// -------------------------
+@mixin list-group-item-variant($state, $background, $color) {
+ .list-group-item-#{$state} {
+ color: $color;
+ background-color: $background;
+
+ // [converter] extracted a& to a.list-group-item-#{$state}
+ }
+
+ a.list-group-item-#{$state} {
+ color: $color;
+
+ .list-group-item-heading { color: inherit; }
+
+ &:hover,
+ &:focus {
+ color: $color;
+ background-color: darken($background, 5%);
+ }
+ &.active,
+ &.active:hover,
+ &.active:focus {
+ color: #fff;
+ background-color: $color;
+ border-color: $color;
+ }
+ }
+}
+
+// Button variants
+// -------------------------
+// Easily pump out default styles, as well as :hover, :focus, :active,
+// and disabled options for all buttons
+@mixin button-variant($color, $background, $border) {
+ color: $color;
+ background-color: $background;
+ border-color: $border;
+
+ &:hover,
+ &:focus,
+ &:active,
+ &.active {
+ color: $color;
+ background-color: darken($background, 8%);
+ border-color: darken($border, 12%);
+ }
+ .open & { &.dropdown-toggle {
+ color: $color;
+ background-color: darken($background, 8%);
+ border-color: darken($border, 12%);
+ } }
+ &:active,
+ &.active {
+ background-image: none;
+ }
+ .open & { &.dropdown-toggle {
+ background-image: none;
+ } }
+ &.disabled,
+ &[disabled],
+ fieldset[disabled] & {
+ &,
+ &:hover,
+ &:focus,
+ &:active,
+ &.active {
+ background-color: $background;
+ border-color: $border;
+ }
+ }
+
+ .badge {
+ color: $background;
+ background-color: $color;
+ }
+}
+
+// Button sizes
+// -------------------------
+@mixin 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
+// -------------------------
+@mixin 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 {
+ @include border-left-radius($border-radius);
+ }
+ }
+ &:last-child {
+ > a,
+ > span {
+ @include border-right-radius($border-radius);
+ }
+ }
+ }
+}
+
+// Labels
+// -------------------------
+@mixin label-variant($color) {
+ background-color: $color;
+ &[href] {
+ &:hover,
+ &:focus {
+ background-color: darken($color, 10%);
+ }
+ }
+}
+
+// Contextual backgrounds
+// -------------------------
+// [converter] $parent hack
+@mixin bg-variant($parent, $color) {
+ #{$parent} {
+ background-color: $color;
+ }
+ a#{$parent}:hover {
+ background-color: darken($color, 10%);
+ }
+}
+
+// Typography
+// -------------------------
+// [converter] $parent hack
+@mixin text-emphasis-variant($parent, $color) {
+ #{$parent} {
+ color: $color;
+ }
+ a#{$parent}:hover {
+ color: darken($color, 10%);
+ }
+}
+
+// Navbar vertical align
+// -------------------------
+// Vertically center elements in the navbar.
+// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
+@mixin navbar-vertical-align($element-height) {
+ margin-top: (($navbar-height - $element-height) / 2);
+ margin-bottom: (($navbar-height - $element-height) / 2);
+}
+
+// Progress bars
+// -------------------------
+@mixin progress-bar-variant($color) {
+ background-color: $color;
+ .progress-striped & {
+ @include gradient-striped();
+ }
+}
+
+// Responsive utilities
+// -------------------------
+// More easily include all the states for responsive-utilities.less.
+// [converter] $parent hack
+@mixin responsive-visibility($parent) {
+ #{$parent} {
+ display: block !important;
+ }
+ table#{$parent} { display: table; }
+ tr#{$parent} { display: table-row !important; }
+ th#{$parent},
+ td#{$parent} { display: table-cell !important; }
+}
+
+// [converter] $parent hack
+@mixin responsive-invisibility($parent) {
+ #{$parent} {
+ display: none !important;
+ }
+}
+
+
+// Grid System
+// -----------
+
+// Centered container element
+@mixin container-fixed() {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: ($grid-gutter-width / 2);
+ padding-right: ($grid-gutter-width / 2);
+ @include clearfix();
+}
+
+// Creates a wrapper for a series of columns
+@mixin make-row($gutter: $grid-gutter-width) {
+ margin-left: ($gutter / -2);
+ margin-right: ($gutter / -2);
+ @include clearfix();
+}
+
+// Generate the extra small columns
+@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
+ position: relative;
+ float: left;
+ width: percentage(($columns / $grid-columns));
+ min-height: 1px;
+ padding-left: ($gutter / 2);
+ padding-right: ($gutter / 2);
+}
+@mixin make-xs-column-offset($columns) {
+ @media (min-width: $screen-xs-min) {
+ margin-left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-xs-column-push($columns) {
+ @media (min-width: $screen-xs-min) {
+ left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-xs-column-pull($columns) {
+ @media (min-width: $screen-xs-min) {
+ right: percentage(($columns / $grid-columns));
+ }
+}
+
+
+// Generate the small columns
+@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
+ position: relative;
+ min-height: 1px;
+ padding-left: ($gutter / 2);
+ padding-right: ($gutter / 2);
+
+ @media (min-width: $screen-sm-min) {
+ float: left;
+ width: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-sm-column-offset($columns) {
+ @media (min-width: $screen-sm-min) {
+ margin-left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-sm-column-push($columns) {
+ @media (min-width: $screen-sm-min) {
+ left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-sm-column-pull($columns) {
+ @media (min-width: $screen-sm-min) {
+ right: percentage(($columns / $grid-columns));
+ }
+}
+
+
+// Generate the medium columns
+@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
+ position: relative;
+ min-height: 1px;
+ padding-left: ($gutter / 2);
+ padding-right: ($gutter / 2);
+
+ @media (min-width: $screen-md-min) {
+ float: left;
+ width: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-md-column-offset($columns) {
+ @media (min-width: $screen-md-min) {
+ margin-left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-md-column-push($columns) {
+ @media (min-width: $screen-md-min) {
+ left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-md-column-pull($columns) {
+ @media (min-width: $screen-md-min) {
+ right: percentage(($columns / $grid-columns));
+ }
+}
+
+
+// Generate the large columns
+@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
+ position: relative;
+ min-height: 1px;
+ padding-left: ($gutter / 2);
+ padding-right: ($gutter / 2);
+
+ @media (min-width: $screen-lg-min) {
+ float: left;
+ width: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-lg-column-offset($columns) {
+ @media (min-width: $screen-lg-min) {
+ margin-left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-lg-column-push($columns) {
+ @media (min-width: $screen-lg-min) {
+ left: percentage(($columns / $grid-columns));
+ }
+}
+@mixin make-lg-column-pull($columns) {
+ @media (min-width: $screen-lg-min) {
+ right: percentage(($columns / $grid-columns));
+ }
+}
+
+
+// Framework grid generation
+//
+// Used only by Bootstrap to generate the correct number of grid classes given
+// any value of `$grid-columns`.
+
+// [converter] This is defined recursively in LESS, but Sass supports real loops
+@mixin make-grid-columns() {
+ $list: '';
+ $i: 1;
+ $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
+ @for $i from (1 + 1) through $grid-columns {
+ $list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
+ }
+ #{$list} {
+ 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);
+ }
+}
+
+
+// [converter] This is defined recursively in LESS, but Sass supports real loops
+@mixin float-grid-columns($class) {
+ $list: '';
+ $i: 1;
+ $list: ".col-#{$class}-#{$i}";
+ @for $i from (1 + 1) through $grid-columns {
+ $list: "#{$list}, .col-#{$class}-#{$i}";
+ }
+ #{$list} {
+ float: left;
+ }
+}
+
+
+@mixin calc-grid-column($index, $class, $type) {
+ @if ($type == width) and ($index > 0) {
+ .col-#{$class}-#{$index} {
+ width: percentage(($index / $grid-columns));
+ }
+ }
+ @if ($type == push) {
+ .col-#{$class}-push-#{$index} {
+ left: percentage(($index / $grid-columns));
+ }
+ }
+ @if ($type == pull) {
+ .col-#{$class}-pull-#{$index} {
+ right: percentage(($index / $grid-columns));
+ }
+ }
+ @if ($type == offset) {
+ .col-#{$class}-offset-#{$index} {
+ margin-left: percentage(($index / $grid-columns));
+ }
+ }
+}
+
+// [converter] This is defined recursively in LESS, but Sass supports real loops
+@mixin loop-grid-columns($columns, $class, $type) {
+ @for $i from 0 through $columns {
+ @include calc-grid-column($i, $class, $type);
+ }
+}
+
+
+// Create grid for specific class
+@mixin make-grid($class) {
+ @include float-grid-columns($class);
+ @include loop-grid-columns($grid-columns, $class, width);
+ @include loop-grid-columns($grid-columns, $class, pull);
+ @include loop-grid-columns($grid-columns, $class, push);
+ @include loop-grid-columns($grid-columns, $class, offset);
+}
+
+// Form validation states
+//
+// Used in forms.less to generate the form validation CSS for warnings, errors,
+// and successes.
+
+@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
+ // Color the label and help text
+ .help-block,
+ .control-label,
+ .radio,
+ .checkbox,
+ .radio-inline,
+ .checkbox-inline {
+ color: $text-color;
+ }
+ // Set the border and box shadow on specific inputs to match
+ .form-control {
+ border-color: $border-color;
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
+ &:focus {
+ border-color: darken($border-color, 10%);
+ $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
+ @include box-shadow($shadow);
+ }
+ }
+ // Set validation states also for addons
+ .input-group-addon {
+ color: $text-color;
+ border-color: $border-color;
+ background-color: $background-color;
+ }
+ // Optional feedback icon
+ .form-control-feedback {
+ color: $text-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.
+
+@mixin form-control-focus($color: $input-border-focus) {
+ $color-rgba: rgba(red($color), green($color), blue($color), .6);
+ &:focus {
+ border-color: $color;
+ outline: 0;
+ @include 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. `