Merge branch 'master' into pr/11536

Conflicts:
	dist/css/bootstrap.min.css
This commit is contained in:
Mark Otto 2013-11-30 23:35:56 -08:00
commit 53047fa587
47 changed files with 799 additions and 842 deletions

1
.gitignore vendored
View File

@ -39,3 +39,4 @@ validation-report.json
# Folders to ignore
node_modules
bower_components

View File

@ -17,7 +17,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
## Pull requests
- CSS changes must be done in `.less` files first, never just the compiled `.css` files
- CSS changes must be done in `.less` files first, never just in the compiled `.css` files
- If modifying the `.less` files, always recompile and commit the compiled files `bootstrap.css` and `bootstrap.min.css`
- Try not to pollute your pull request with unintended changes--keep them simple and small
- Try to share which browsers your code has been tested in before submitting a pull request

View File

@ -11,11 +11,9 @@ module.exports = function(grunt) {
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> by @fat and @mdo\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
' *\n' +
' * Designed and built with all the love in the world by @mdo and @fat.\n' +
' */\n\n',
jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n',

View File

@ -1,10 +1,9 @@
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="{{ page.base_url }}dist/js/bootstrap.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="{{ page.base_url }}docs-assets/js/holder.js"></script>
<script src="{{ page.base_url }}docs-assets/js/application.js"></script>
@ -18,6 +17,21 @@
<script src="{{ page.base_url }}docs-assets/js/customizer.js"></script>
{% endif %}
{% comment %}
Inject Twitter widgets asynchronously. Snippet snipped from Twitter's
JS interface site: https://dev.twitter.com/docs/tfw-javascript
* "js.async=1;" added to add async attribute to the generated script tag.
{% endcomment %}
<script>
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id; js.async=1;
js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
</script>
<!-- Analytics
================================================== -->
<script>

View File

@ -8,6 +8,10 @@
</li>
<li>
<a href="#whats-included">What's included</a>
<ul class="nav">
<li><a href="#whats-included-precompiled">Precompiled</a></li>
<li><a href="#whats-included-source">Source code</a></li>
</ul>
</li>
<li>
<a href="#template">Basic template</a>

View File

@ -1,7 +1,14 @@
{
"name": "bootstrap",
"version": "3.0.2",
"main": ["./dist/js/bootstrap.js", "./dist/css/bootstrap.css", "./dist/fonts/*"],
"main": [
"./dist/js/bootstrap.js",
"./dist/css/bootstrap.css",
"./dist/fonts/glyphicons-halflings-regular.eot",
"./dist/fonts/glyphicons-halflings-regular.svg",
"./dist/fonts/glyphicons-halflings-regular.ttf",
"./dist/fonts/glyphicons-halflings-regular.woff"
],
"ignore": [
"**/.*",
"_*",

File diff suppressed because it is too large Load Diff

View File

@ -871,7 +871,7 @@ base_url: "../"
<p>Style and content changes for simple variations on a standard <code>&lt;blockquote&gt;</code>.</p>
<h4>Naming a source</h4>
<p>Add <code>&lt;small&gt;</code> tag for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.</p>
<p>Add <code>&lt;small&gt;</code> tag or <code>.small</code> class for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.</p>
<div class="bs-example">
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
@ -1617,7 +1617,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<h2 id="forms-horizontal">Horizontal form</h2>
<p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding <code>.form-horizontal</code> to the form. Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p>
<div class="bs-example">
<form class="form-horizontal">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">

View File

@ -1,9 +1,7 @@
/*!
* Bootstrap v3.0.2 by @fat and @mdo
* Bootstrap v3.0.2 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
.btn-default,

File diff suppressed because one or more lines are too long

617
dist/css/bootstrap.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

10
dist/js/bootstrap.js vendored
View File

@ -1,9 +1,7 @@
/*!
* Bootstrap v3.0.2 by @fat and @mdo
* Bootstrap v3.0.2 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
@ -721,7 +719,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we we use a backdrop because click events don't delegate
// if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
@ -803,9 +801,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('dropdown')
var data = $this.data('bs.dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}

File diff suppressed because one or more lines are too long

View File

@ -586,14 +586,14 @@ h1[id] {
border-color: #faebcc;
}
.bs-callout-warning h4 {
color: #c09853;
color: #8a6d3b;
}
.bs-callout-info {
background-color: #f4f8fa;
border-color: #bce8f1;
}
.bs-callout-info h4 {
color: #3a87ad;
color: #34789a;
}

View File

@ -100,4 +100,4 @@
})
})
}(window.jQuery)
}(jQuery)

View File

@ -231,7 +231,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
result = {
'bootstrap.css' : cw + tree.toCSS(),
'bootstrap.min.css' : cw + tree.toCSS({ compress: true })
'bootstrap.min.css' : cw + tree.toCSS({ compress: true }).replace(/\n/g, '')
}
})
} catch (err) {

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,7 @@
<a class="navbar-brand" href="#">Project name</a>
</div>
<div class="navbar-collapse collapse">
<form class="navbar-form navbar-right">
<form class="navbar-form navbar-right" role="form">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>

View File

@ -2,7 +2,8 @@
* Style tweaks
* --------------------------------------------------
*/
html {
html,
body {
overflow-x: hidden; /* Prevent scroll on narrow devices */
}
body {

View File

@ -30,7 +30,7 @@
<div class="container">
<form class="form-signin">
<form class="form-signin" role="form">
<h2 class="form-signin-heading">Please sign in</h2>
<input type="text" class="form-control" placeholder="Email address" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>

View File

@ -77,7 +77,7 @@
<div id="footer">
<div class="container">
<p class="text-muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin Bean</a> and <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a>.</p>
<p class="text-muted">Place sticky footer content here.</p>
</div>
</div>

View File

@ -31,7 +31,7 @@ body {
#wrap > .container {
padding: 60px 15px 0;
}
.container .credit {
.container .text-muted {
margin: 20px 0;
}

View File

@ -43,7 +43,7 @@
<div id="footer">
<div class="container">
<p class="text-muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin Bean</a> and <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a>.</p>
<p class="text-muted">Place sticky footer content here.</p>
</div>
</div>

View File

@ -33,6 +33,6 @@ body {
max-width: 680px;
padding: 0 15px;
}
.container .credit {
.container .text-muted {
margin: 20px 0;
}

View File

@ -62,9 +62,15 @@ base_url: "../"
<div class="page-header">
<h1 id="whats-included">What's included</h1>
</div>
<p class="lead">Within the download you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.</p>
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
<p class="lead">Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.</p>
<div class="bs-callout bs-callout-warning" id="jquery-required">
<h4>jQuery required</h4>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
</div>
<h2 id="whats-included-precompiled">Precompiled Bootstrap</h2>
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
<!-- NOTE: This info is intentionally duplicated in the README.
Copy any changes made here over to the README too. -->
{% highlight bash %}
@ -85,11 +91,24 @@ bootstrap/
{% endhighlight %}
<p>This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). Fonts from Glyphicons are included, as is the optional Bootstrap theme.</p>
<div class="bs-callout bs-callout-danger" id="jquery-required">
<h4>jQuery required</h4>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
</div>
<h2 id="whats-included-source">Bootstrap source code</h2>
<p>The Bootstrap source code download includes the precompiled CSS, JavaScript, and font assets, along with source LESS, JavaScript, and documentation. More specifically, it includes the following and more:</p>
{% highlight bash %}
bootstrap/
├── less/
├── js/
├── fonts/
├── dist/
│ ├── css/
│ ├── js/
│ └── fonts/
├── docs-assets/
├── examples/
└── *.html
{% endhighlight %}
</div>
<p>The <code>less/</code>, <code>js/</code>, and <code>fonts/</code> are the source code for our CSS, JS, and icon fonts (respectively). The <code>dist/</code> folder includes everything listed in the precompiled download section above. <code>docs-assets/</code>, <code>examples/</code>, and all <code>*.html</code> files are for our documentation. Beyond that, any other included file provides support for packages, license information, and development.</p>
<!-- Template
@ -379,7 +398,7 @@ bootstrap/
</tr>
<tr>
<td><code>.visible-desktop</code></td>
<td><code>.visible-md</code></td>
<td>Split into <code>.visible-md .visible-lg</code></td>
</tr>
<tr>
<td><code>.hidden-phone</code></td>
@ -391,7 +410,7 @@ bootstrap/
</tr>
<tr>
<td><code>.hidden-desktop</code></td>
<td><code>.hidden-md</code></td>
<td>Split into <code>.hidden-md .hidden-lg</code></td>
</tr>
<tr>
<td><code>.input-small</code></td>
@ -405,6 +424,10 @@ bootstrap/
<td><code>.control-group</code></td>
<td><code>.form-group</code></td>
</tr>
<tr>
<td><code>.control-group.warning .control-group.error .control-group.success</code></td>
<td><code>.form-group.has-*</code></td>
</tr>
<tr>
<td><code>.checkbox.inline</code> <code>.radio.inline</code></td>
<td><code>.checkbox-inline</code> <code>.radio-inline</code></td>
@ -611,6 +634,11 @@ bootstrap/
<td><code>.form-search</code></td>
<td class="text-muted">N/A</td>
</tr>
<tr>
<td>Form group with info</td>
<td><code>.control-group.info</code></td>
<td class="text-muted">N/A</td>
</tr>
<tr>
<td>Fluid container</td>
<td><code>.container-fluid</code></td>
@ -674,7 +702,7 @@ bootstrap/
<li>Typeahead has been dropped, in favor of using <a href="http://twitter.github.io/typeahead.js/">Twitter Typeahead</a>.</li>
<li>Modal markup has changed significantly. The <code>.modal-header</code>, <code>.modal-body</code>, and <code>.modal-footer</code> sections are now wrapped in <code>.modal-content</code> and <code>.modal-dialog</code> for better mobile styling and behavior.</li>
<li>The HTML loaded by the <code>remote</code> modal option is now injected into the <code>.modal</code> instead of into the <code>.modal-body</code>. This allows you to also easily vary the header and footer of the modal, not just the modal body.</li>
<li>JavaScript events are namespaced. For example, to handle the modal "show" event, use <code>'show.bs.modal'</code>. For tabs "shown" use <code>'shown.bs.tab'</code>, etc..</li>
<li>JavaScript events are namespaced. For example, to handle the modal "show" event, use <code>'show.bs.modal'</code>. For tabs "shown" use <code>'shown.bs.tab'</code>, etc.</li>
</ul>
<p>For more information on upgrading to v3.0, and code snippets from the community, see <a href="http://bootply.com/">Bootply</a>.</p>
</div>

View File

@ -304,15 +304,15 @@ $('#myModal').modal({
{% endhighlight %}
<h4>.modal('toggle')</h4>
<p>Manually toggles a modal.</p>
<p>Manually toggles a modal. <strong>Returns to the caller before the modal has actually been shown or hidden</strong> (i.e. before the <code>shown.bs.modal</code> or <code>hidden.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}
<h4>.modal('show')</h4>
<p>Manually opens a modal.</p>
<p>Manually opens a modal. <strong>Returns to the caller before the modal has actually been shown</strong> (i.e. before the <code>shown.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('show'){% endhighlight %}
<h4>.modal('hide')</h4>
<p>Manually hides a modal.</p>
<p>Manually hides a modal. <strong>Returns to the caller before the modal has actually been hidden</strong> (i.e. before the <code>hidden.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
<h3>Events</h3>
@ -529,6 +529,7 @@ $('#myDropdown').on('show.bs.dropdown', function () {
{% endhighlight %}
</div>
<!-- ScrollSpy
================================================== -->
<div class="bs-docs-section">
@ -588,7 +589,13 @@ $('#myDropdown').on('show.bs.dropdown', function () {
<h3>Via data attributes</h3>
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code>&lt;body&gt;</code>). Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p>
{% highlight html %}
<body data-spy="scroll" data-target="#navbar-example">
<body data-spy="scroll" data-target=".navbar-example">
...
<div class="navbar-example">
<ul class="nav nav-tabs">
...
</ul>
</div>
...
</body>
{% endhighlight %}
@ -596,7 +603,7 @@ $('#myDropdown').on('show.bs.dropdown', function () {
<h3>Via JavaScript</h3>
<p>Call the scrollspy via JavaScript:</p>
{% highlight js %}
$('body').scrollspy({ target: '#navbar-example' })
$('body').scrollspy({ target: '.navbar-example' })
{% endhighlight %}
<div class="bs-callout bs-callout-danger">
@ -1408,7 +1415,7 @@ $('#my-alert').bind('closed.bs.alert', function () {
<h2 id="buttons-usage">Usage</h2>
<p>Enable buttons via JavaScript:</p>
{% highlight js %}
$('.btn-group').button()
$('.btn').button()
{% endhighlight %}
<h3>Markup</h3>
@ -1926,22 +1933,27 @@ $('#myCarousel').on('slide.bs.carousel', function () {
<hr class="bs-docs-separator">
<h2 id="affix-usage">Usage</h2>
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong>In both situations, you must provide CSS for the positioning of your content.</strong></p>
<h3>Positioning via CSS</h3>
<p>The affix plugin toggles between three classes, each representing a particular state: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin) to handle the actual positions.</p>
<p>Here's how the affix plugin works:</p>
<ol>
<li>To start, the plugin adds <code>.affix-top</code> to indicate the element is in it's top-most position. At this point no CSS positioning is required.</li>
<li>Scrolling past the element you want affixed should trigger the actual affixing. This is where <code>.affix</code> replaces <code>.affix-top</code> and sets <code>position: fixed;</code> (provided by Bootstrap's code CSS).</li>
<li>If a bottom offset is defined, scrolling past that should replace <code>.affix</code> with <code>.affix-bottom</code>. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add <code>position: absolute;</code> when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the elemtn from there.</li>
</ol>
<p>Follow the above steps to set your CSS for either of the usage options below.</p>
<h3>Via data attributes</h3>
<p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.</p>
<p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Use offsets to define when to toggle the pinning of an element.</p>
{% highlight html %}
<div data-spy="affix" data-offset-top="200">...</div>
<div data-spy="affix" data-offset-top="60" data-offset-bottom="200">
...
</div>
{% endhighlight %}
<div class="bs-callout bs-callout-warning">
<h4>Requires independent styling ;)</h4>
<p>
Affix toggles between three states/classes: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin).
The <code>.affix-top</code> class should be in the regular flow of the document. The <code>.affix</code> class should be <code>position: fixed</code>. And <code>.affix-bottom</code> should be <code>position: absolute</code>. Note: <code>.affix-bottom</code> is special in that the plugin will place the element with JS relative to the <code>offset: { bottom: number }</code> option you've provided.
</p>
</div>
<h3>Via JavaScript</h3>
<p>Call the affix plugin via JavaScript:</p>
{% highlight js %}

View File

@ -123,9 +123,9 @@
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('dropdown')
var data = $this.data('bs.dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}

View File

@ -22,6 +22,12 @@
&:empty {
display: none;
}
// Quick fix for badges in buttons
.btn & {
position: relative;
top: -1px;
}
}
// Hover state, but only for links
@ -34,12 +40,6 @@ a.badge {
}
}
// Quick fix for labels/badges in buttons
.btn .badge {
position: relative;
top: -1px;
}
// Account for counters in navs
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {

View File

@ -2,37 +2,6 @@
// Button groups
// --------------------------------------------------
// Button carets
//
// Match the button text color to the arrow/caret for indicating dropdown-ness.
.caret {
.btn-default & {
border-top-color: @btn-default-color;
}
.btn-primary &,
.btn-success &,
.btn-warning &,
.btn-danger &,
.btn-info & {
border-top-color: #fff;
}
}
.dropup {
.btn-default .caret {
border-bottom-color: @btn-default-color;
}
.btn-primary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info {
.caret {
border-bottom-color: #fff;
}
}
}
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
@ -178,7 +147,8 @@
.btn-group-vertical {
> .btn,
> .btn-group {
> .btn-group,
> .btn-group > .btn {
display: block;
float: none;
width: 100%;

View File

@ -91,6 +91,7 @@
// Hover/focus state
&:hover,
&:focus {
outline: none;
color: @carousel-control-color;
text-decoration: none;
.opacity(.9);

View File

@ -10,7 +10,7 @@
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: @caret-width-base solid @dropdown-caret-color;
border-top: @caret-width-base solid;
border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent;
}
@ -161,7 +161,7 @@
// Reverse the caret
.caret {
border-top: 0;
border-bottom: @caret-width-base solid @dropdown-caret-color;
border-bottom: @caret-width-base solid;
content: "";
}
// Different positioning for bottom up menu

View File

@ -309,6 +309,11 @@ input[type="checkbox"],
display: inline-block;
}
// Override `width: 100%;` when not within a `.form-group`
select.form-control {
width: auto;
}
// 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).
@ -345,6 +350,12 @@ input[type="checkbox"],
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
// 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);
}
// Make form groups behave like rows
.form-group {

View File

@ -5,6 +5,16 @@
// Set the container width, and override it for fixed navbars in media queries
.container {
.container-fixed();
@media (min-width: @screen-sm) {
width: @container-sm;
}
@media (min-width: @screen-md) {
width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: @container-lg;
}
}
// mobile first defaults
@ -18,11 +28,8 @@
// Extra small grid
//
// Grid classes for extra small devices like smartphones. No offset, push, or
// pull classes are present here due to the size of the target.
//
// Note that `.col-xs-12` doesn't get floated on purpose--there's no need since
// it's full-width.
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
.make-grid-columns-float(xs);
.make-grid(@grid-columns, xs, width);
@ -35,15 +42,8 @@
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
//
// Note that `.col-sm-12` doesn't get floated on purpose--there's no need since
// it's full-width.
@media (min-width: @screen-sm-min) {
.container {
width: @container-sm;
}
.make-grid-columns-float(sm);
.make-grid(@grid-columns, sm, width);
.make-grid(@grid-columns, sm, pull);
@ -55,15 +55,8 @@
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
//
// Note that `.col-md-12` doesn't get floated on purpose--there's no need since
// it's full-width.
@media (min-width: @screen-md-min) {
.container {
width: @container-md;
}
.make-grid-columns-float(md);
.make-grid(@grid-columns, md, width);
.make-grid(@grid-columns, md, pull);
@ -75,15 +68,8 @@
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
//
// Note that `.col-lg-12` doesn't get floated on purpose--there's no need since
// it's full-width.
@media (min-width: @screen-lg-min) {
.container {
width: @container-lg;
}
.make-grid-columns-float(lg);
.make-grid(@grid-columns, lg, width);
.make-grid(@grid-columns, lg, pull);

View File

@ -10,7 +10,7 @@
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
&.col {
&[class*="col-"] {
float: none;
padding-left: 0;
padding-right: 0;

View File

@ -12,7 +12,8 @@
color: @jumbotron-color;
background-color: @jumbotron-bg;
h1 {
h1,
.h1 {
line-height: 1;
color: @jumbotron-heading-color;
}
@ -24,6 +25,10 @@
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);
@ -33,7 +38,8 @@
padding-right: (@jumbotron-padding * 2);
}
h1 {
h1,
.h1 {
font-size: (@font-size-base * 4.5);
}
}

View File

@ -28,6 +28,12 @@
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
}
// Colors

View File

@ -19,8 +19,8 @@
.clearfix() {
&:before,
&:after {
content: " "; /* 1 */
display: table; /* 2 */
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
@ -30,8 +30,8 @@
// WebKit-style focus
.tab-focus() {
// Default
outline: thin dotted #333;
// WebKit
outline: thin dotted;
//Webkit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
@ -392,7 +392,7 @@
// Panels
// -------------------------
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border;) {
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
border-color: @border;
& > .panel-heading {
@ -403,9 +403,6 @@
+ .panel-collapse .panel-body {
border-top-color: @border;
}
& > .dropdown .caret {
border-color: @heading-text-color transparent;
}
}
& > .panel-footer {
+ .panel-collapse .panel-body {
@ -431,27 +428,27 @@
// Tables
// -------------------------
.table-row-variant(@state; @background; @border) {
.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;
.table {
> thead,
> tbody,
> tfoot {
> tr > .@{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 {
.table-hover > tbody {
> tr > .@{state}:hover,
> .@{state}:hover > td,
> .@{state}:hover > th {
background-color: darken(@background, 5%);
}
}
@ -492,6 +489,11 @@
border-color: @border;
}
}
.badge {
color: @background;
background-color: #fff;
}
}
// Button sizes
@ -739,11 +741,11 @@
@item: ~".col-@{class}-@{index}";
.col(@index + 1, @item);
}
.col(@index, @list) when (@index < @grid-columns) { // general
.col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".col-@{class}-@{index}";
.col(@index + 1, ~"@{list}, @{item}");
}
.col(@index, @list) when (@index = @grid-columns) { // terminal
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
float: left;
}

View File

@ -35,10 +35,8 @@
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
margin-left: auto;
margin-right: auto;
width: auto;
padding: 10px;
margin: 10px;
z-index: (@zindex-modal-background + 10);
}
@ -122,8 +120,7 @@
.modal-dialog {
width: 600px;
padding-top: 30px;
padding-bottom: 30px;
margin: 30px auto;
}
.modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5));

View File

@ -180,6 +180,7 @@
padding: 9px 10px;
.navbar-vertical-align(34px);
background-color: transparent;
background-image: none; // Fix for at least Firefox on Android, per #11468
border: 1px solid transparent;
border-radius: @border-radius-base;
@ -246,8 +247,8 @@
> li {
float: left;
> a {
padding-top: ((@navbar-height - @line-height-computed) / 2);
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
padding-top: @navbar-padding-vertical;
padding-bottom: @navbar-padding-vertical;
}
}
}
@ -414,15 +415,8 @@
border-color: @navbar-default-border;
}
// Dropdown menu items and carets
// Dropdown menu items
.navbar-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: @navbar-default-link-hover-color;
border-bottom-color: @navbar-default-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
@ -430,17 +424,8 @@
&:focus {
background-color: @navbar-default-link-active-bg;
color: @navbar-default-link-active-color;
.caret {
border-top-color: @navbar-default-link-active-color;
border-bottom-color: @navbar-default-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: @navbar-default-link-color;
border-bottom-color: @navbar-default-link-color;
}
@media (max-width: @screen-xs-max) {
// Dropdowns get custom display when collapsed
@ -561,24 +546,6 @@
color: @navbar-inverse-link-active-color;
}
}
> .dropdown > a:hover .caret {
border-top-color: @navbar-inverse-link-hover-color;
border-bottom-color: @navbar-inverse-link-hover-color;
}
> .dropdown > a .caret {
border-top-color: @navbar-inverse-link-color;
border-bottom-color: @navbar-inverse-link-color;
}
> .open > a {
&,
&:hover,
&:focus {
.caret {
border-top-color: @navbar-inverse-link-active-color;
border-bottom-color: @navbar-inverse-link-active-color;
}
}
}
@media (max-width: @screen-xs-max) {
// Dropdowns get custom display
@ -586,6 +553,9 @@
> .dropdown-header {
border-color: @navbar-inverse-border;
}
.divider {
background-color: @navbar-inverse-border;
}
> li > a {
color: @navbar-inverse-link-color;
&:hover,

View File

@ -48,11 +48,6 @@
&:focus {
background-color: @nav-link-hover-bg;
border-color: @link-color;
.caret {
border-top-color: @link-hover-color;
border-bottom-color: @link-hover-color;
}
}
}
@ -138,11 +133,6 @@
&:focus {
color: @nav-pills-active-link-hover-color;
background-color: @nav-pills-active-link-hover-bg;
.caret {
border-top-color: @nav-pills-active-link-hover-color;
border-bottom-color: @nav-pills-active-link-hover-color;
}
}
}
}
@ -243,16 +233,6 @@
// Dropdowns
// -------------------------
// Make dropdown carets use link color in navs
.nav .caret {
border-top-color: @link-color;
border-bottom-color: @link-color;
}
.nav a:hover .caret {
border-top-color: @link-hover-color;
border-bottom-color: @link-hover-color;
}
// Specific dropdowns
.nav-tabs .dropdown-menu {
// make dropdown border overlap tab border

View File

@ -57,13 +57,17 @@
.panel {
> .table,
> .table-responsive {
> .table-responsive > .table {
margin-bottom: 0;
}
> .panel-body + .table,
> .panel-body + .table-responsive {
border-top: 1px solid @table-border-color;
}
> .table > tbody:first-child th,
> .table > tbody:first-child td {
border-top: 0;
}
> .table-bordered,
> .table-responsive > .table-bordered {
border: 0;
@ -106,6 +110,8 @@
margin-top: 0;
margin-bottom: 0;
font-size: ceil((@font-size-base * 1.125));
color: inherit;
> a {
color: inherit;
}

View File

@ -133,6 +133,7 @@ th {
// Reset default table behavior
table col[class*="col-"] {
position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
float: none;
display: table-column;
}
@ -152,25 +153,11 @@ table {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table {
> thead,
> tbody,
> tfoot {
> tr {
> td.active,
> th.active,
&.active > td,
&.active > th {
background-color: @table-bg-active;
}
}
}
}
// Generate the contextual variants
.table-row-variant(success; @state-success-bg; @state-success-border);
.table-row-variant(danger; @state-danger-bg; @state-danger-border);
.table-row-variant(warning; @state-warning-bg; @state-warning-border);
.table-row-variant(active; @table-bg-active);
.table-row-variant(success; @state-success-bg);
.table-row-variant(danger; @state-danger-bg);
.table-row-variant(warning; @state-warning-bg);
// Responsive tables

View File

@ -5,9 +5,14 @@
// Mixin and adjust the regular image class
.thumbnail {
.img-thumbnail();
display: block; // Override the inline-block from `.img-thumbnail`
display: block;
padding: @thumbnail-padding;
margin-bottom: @line-height-computed;
line-height: @line-height-base;
background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius;
.transition(all .2s ease-in-out);
> img {
.img-responsive();

View File

@ -3,12 +3,62 @@
// --------------------------------------------------
// Headings
// -------------------------
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
font-family: @headings-font-family;
font-weight: @headings-font-weight;
line-height: @headings-line-height;
color: @headings-color;
small,
.small {
font-weight: normal;
line-height: 1;
color: @headings-small-color;
}
}
h1,
h2,
h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 65%;
}
}
h4,
h5,
h6 {
margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 75%;
}
}
h1, .h1 { font-size: @font-size-h1; }
h2, .h2 { font-size: @font-size-h2; }
h3, .h3 { font-size: @font-size-h3; }
h4, .h4 { font-size: @font-size-h4; }
h5, .h5 { font-size: @font-size-h5; }
h6, .h6 { font-size: @font-size-h6; }
// Body text
// -------------------------
p {
margin: 0 0 (@line-height-computed / 2);
}
.lead {
margin-bottom: @line-height-computed;
font-size: floor(@font-size-base * 1.15);
@ -72,55 +122,6 @@ cite { font-style: normal; }
.text-center { text-align: center; }
// Headings
// -------------------------
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
font-family: @headings-font-family;
font-weight: @headings-font-weight;
line-height: @headings-line-height;
color: @headings-color;
small,
.small {
font-weight: normal;
line-height: 1;
color: @headings-small-color;
}
}
h1,
h2,
h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 65%;
}
}
h4,
h5,
h6 {
margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 75%;
}
}
h1, .h1 { font-size: @font-size-h1; }
h2, .h2 { font-size: @font-size-h2; }
h3, .h3 { font-size: @font-size-h3; }
h4, .h4 { font-size: @font-size-h4; }
h5, .h5 { font-size: @font-size-h5; }
h6, .h6 { font-size: @font-size-h6; }
// Page header
// -------------------------
@ -131,7 +132,6 @@ h6, .h6 { font-size: @font-size-h6; }
}
// Lists
// --------------------------------------------------
@ -171,6 +171,7 @@ ol {
// Description Lists
dl {
margin-top: 0; // Remove browser default
margin-bottom: @line-height-computed;
}
dt,
@ -215,7 +216,7 @@ abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted @abbr-border-color;
}
abbr.initialism {
.initialism {
font-size: 90%;
text-transform: uppercase;
}
@ -233,7 +234,8 @@ blockquote {
p:last-child {
margin-bottom: 0;
}
small {
small,
.small {
display: block;
line-height: @line-height-base;
color: @blockquote-small-color;

View File

@ -157,7 +157,7 @@
@input-color-placeholder: @gray-light;
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
@input-height-large: (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
@legend-color: @gray-dark;
@ -186,8 +186,6 @@
@dropdown-header-color: @gray-light;
@dropdown-caret-color: #000;
// COMPONENT VARIABLES
// --------------------------------------------------
@ -321,7 +319,6 @@
@nav-disabled-link-hover-color: @gray-light;
@nav-open-link-hover-color: #fff;
@nav-open-caret-border-color: #fff;
// Tabs
@nav-tabs-border-color: #ddd;
@ -375,19 +372,19 @@
// Form states and alerts
// -------------------------
@state-success-text: #468847;
@state-success-text: #3c763d;
@state-success-bg: #dff0d8;
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
@state-info-text: #3a87ad;
@state-info-text: #31708f;
@state-info-bg: #d9edf7;
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
@state-warning-text: #c09853;
@state-warning-text: #8a6d3b;
@state-warning-bg: #fcf8e3;
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
@state-danger-text: #b94a48;
@state-danger-text: #a94442;
@state-danger-bg: #f2dede;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);

View File

@ -33,8 +33,19 @@
, "grunt-contrib-watch": "~0.5.3"
, "grunt-html-validation": "~0.1.6"
, "grunt-jekyll": "~0.4.0"
, "grunt-recess": "~0.4.0"
, "grunt-recess": "~0.5.0"
, "grunt-sed": "~0.1.1"
, "regexp-quote": "~0.0.0"
}
, "jspm": {
"main": "js/bootstrap"
, "directories": { "lib": "dist" }
, "shim": {
"js/bootstrap": {
"imports": "jquery"
, "exports": "$"
}
}
, "buildConfig": { "uglify": true }
}
}