Commit d1f15baa authored by Mark Otto's avatar Mark Otto

Merge branch 'master' into pr/11817

Conflicts:
	dist/css/bootstrap.min.css
	less/input-groups.less
parents 3b5e0c9a b04a1de9
language: node_js language: node_js
node_js: node_js:
- 0.10 - 0.10
before_script: before_install:
- gem install jekyll - time sudo pip install --use-mirrors -r ./test-infra/requirements.txt
- npm install -g grunt-cli install:
- if [ "$TWBS_TEST" = validate-html ]; then time gem install jekyll; fi
- time npm install -g grunt-cli
- time ./test-infra/node_modules_cache.py download || time npm install
after_script:
- if [ "$TWBS_TEST" = core ]; then time ./test-infra/node_modules_cache.py upload; fi
env: env:
global: global:
- SAUCE_USERNAME: bootstrap - SAUCE_USERNAME: bootstrap
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ=" - secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
- secure: "Gghh/e3Gsbj1+4RR9Lh2aR/xJl35HWiHqlPIeSUqE9D7uDCVTAwNce/dGL3Ew7uJPfJ6Pgr70wD3zgu3stw0Zmzayax0hiDtGwcQCxVIER08wqGANK9C2Q7PYJkNTNtiTo6ehKWbdV4Z+/U+TEYyQfpQTDbAFYk/vVpsdjp0Lmc="
- secure: "RTbRdx4G/2OTLfrZtP1VbRljxEmd6A1F3GqXboeQTldsnAlwpsES65es5CE3ub/rmixLApOY9ot7OPmNixFgC2Y8xOsV7lNCC62QVpmqQEDyGFFQKb3yO6/dmwQxdsCqGfzf9Np6Wh5V22QFvr50ZLKLd7Uhd9oXMDIk/z1MJ3o="
matrix:
- TWBS_TEST=core
- TWBS_TEST=validate-html
- TWBS_TEST=sauce-js-unit
matrix:
fast_finish: true
...@@ -37,12 +37,15 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso ...@@ -37,12 +37,15 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
### CSS ### CSS
- Adhere to the [RECESS CSS property order](http://markdotto.com/2011/11/29/css-property-order/) - Adhere to the [CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
- Multiple-line approach (one property and value per line) - Multiple-line approach (one property and value per line)
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`) - Always a space after a property's colon (e.g., `display: block;` and not `display:block;`)
- End all lines with a semi-colon - End all lines with a semi-colon
- For multiple, comma-separated selectors, place each selector on its own line - For multiple, comma-separated selectors, place each selector on its own line
- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks). - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
- Series of classes for a component should include a base class (e.g., `.component`) and use the base class as a prefix for modifier and sub-components (e.g., `.component-lg`).
- Avoid inheritance and over nesting—use single, explicit classes whenever possible.
### JS ### JS
......
...@@ -6,7 +6,9 @@ module.exports = function (grunt) { ...@@ -6,7 +6,9 @@ module.exports = function (grunt) {
// Force use of Unix newlines // Force use of Unix newlines
grunt.util.linefeed = '\n'; grunt.util.linefeed = '\n';
RegExp.quote = require('regexp-quote') RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}
var btoa = require('btoa') var btoa = require('btoa')
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
...@@ -238,13 +240,13 @@ module.exports = function (grunt) { ...@@ -238,13 +240,13 @@ module.exports = function (grunt) {
// See https://saucelabs.com/docs/platforms/webdriver // See https://saucelabs.com/docs/platforms/webdriver
{ {
browserName: 'safari', browserName: 'safari',
version: '6', version: '7',
platform: 'OS X 10.8' platform: 'OS X 10.9'
}, },
{ {
browserName: 'chrome', browserName: 'chrome',
version: '28', version: '31',
platform: 'OS X 10.6' platform: 'OS X 10.9'
}, },
/* FIXME: currently fails 1 tooltip test /* FIXME: currently fails 1 tooltip test
{ {
...@@ -325,31 +327,25 @@ module.exports = function (grunt) { ...@@ -325,31 +327,25 @@ module.exports = function (grunt) {
// These plugins provide necessary tasks. // These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-banner'); require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-jscs-checker');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-sed');
// Docs HTML validation task // Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll', 'validation']); grunt.registerTask('validate-html', ['jekyll', 'validation']);
// Test task. // Test task.
var testSubtasks = ['dist-css', 'jshint', 'jscs', 'qunit', 'validate-html']; var testSubtasks = [];
// Skip core tests if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') {
testSubtasks = testSubtasks.concat(['dist-css', 'jshint', 'jscs', 'qunit']);
}
// Skip HTML validation if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') {
testSubtasks.push('validate-html');
}
// Only run Sauce Labs tests if there's a Sauce access key // Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') { if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined'
// Skip Sauce if running a different subset of the test suite
&& (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
testSubtasks.push('connect'); testSubtasks.push('connect');
testSubtasks.push('saucelabs-qunit'); testSubtasks.push('saucelabs-qunit');
} }
......
...@@ -57,8 +57,9 @@ Bootstrap's documentation, included in this repo in the root directory, is built ...@@ -57,8 +57,9 @@ Bootstrap's documentation, included in this repo in the root directory, is built
### Running documentation locally ### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x). 1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x).
- **Windows users:** read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems.
2. From the root `/bootstrap` directory, run `jekyll serve` in the command line. 2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
- **Windows users:** run `chcp 65001` first to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors. - **Windows users:** For Ruby 2.0.0 run `chcp 65001` first to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors. For Ruby 1.9.3 you can alternatively do `SET LANG=en_EN.UTF-8`. In addition, ensure you have Python installed and added in your `PATH` or the build will fail due to our Pygments dependency.
3. Open <http://localhost:9001> in your browser, and voilà. 3. Open <http://localhost:9001> in your browser, and voilà.
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
......
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
<li> <li>
<a href="#helper-classes">Helper classes</a> <a href="#helper-classes">Helper classes</a>
<ul class="nav"> <ul class="nav">
<li><a href="#helper-classes-colors">Contextual colors</a></li>
<li><a href="#helper-classes-backgrounds">Contextual backgrounds</a></li>
<li><a href="#helper-classes-close">Close icon</a></li> <li><a href="#helper-classes-close">Close icon</a></li>
<li><a href="#helper-classes-carets">Carets</a></li> <li><a href="#helper-classes-carets">Carets</a></li>
<li><a href="#helper-classes-floats">Quick floats</a></li> <li><a href="#helper-classes-floats">Quick floats</a></li>
...@@ -105,3 +107,11 @@ ...@@ -105,3 +107,11 @@
<li><a href="#responsive-utilities-tests">Test cases</a></li> <li><a href="#responsive-utilities-tests">Test cases</a></li>
</ul> </ul>
</li> </li>
<li>
<a href="#less">Using LESS</a>
<ul class="nav">
<li><a href="#less-variables">Variables</a></li>
<li><a href="#less-mixins-vendor">Vendor mixins</a></li>
<li><a href="#less-mixins-utility">Utility mixins</a></li>
</ul>
</li>
...@@ -32,7 +32,19 @@ ...@@ -32,7 +32,19 @@
</ul> </ul>
</li> </li>
<li> <li>
<a href="#browsers">Browser support</a> <a href="#browsers">Browser and device support</a>
<ul class="nav">
<li><a href="#support-browsers">Supported browsers</a></li>
<li><a href="#support-ie8-ie9">Internet Explorer 8-9</a></li>
<li><a href="#support-ie8-respondjs">IE8 and Respond.js</a></li>
<li><a href="#support-ie8-box-sizing">IE8 and box-sizing</a></li>
<li><a href="#support-ie-compatibility-modes">IE Compatibility modes</a></li>
<li><a href="#support-ie10-width">IE10 and Windows (Phone) 8</a></li>
<li><a href="#support-safari-percentages">Safari percent rounding</a></li>
<li><a href="#support-fixed-position-keyboards">Modals, navbars, and virtual keyboards</a></li>
<li><a href="#support-browser-zooming">Browser zooming</a></li>
<li><a href="#support-android-stock-browser">Android stock browser</a></li>
</ul>
</li> </li>
<li> <li>
<a href="#third-parties">Third party support</a> <a href="#third-parties">Third party support</a>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<a href="#modals">Modal</a> <a href="#modals">Modal</a>
<ul class="nav"> <ul class="nav">
<li><a href="#modals-examples">Examples</a></li> <li><a href="#modals-examples">Examples</a></li>
<li><a href="#modals-sizes">Sizes</a></li>
<li><a href="#modals-usage">Usage</a></li> <li><a href="#modals-usage">Usage</a></li>
</ul> </ul>
</li> </li>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
"_*", "_*",
"docs-assets", "docs-assets",
"examples", "examples",
"/fonts",
"js/tests", "js/tests",
"CNAME", "CNAME",
"CONTRIBUTING.md", "CONTRIBUTING.md",
......
This diff is collapsed.
This diff is collapsed.
...@@ -182,6 +182,12 @@ base_url: "../" ...@@ -182,6 +182,12 @@ base_url: "../"
<div class="col-xs-6 col-sm-4"> <div class="col-xs-6 col-sm-4">
<h3>JavaScript components</h3> <h3>JavaScript components</h3>
<div class="checkbox">
<label>
<input type="checkbox" checked value="component-animations.less">
Component animations (for JS)
</label>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" checked value="dropdowns.less"> <input type="checkbox" checked value="dropdowns.less">
...@@ -226,12 +232,6 @@ base_url: "../" ...@@ -226,12 +232,6 @@ base_url: "../"
Responsive utilities Responsive utilities
</label> </label>
</div> </div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="component-animations.less">
Component animations (for JS)
</label>
</div>
</div><!-- .col-xs-6 .col-sm-4 --> </div><!-- .col-xs-6 .col-sm-4 -->
</div><!-- /.row --> </div><!-- /.row -->
</div> </div>
...@@ -1147,6 +1147,8 @@ base_url: "../" ...@@ -1147,6 +1147,8 @@ base_url: "../"
<h3>Wells</h3> <h3>Wells</h3>
<label>@well-bg</label> <label>@well-bg</label>
<input type="text" class="form-control" placeholder="#f5f5f5" data-var="@well-bg"> <input type="text" class="form-control" placeholder="#f5f5f5" data-var="@well-bg">
<label>@well-border</label>
<input type="text" class="form-control" placeholder="darken(@well-bg, 7%)" data-var="@well-border">
<h2 id="variables-accordion">Accordion</h2> <h2 id="variables-accordion">Accordion</h2>
...@@ -1247,6 +1249,11 @@ base_url: "../" ...@@ -1247,6 +1249,11 @@ base_url: "../"
<input type="text" class="form-control" placeholder="#000" data-var="@modal-backdrop-bg"> <input type="text" class="form-control" placeholder="#000" data-var="@modal-backdrop-bg">
<p class="help-block">Modal backdrop background color</p> <p class="help-block">Modal backdrop background color</p>
</div> </div>
<div class="col-md-4">
<label>@modal-backdrop-opacity</label>
<input type="text" class="form-control" placeholder=".5" data-var="@modal-backdrop-opacity">
<p class="help-block">Modal backdrop opacity</p>
</div>
</div> </div>
<h3>Modal header and footer</h3> <h3>Modal header and footer</h3>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -982,7 +982,6 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" ...@@ -982,7 +982,6 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
Modal.prototype.backdrop = function (callback) { Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : '' var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) { if (this.isShown && this.options.backdrop) {
......
...@@ -597,6 +597,35 @@ h1[id] { ...@@ -597,6 +597,35 @@ h1[id] {
} }
/*
* Color swatches
*
* Color swatches and associated values for our grayscale and brand colors.
*/
.color-swatches {
margin: 0 -5px;
overflow: hidden; /* clearfix */
}
.color-swatch {
float: left;
width: 100px;
height: 100px;
margin: 0 5px;
border-radius: 3px;
}
.color-swatches .gray-darker { background-color: #222; }
.color-swatches .gray-dark { background-color: #333; }
.color-swatches .gray { background-color: #555; }
.color-swatches .gray-light { background-color: #999; }
.color-swatches .gray-lighter { background-color: #eee; }
.color-swatches .brand-primary { background-color: #428bca; }
.color-swatches .brand-success { background-color: #5cb85c; }
.color-swatches .brand-warning { background-color: #f0ad4e; }
.color-swatches .brand-danger { background-color: #d9534f; }
.color-swatches .brand-info { background-color: #5bc0de; }
/* /*
* Team members * Team members
* *
...@@ -730,7 +759,7 @@ h1[id] { ...@@ -730,7 +759,7 @@ h1[id] {
} }
/* Typography */ /* Typography */
.bs-example-type .table .info { .bs-example-type .table .type-info {
color: #999; color: #999;
vertical-align: middle; vertical-align: middle;
} }
...@@ -750,6 +779,11 @@ h1[id] { ...@@ -750,6 +779,11 @@ h1[id] {
margin: 0; margin: 0;
} }
/* Contextual background colors */
.bs-example-bg-classes p {
padding: 15px;
}
/* Images */ /* Images */
.bs-example > .img-circle, .bs-example > .img-circle,
.bs-example > .img-rounded, .bs-example > .img-rounded,
...@@ -990,6 +1024,7 @@ h1[id] { ...@@ -990,6 +1024,7 @@ h1[id] {
margin-bottom: 10px; margin-bottom: 10px;
} }
.responsive-utilities-test span { .responsive-utilities-test span {
display: block;
padding: 15px 10px; padding: 15px 10px;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -232,7 +232,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 ...@@ -232,7 +232,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
} }
result = { result = {
'bootstrap.css' : cw + tree.toCSS(), 'bootstrap.css' : cw + tree.toCSS(),
'bootstrap.min.css' : cw + tree.toCSS({ compress: true }).replace(/\n/g, '') // FIXME: remove newline hack once less.js upgraded to v1.4 'bootstrap.min.css' : cw + tree.toCSS({ compress: true })
} }
}) })
} catch (err) { } catch (err) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/*
* Globals
*/
body {
font-family: Georgia, "Times New Roman", Times, serif;
color: #555;
}
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;;
font-weight: normal;
color: #333;
margin-top: 0;
}
/*
* Override Bootstrap's default container.
*/
@media (min-width: 1200px) {
.container {
width: 970px;
}
}
/*
* Masthead for nav
*/
.blog-masthead {
background-color: #428bca;
box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
}
/* Nav links */
.blog-nav {
}
.blog-nav-item {
position: relative;
display: inline-block;
padding: 10px;
font-weight: 500;
color: #cdddeb;
}
.blog-nav-item:hover,
.blog-nav-item:focus {
color: #fff;
text-decoration: none;
}
/* Active state gets a caret at the bottom */
.blog-nav .active {
color: #fff;
}
.blog-nav .active:after {
position: absolute;
bottom: 0;
left: 50%;
display: block;
content: " ";
width: 0;
height: 0;
margin-left: -5px;
vertical-align: middle;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-bottom: 5px solid;
}
/*
* Blog name and description
*/
.blog-header {
padding-top: 20px;
padding-bottom: 20px;
}
.blog-title {
margin-top: 30px;
margin-bottom: 0;
font-size: 60px;
font-weight: normal;
}
.blog-description {
font-size: 20px;
color: #999;
}
/*
* Main column and sidebar layout
*/
.blog-main {
font-size: 18px;
line-height: 1.5;
}
/* Sidebar modules for boxing content */
.sidebar-module {
padding: 15px;
margin: 0 -15px 15px;
}
.sidebar-module-inset {
padding: 15px;
background-color: #f5f5f5;
border-radius: 4px;
}
.sidebar-module-inset p:last-child,
.sidebar-module-inset ul:last-child,
.sidebar-module-inset ol:last-child {
margin-bottom: 0;
}
/* Pagination */
.pager {
margin-bottom: 60px;
text-align: left;
}
.pager > li > a {
width: 140px;
padding: 10px 20px;
text-align: center;
border-radius: 30px;
}
/*
* Blog posts
*/
.blog-post {
margin-bottom: 60px;
}
.blog-post-title {
margin-bottom: 5px;
font-size: 40px;
}
.blog-post-meta {
margin-bottom: 20px;
color: #999;
}
/*
* Footer
*/
.blog-footer {
padding: 40px 0;
color: #999;
text-align: center;
background-color: #f9f9f9;
border-top: 1px solid #e5e5e5;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">
<title>Blog Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link href="../../dist/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="blog.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="blog-masthead">
<div class="container">
<nav class="blog-nav">
<a class="blog-nav-item active" href="#">Home</a>
<a class="blog-nav-item" href="#">New features</a>
<a class="blog-nav-item" href="#">Press</a>
<a class="blog-nav-item" href="#">New hires</a>
<a class="blog-nav-item" href="#">About</a>
</nav>
</div>
</div>
<div class="container">
<div class="blog-header">
<h1 class="blog-title">The Bootstrap Blog</h1>
<p class="lead blog-description">The official example template of creating a blog with Bootstrap.</p>
</div>
<div class="row">
<div class="col-sm-8 blog-main">
<div class="blog-post">
<h2 class="blog-post-title">Sample blog post</h2>
<p class="blog-post-meta">December 1, 2013 by <a href="#">Mark</a></p>
<p>This blog post shows a few different types of content that's supported and styled with Bootstrap. Basic typography, images, and code are all supported.</p>
<hr>
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
<blockquote>
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
</blockquote>
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
<h2>Heading</h2>
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
<h3>Sub-heading</h3>
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
<pre><code>Example code block</code></pre>
<p>Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.</p>
<h3>Sub-heading</h3>
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<ul>
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
<li>Donec id elit non mi porta gravida at eget metus.</li>
<li>Nulla vitae elit libero, a pharetra augue.</li>
</ul>
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
<ol>
<li>Vestibulum id ligula porta felis euismod semper.</li>
<li>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</li>
<li>Maecenas sed diam eget risus varius blandit sit amet non magna.</li>
</ol>
<p>Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.</p>
</div><!-- /.blog-post -->
<div class="blog-post">
<h2 class="blog-post-title">Another blog post</h2>
<p class="blog-post-meta">November 23, 2013 by <a href="#">Jacob</a></p>
<p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
<blockquote>
<p>Curabitur blandit tempus porttitor. <strong>Nullam quis risus eget urna mollis</strong> ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
</blockquote>
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
</div><!-- /.blog-post -->
<div class="blog-post">
<h2 class="blog-post-title">New feature</h2>
<p class="blog-post-meta">November 14, 2013 by <a href="#">Chris</a></p>
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<ul>
<li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
<li>Donec id elit non mi porta gravida at eget metus.</li>
<li>Nulla vitae elit libero, a pharetra augue.</li>
</ul>
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
<p>Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.</p>
</div><!-- /.blog-post -->
<ul class="pager">
<li><a href="#">Previous</a></li>
<li><a href="#">Next</a></li>
</ul>
</div><!-- /.blog-main -->
<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
<div class="sidebar-module sidebar-module-inset">
<h4>About</h4>
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="sidebar-module">
<h4>Archives</h4>
<ol class="list-unstyled">
<li><a href="#">December 2013</a></li>
<li><a href="#">November 2013</a></li>
<li><a href="#">October 2013</a></li>
<li><a href="#">September 2013</a></li>
<li><a href="#">August 2013</a></li>
<li><a href="#">July 2013</a></li>
<li><a href="#">June 2013</a></li>
<li><a href="#">May 2013</a></li>
<li><a href="#">April 2013</a></li>
<li><a href="#">March 2013</a></li>
<li><a href="#">February 2013</a></li>
<li><a href="#">January 2013</a></li>
</ol>
</div>
<div class="sidebar-module">
<h4>Elsewhere</h4>
<ol class="list-unstyled">
<li><a href="#">GitHub</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
</ol>
</div>
</div><!-- /.blog-sidebar -->
</div><!-- /.row -->
</div><!-- /.container -->
<div class="blog-footer">
<p>Blog template built for <a href="http://getbootstrap.com">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p>
<p>
<a href="#">Back to top</a>
</p>
</div>
<!-- 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="../../dist/js/bootstrap.min.js"></script>
<script src="../../docs-assets/js/holder.js"></script>
</body>
</html>
...@@ -277,6 +277,15 @@ bootstrap/ ...@@ -277,6 +277,15 @@ bootstrap/
<h4>Dashboard</h4> <h4>Dashboard</h4>
<p>Basic structure for a admin dashboard with fixed sidebar and navbar.</p> <p>Basic structure for a admin dashboard with fixed sidebar and navbar.</p>
</div> </div>
<div class="col-xs-6 col-md-4">
<a class="thumbnail" href="../examples/blog/">
<img src="../examples/screenshots/blog.jpg" alt="">
</a>
<h4>Blog</h4>
<p>Simple two-column blog layout with custom navigation, header, and type.</p>
</div>
<div class="clearfix visible-xs"></div>
<div class="col-xs-6 col-md-4"> <div class="col-xs-6 col-md-4">
<a class="thumbnail" href="../examples/non-responsive/"> <a class="thumbnail" href="../examples/non-responsive/">
<img src="../examples/screenshots/non-responsive.jpg" alt=""> <img src="../examples/screenshots/non-responsive.jpg" alt="">
...@@ -284,8 +293,6 @@ bootstrap/ ...@@ -284,8 +293,6 @@ bootstrap/
<h4>Non-responsive Bootstrap</h4> <h4>Non-responsive Bootstrap</h4>
<p>Easily disable the responsiveness of Bootstrap <a href="../getting-started/#disable-responsive">per our docs</a>.</p> <p>Easily disable the responsiveness of Bootstrap <a href="../getting-started/#disable-responsive">per our docs</a>.</p>
</div> </div>
<div class="clearfix visible-xs"></div>
<div class="col-xs-6 col-md-4"> <div class="col-xs-6 col-md-4">
<a class="thumbnail" href="../examples/theme/"> <a class="thumbnail" href="../examples/theme/">
<img src="../examples/screenshots/theme.jpg" alt=""> <img src="../examples/screenshots/theme.jpg" alt="">
...@@ -746,11 +753,11 @@ bootstrap/ ...@@ -746,11 +753,11 @@ bootstrap/
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="browsers">Browser support</h1> <h1 id="support">Browser and device support</h1>
</div> </div>
<p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.</p> <p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.</p>
<h3>Supported browsers</h3> <h3 id="support-browsers">Supported browsers</h3>
<p>Specifically, we support the latest versions of the following:</p> <p>Specifically, we support the latest versions of the following:</p>
<ul> <ul>
<li>Chrome (Mac, Windows, iOS, and Android)</li> <li>Chrome (Mac, Windows, iOS, and Android)</li>
...@@ -761,7 +768,7 @@ bootstrap/ ...@@ -761,7 +768,7 @@ bootstrap/
</ul> </ul>
<p>Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.</p> <p>Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.</p>
<h3>Internet Explorer 8 and 9</h3> <h3 id="support-ie8-ie9">Internet Explorer 8 and 9</h3>
<p>Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, <strong>Internet Explorer 8 requires the use of <a href="https://github.com/scottjehl/Respond">Respond.js</a> to enable media query support.</strong></p> <p>Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, <strong>Internet Explorer 8 requires the use of <a href="https://github.com/scottjehl/Respond">Respond.js</a> to enable media query support.</strong></p>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
...@@ -804,7 +811,7 @@ bootstrap/ ...@@ -804,7 +811,7 @@ bootstrap/
<p>Visit <a href="http://caniuse.com/">Can I use...</a> for details on browser support of CSS3 and HTML5 features.</p> <p>Visit <a href="http://caniuse.com/">Can I use...</a> for details on browser support of CSS3 and HTML5 features.</p>
<h3>Internet Explorer 8 and Respond.js</h3> <h3 id="support-ie8-respondjs">Internet Explorer 8 and Respond.js</h3>
<p>Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.</p> <p>Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.</p>
<h4 id="respond-js-x-domain">Respond.js and cross-domain CSS</h4> <h4 id="respond-js-x-domain">Respond.js and cross-domain CSS</h4>
<p>Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#cdnx-domain-setup">See the Respond.js docs</a> for details.</p> <p>Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#cdnx-domain-setup">See the Respond.js docs</a> for details.</p>
...@@ -813,10 +820,10 @@ bootstrap/ ...@@ -813,10 +820,10 @@ bootstrap/
<h4 id="respond-import">Respond.js and <code>@import</code></h4> <h4 id="respond-import">Respond.js and <code>@import</code></h4>
<p>Respond.js doesn't work with CSS that's referenced via <code>@import</code>. In particular, some Drupal configurations are known to use <code>@import</code>. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p> <p>Respond.js doesn't work with CSS that's referenced via <code>@import</code>. In particular, some Drupal configurations are known to use <code>@import</code>. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
<h3>Internet Explorer 8 and box-sizing</h3> <h3 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h3>
<p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p> <p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p>
<h3 id="ie-compat-modes">IE Compatibility modes</h3> <h3 id="support-ie-compatibility-modes">IE Compatibility modes</h3>
<p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code>&lt;meta&gt;</code> tag in your pages:</p> <p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code>&lt;meta&gt;</code> tag in your pages:</p>
{% highlight html %} {% highlight html %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
...@@ -825,7 +832,7 @@ bootstrap/ ...@@ -825,7 +832,7 @@ bootstrap/
<p>This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.</p> <p>This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.</p>
<p>See <a href="http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge">this StackOverflow question</a> for more information.</p> <p>See <a href="http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge">this StackOverflow question</a> for more information.</p>
<h3 id="ie-10-width">Internet Explorer 10 in Windows 8 and Windows Phone 8</h3> <h3 id="support-ie10-width">Internet Explorer 10 in Windows 8 and Windows Phone 8</h3>
<p>Internet Explorer 10 doesn't differentiate <strong>device width</strong> from <strong>viewport width</strong>, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:</p> <p>Internet Explorer 10 doesn't differentiate <strong>device width</strong> from <strong>viewport width</strong>, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:</p>
{% highlight css %} {% highlight css %}
@-ms-viewport { width: device-width; } @-ms-viewport { width: device-width; }
...@@ -853,7 +860,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { ...@@ -853,7 +860,7 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p> <p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
<p>As a heads up, we include this in the Bootstrap docs as an example.</p> <p>As a heads up, we include this in the Bootstrap docs as an example.</p>
<h3 id="safari-percentages">Safari percent rounding</h3> <h3 id="support-safari-percentages">Safari percent rounding</h3>
<p>As of Safari v6.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our <code>.col-*-1</code> grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (<a href="https://github.com/twbs/bootstrap/issues/9282">see #9282</a>) but you do have some options:</p> <p>As of Safari v6.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our <code>.col-*-1</code> grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (<a href="https://github.com/twbs/bootstrap/issues/9282">see #9282</a>) but you do have some options:</p>
<ul> <ul>
<li>Add <code>.pull-right</code> to your last grid column to get the hard-right alignment</li> <li>Add <code>.pull-right</code> to your last grid column to get the hard-right alignment</li>
...@@ -861,14 +868,30 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { ...@@ -861,14 +868,30 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
</ul> </ul>
<p>We'll keep an eye on this though and update our code if we have an easy solution.</p> <p>We'll keep an eye on this though and update our code if we have an easy solution.</p>
<h3 id="mobile-modals">Modals and mobile devices</h3> <h3 id="support-fixed-position-keyboards">Modals, navbars, and virtual keyboards</h3>
<h4>Overflow and scrolling</h4> <h4>Overflow and scrolling</h4>
<p>Support for <code>overflow: hidden</code> on the <code>&lt;body&gt;</code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code>&lt;body&gt;</code> content will begin to scroll.</p> <p>Support for <code>overflow: hidden</code> on the <code>&lt;body&gt;</code> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <code>&lt;body&gt;</code> content will begin to scroll.</p>
<h4>Virtual keyboards</h4> <h4>Virtual keyboards</h4>
<p>Also, note that if you're using inputs in your modal iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p> <p>Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to <code>position: absolute</code> or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.</p>
<h3 id="browser-zoom">Browser zooming</h3> <h3 id="support-browser-zoom">Browser zooming</h3>
<p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p> <p>Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.</p>
<h3 id="support-android-stock-browser">Android stock browser</h3>
<p>Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.</p>
<h4>Select menus</h4>
<p>On <code>&lt;select&gt;</code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. Use the snippet of code below to remove the offending CSS and render the <code>&lt;select&gt;</code> as an unstyled element on the Android stock broswer. The useragent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
{% highlight html %}
<script>
var nua = navigator.userAgent;
var is_android = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
if(is_android) {
$('select.form-control').removeClass('form-control').css('width', '100%');
}
</script>
{% endhighlight %}
<p>Want to see an example? <a href="http://jsbin.com/OyaqoDO/2">Check out this JS Bin demo.</a></p>
</div> </div>
......
...@@ -74,7 +74,7 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -74,7 +74,7 @@ $('#myModal').on('show.bs.modal', function (e) {
<div class="bs-callout bs-callout-warning" id="callout-third-party-libs"> <div class="bs-callout bs-callout-warning" id="callout-third-party-libs">
<h4>Third-party libraries</h4> <h4>Third-party libraries</h4>
<p><strong>Bootstrap does not officially support third-party JavaScript libraries</strong> like Prototype or jQuery UI. Despite <code>.noConflict</code> and namespaced events, there may be compatibility problems that you need to fix on your own. Ask on the <a href="http://groups.google.com/group/twitter-bootstrap">mailing list</a> if you need help.</p> <p><strong>Bootstrap does not officially support third-party JavaScript libraries</strong> like Prototype or jQuery UI. Despite <code>.noConflict</code> and namespaced events, there may be compatibility problems that you need to fix on your own.</p>
</div> </div>
</div> </div>
...@@ -110,7 +110,7 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -110,7 +110,7 @@ $('#myModal').on('show.bs.modal', function (e) {
</div> </div>
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>Mobile device caveats</h4> <h4>Mobile device caveats</h4>
<p>There are some caveats regarding using modals on mobile devices. <a href="{{ page.base_url }}getting-started#mobile-modals">See our browser support docs</a> for details.</p> <p>There are some caveats regarding using modals on mobile devices. <a href="{{ page.base_url }}getting-started#fixed-position-keyboards">See our browser support docs</a> for details.</p>
</div> </div>
<h3>Static example</h3> <h3>Static example</h3>
...@@ -223,9 +223,9 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -223,9 +223,9 @@ $('#myModal').on('show.bs.modal', function (e) {
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button> <button type="button" class="btn btn-primary">Save changes</button>
</div> </div>
</div><!-- /.modal-content --> </div>
</div><!-- /.modal-dialog --> </div>
</div><!-- /.modal --> </div>
{% endhighlight %} {% endhighlight %}
...@@ -235,6 +235,67 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -235,6 +235,67 @@ $('#myModal').on('show.bs.modal', function (e) {
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p> <p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
</div> </div>
<h2 id="modals-sizes">Optional sizes</h2>
<p>Modals have two optional sizes, available via modifier classes to be placed on a <code>.modal-dialog</code>.</p>
<div class="bs-example">
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-modal-lg">Large modal</button>
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-modal-sm">Small modal</button>
</div>
{% highlight html %}
<!-- Large modal -->
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-modal-lg">Large modal</button>
<div class="modal fade bs-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
...
</div>
</div>
</div>
<!-- Small modal -->
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-modal-sm">Small modal</button>
<div class="modal fade bs-modal-sm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
...
</div>
</div>
</div>
{% endhighlight %}
<!-- Modal content for the above example -->
<div class="modal fade bs-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Large modal</h4>
</div>
<div class="modal-body">
...
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade bs-modal-sm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Small modal</h4>
</div>
<div class="modal-body">
...
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<h2 id="modals-usage">Usage</h2> <h2 id="modals-usage">Usage</h2>
<p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.model-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p> <p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.model-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p>
...@@ -843,6 +904,15 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { ...@@ -843,6 +904,15 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button> <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %}
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
{% endhighlight %}
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4> <h4>Opt-in functionality</h4>
...@@ -865,9 +935,17 @@ $('#example').tooltip(options) ...@@ -865,9 +935,17 @@ $('#example').tooltip(options)
{% endhighlight %} {% endhighlight %}
<h3>Markup</h3> <h3>Markup</h3>
<p>The generated markup of a tooltip is rather simple, though it does require a position (by default, set to <code>top</code> by the plugin).</p> <p>The required markup for a tooltip is only a <code>data</code> attribute and <code>title</code> on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to <code>top</code> by the plugin).</p>
<div class="bs-callout bs-callout-warning">
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
{% highlight html linenos %} {% highlight html linenos %}
<div class="tooltip"> <!-- HTML to write -->
<a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a>
<!-- Generated markup by the plugin -->
<div class="tooltip top">
<div class="tooltip-inner"> <div class="tooltip-inner">
Tooltip! Tooltip!
</div> </div>
...@@ -950,11 +1028,6 @@ $('#example').tooltip(options) ...@@ -950,11 +1028,6 @@ $('#example').tooltip(options)
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p> <p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
</div> </div>
<h3>Markup</h3>
{% highlight html %}
<a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a>
{% endhighlight %}
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().tooltip(options)</h4> <h4>$().tooltip(options)</h4>
...@@ -1100,6 +1173,29 @@ $('#myTooltip').on('hidden.bs.tooltip', function () { ...@@ -1100,6 +1173,29 @@ $('#myTooltip').on('hidden.bs.tooltip', function () {
</button> </button>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %}
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on top
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on bottom
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right
</button>
{% endhighlight %}
<div class="bs-callout bs-callout-warning">
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
<h2 id="popovers-usage">Usage</h2> <h2 id="popovers-usage">Usage</h2>
......
{ {
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return"], "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"], "requireRightStickedOperators": ["!"],
......
...@@ -149,7 +149,6 @@ ...@@ -149,7 +149,6 @@
} }
Modal.prototype.backdrop = function (callback) { Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : '' var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) { if (this.isShown && this.options.backdrop) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.breadcrumb { .breadcrumb {
padding: 8px 15px; padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
list-style: none; list-style: none;
background-color: @breadcrumb-bg; background-color: @breadcrumb-bg;
......
...@@ -37,18 +37,17 @@ ...@@ -37,18 +37,17 @@
// Optional: Group multiple button groups together for a toolbar // Optional: Group multiple button groups together for a toolbar
.btn-toolbar { .btn-toolbar {
margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all); &:extend(.clearfix all);
.btn-group { .btn-group,
.input-group {
float: left; float: left;
} }
// Space out series of button groups
> .btn, > .btn,
> .btn-group { > .btn-group,
+ .btn, > .input-group {
+ .btn-group { margin-left: 5px;
margin-left: 5px;
}
} }
} }
...@@ -188,13 +187,13 @@ ...@@ -188,13 +187,13 @@
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0; border-radius: 0;
} }
.btn-group-vertical > .btn-group:first-child { .btn-group-vertical > .btn-group:first-child:not(:last-child) {
> .btn:last-child, > .btn:last-child,
> .dropdown-toggle { > .dropdown-toggle {
.border-bottom-radius(0); .border-bottom-radius(0);
} }
} }
.btn-group-vertical > .btn-group:last-child > .btn:first-child { .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
.border-top-radius(0); .border-top-radius(0);
} }
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
background-clip: padding-box; background-clip: padding-box;
// Aligns the dropdown menu to right // Aligns the dropdown menu to right
//
// Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]`
&.pull-right { &.pull-right {
right: 0; right: 0;
left: auto; left: auto;
...@@ -126,6 +128,25 @@ ...@@ -126,6 +128,25 @@
} }
} }
// 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 section headers
.dropdown-header { .dropdown-header {
display: block; display: block;
...@@ -180,7 +201,12 @@ ...@@ -180,7 +201,12 @@
@media (min-width: @grid-float-breakpoint) { @media (min-width: @grid-float-breakpoint) {
.navbar-right { .navbar-right {
.dropdown-menu { .dropdown-menu {
.pull-right > .dropdown-menu(); .dropdown-menu-right();
}
// Necessary for overrides of the default right aligned menu.
// Will remove come v4 in all likelihood.
.dropdown-menu-left {
.dropdown-menu-left();
} }
} }
} }
......
...@@ -311,6 +311,11 @@ input[type="checkbox"], ...@@ -311,6 +311,11 @@ input[type="checkbox"],
width: auto; width: auto;
} }
// 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 // 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 // then undo the floating of radios and checkboxes to match (which also avoids
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
.container { .container {
.container-fixed(); .container-fixed();
@media (min-width: @screen-sm) { @media (min-width: @screen-sm-min) {
width: @container-sm; width: @container-sm;
} }
@media (min-width: @screen-md) { @media (min-width: @screen-md-min) {
width: @container-md; width: @container-md;
} }
@media (min-width: @screen-lg-min) { @media (min-width: @screen-lg-min) {
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
} }
.form-control { .form-control {
// 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%; width: 100%;
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -112,10 +117,25 @@ ...@@ -112,10 +117,25 @@
// ------------------------- // -------------------------
.input-group-btn { .input-group-btn {
position: relative; position: relative;
// Jankily prevent input button groups from wrapping // Jankily prevent input button groups from wrapping with `white-space` and
white-space: nowrap; // `font-size` in combination with `inline-block` on buttons.
// in combination with inline-blocks and nowrap, space characters would take visible space
font-size: 0; 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 // Negative margin to only have a 1px border between the two
&:first-child > .btn { &:first-child > .btn {
...@@ -125,14 +145,3 @@ ...@@ -125,14 +145,3 @@
margin-left: -1px; margin-left: -1px;
} }
} }
.input-group-btn > .btn {
position: relative;
+ .btn {
margin-left: -1px;
}
// Bring the "active" button to the front
&:hover,
&:active {
z-index: 2;
}
}
...@@ -6,19 +6,17 @@ ...@@ -6,19 +6,17 @@
.jumbotron { .jumbotron {
padding: @jumbotron-padding; padding: @jumbotron-padding;
margin-bottom: @jumbotron-padding; margin-bottom: @jumbotron-padding;
font-size: @jumbotron-font-size;
font-weight: 200;
line-height: (@line-height-base * 1.5);
color: @jumbotron-color; color: @jumbotron-color;
background-color: @jumbotron-bg; background-color: @jumbotron-bg;
h1, h1,
.h1 { .h1 {
line-height: 1;
color: @jumbotron-heading-color; color: @jumbotron-heading-color;
} }
p { p {
line-height: 1.4; margin-bottom: (@jumbotron-padding / 2);
font-size: @jumbotron-font-size;
font-weight: 200;
} }
.container & { .container & {
......
...@@ -79,7 +79,7 @@ a.list-group-item { ...@@ -79,7 +79,7 @@ a.list-group-item {
color: inherit; color: inherit;
} }
.list-group-item-text { .list-group-item-text {
color: lighten(@list-group-active-bg, 40%); color: @list-group-active-text-color;
} }
} }
} }
......
...@@ -147,17 +147,17 @@ ...@@ -147,17 +147,17 @@
// Transformations // Transformations
.rotate(@degrees) { .rotate(@degrees) {
-webkit-transform: rotate(@degrees); -webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); // IE9+ -ms-transform: rotate(@degrees); // IE9 only
transform: rotate(@degrees); transform: rotate(@degrees);
} }
.scale(@ratio; @ratio-y...) { .scale(@ratio; @ratio-y...) {
-webkit-transform: scale(@ratio, @ratio-y); -webkit-transform: scale(@ratio, @ratio-y);
-ms-transform: scale(@ratio, @ratio-y); // IE9+ -ms-transform: scale(@ratio, @ratio-y); // IE9 only
transform: scale(@ratio, @ratio-y); transform: scale(@ratio, @ratio-y);
} }
.translate(@x; @y) { .translate(@x; @y) {
-webkit-transform: translate(@x, @y); -webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y); // IE9+ -ms-transform: translate(@x, @y); // IE9 only
transform: translate(@x, @y); transform: translate(@x, @y);
} }
.skew(@x; @y) { .skew(@x; @y) {
...@@ -172,12 +172,12 @@ ...@@ -172,12 +172,12 @@
.rotateX(@degrees) { .rotateX(@degrees) {
-webkit-transform: rotateX(@degrees); -webkit-transform: rotateX(@degrees);
-ms-transform: rotateX(@degrees); // IE9+ -ms-transform: rotateX(@degrees); // IE9 only
transform: rotateX(@degrees); transform: rotateX(@degrees);
} }
.rotateY(@degrees) { .rotateY(@degrees) {
-webkit-transform: rotateY(@degrees); -webkit-transform: rotateY(@degrees);
-ms-transform: rotateY(@degrees); // IE9+ -ms-transform: rotateY(@degrees); // IE9 only
transform: rotateY(@degrees); transform: rotateY(@degrees);
} }
.perspective(@perspective) { .perspective(@perspective) {
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
.transform-origin(@origin) { .transform-origin(@origin) {
-webkit-transform-origin: @origin; -webkit-transform-origin: @origin;
-moz-transform-origin: @origin; -moz-transform-origin: @origin;
-ms-transform-origin: @origin; // IE9 only
transform-origin: @origin; transform-origin: @origin;
} }
...@@ -201,6 +202,30 @@ ...@@ -201,6 +202,30 @@
-webkit-animation: @animation; -webkit-animation: @animation;
animation: @animation; animation: @animation;
} }
.animation-name(@name) {
-webkit-animation-name: @name;
animation-name: @name;
}
.animation-duration(@duration) {
-webkit-animation-duration: @duration;
animation-duration: @duration;
}
.animation-timing-function(@timing-function) {
-webkit-animation-timing-function: @timing-function;
animation-timing-function: @timing-function;
}
.animation-delay(@delay) {
-webkit-animation-delay: @delay;
animation-delay: @delay;
}
.animation-iteration-count(@iteration-count) {
-webkit-animation-iteration-count: @iteration-count;
animation-iteration-count: @iteration-count;
}
.animation-direction(@direction) {
-webkit-animation-direction: @direction;
animation-direction: @direction;
}
// Backface visibility // Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms. // Prevent browsers from flickering when using CSS 3D transforms.
...@@ -353,7 +378,7 @@ ...@@ -353,7 +378,7 @@
// //
// Keep images from scaling beyond the width of their parents. // Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block;) { .img-responsive(@display: block) {
display: @display; display: @display;
max-width: 100%; // Part 1: Set a maximum relative to the parent 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 height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
...@@ -613,30 +638,39 @@ ...@@ -613,30 +638,39 @@
position: relative; position: relative;
float: left; float: left;
width: percentage((@columns / @grid-columns)); width: percentage((@columns / @grid-columns));
// Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2); padding-left: (@gutter / 2);
padding-right: (@gutter / 2); padding-right: (@gutter / 2);
} }
.make-xs-column-offset(@columns) {
@media (min-width: @screen-xs-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-xs-column-push(@columns) {
@media (min-width: @screen-xs-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-xs-column-pull(@columns) {
@media (min-width: @screen-xs-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the small columns // Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) { .make-sm-column(@columns; @gutter: @grid-gutter-width) {
position: relative; position: relative;
// Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2); padding-left: (@gutter / 2);
padding-right: (@gutter / 2); padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
float: left; float: left;
width: percentage((@columns / @grid-columns)); width: percentage((@columns / @grid-columns));
} }
} }
// Generate the small column offsets
.make-sm-column-offset(@columns) { .make-sm-column-offset(@columns) {
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
margin-left: percentage((@columns / @grid-columns)); margin-left: percentage((@columns / @grid-columns));
...@@ -653,23 +687,19 @@ ...@@ -653,23 +687,19 @@
} }
} }
// Generate the medium columns // Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) { .make-md-column(@columns; @gutter: @grid-gutter-width) {
position: relative; position: relative;
// Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2); padding-left: (@gutter / 2);
padding-right: (@gutter / 2); padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-md-min) { @media (min-width: @screen-md-min) {
float: left; float: left;
width: percentage((@columns / @grid-columns)); width: percentage((@columns / @grid-columns));
} }
} }
// Generate the medium column offsets
.make-md-column-offset(@columns) { .make-md-column-offset(@columns) {
@media (min-width: @screen-md-min) { @media (min-width: @screen-md-min) {
margin-left: percentage((@columns / @grid-columns)); margin-left: percentage((@columns / @grid-columns));
...@@ -686,23 +716,19 @@ ...@@ -686,23 +716,19 @@
} }
} }
// Generate the large columns // Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) { .make-lg-column(@columns; @gutter: @grid-gutter-width) {
position: relative; position: relative;
// Prevent columns from collapsing when empty
min-height: 1px; min-height: 1px;
// Inner gutter via padding
padding-left: (@gutter / 2); padding-left: (@gutter / 2);
padding-right: (@gutter / 2); padding-right: (@gutter / 2);
// Calculate width based on number of columns available
@media (min-width: @screen-lg-min) { @media (min-width: @screen-lg-min) {
float: left; float: left;
width: percentage((@columns / @grid-columns)); width: percentage((@columns / @grid-columns));
} }
} }
// Generate the large column offsets
.make-lg-column-offset(@columns) { .make-lg-column-offset(@columns) {
@media (min-width: @screen-lg-min) { @media (min-width: @screen-lg-min) {
margin-left: percentage((@columns / @grid-columns)); margin-left: percentage((@columns / @grid-columns));
......
...@@ -22,7 +22,12 @@ ...@@ -22,7 +22,12 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: @zindex-modal-background; z-index: @zindex-modal;
-webkit-overflow-scrolling: touch;
// Prevent Chrome on Windows from adding a focus outline. For details, see
// https://github.com/twbs/bootstrap/pull/10951.
outline: 0;
// When fading in the modal, animate it to slide down // When fading in the modal, animate it to slide down
&.fade .modal-dialog { &.fade .modal-dialog {
...@@ -37,7 +42,6 @@ ...@@ -37,7 +42,6 @@
position: relative; position: relative;
width: auto; width: auto;
margin: 10px; margin: 10px;
z-index: (@zindex-modal-background + 10);
} }
// Actual modal // Actual modal
...@@ -60,11 +64,11 @@ ...@@ -60,11 +64,11 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: (@zindex-modal-background - 10); z-index: @zindex-modal-background;
background-color: @modal-backdrop-bg; background-color: @modal-backdrop-bg;
// Fade for backdrop // Fade for backdrop
&.fade { .opacity(0); } &.fade { .opacity(0); }
&.in { .opacity(.5); } &.in { .opacity(@modal-backdrop-opacity); }
} }
// Modal header // Modal header
...@@ -116,8 +120,9 @@ ...@@ -116,8 +120,9 @@
} }
// Scale up the modal // Scale up the modal
@media screen and (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
// Automatically set modal's width for larger viewports
.modal-dialog { .modal-dialog {
width: 600px; width: 600px;
margin: 30px auto; margin: 30px auto;
...@@ -126,4 +131,8 @@ ...@@ -126,4 +131,8 @@
.box-shadow(0 5px 15px rgba(0,0,0,.5)); .box-shadow(0 5px 15px rgba(0,0,0,.5));
} }
// Modal sizes
.modal-sm { width: @modal-sm; }
.modal-lg { width: @modal-lg; }
} }
...@@ -161,6 +161,13 @@ ...@@ -161,6 +161,13 @@
text-decoration: none; text-decoration: none;
} }
// Prevent Glyphicons from increasing height of navbar
> .glyphicon {
float: left;
margin-top: -2px;
margin-right: 5px;
}
@media (min-width: @grid-float-breakpoint) { @media (min-width: @grid-float-breakpoint) {
.navbar > .container &, .navbar > .container &,
.navbar > .container-fluid & { .navbar > .container-fluid & {
...@@ -329,13 +336,6 @@ ...@@ -329,13 +336,6 @@
.border-bottom-radius(0); .border-bottom-radius(0);
} }
// Right aligned menus need alt position
.navbar-nav.pull-right > li > .dropdown-menu,
.navbar-nav > li > .dropdown-menu.pull-right {
left: auto;
right: 0;
}
// Buttons in navbars // Buttons in navbars
// //
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
> span { > span {
display: inline-block; display: inline-block;
padding: 5px 14px; padding: 5px 14px;
background-color: @pagination-bg; background-color: @pager-bg;
border: 1px solid @pagination-border; border: 1px solid @pager-border;
border-radius: @pager-border-radius; border-radius: @pager-border-radius;
} }
> a:hover, > a:hover,
> a:focus { > a:focus {
text-decoration: none; text-decoration: none;
background-color: @pagination-hover-bg; background-color: @pager-hover-bg;
} }
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
> a:focus, > a:focus,
> span { > span {
color: @pager-disabled-color; color: @pager-disabled-color;
background-color: @pagination-bg; background-color: @pager-bg;
cursor: not-allowed; cursor: not-allowed;
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// Panel contents // Panel contents
.panel-body { .panel-body {
padding: 15px; padding: @panel-body-padding;
&:extend(.clearfix all); &:extend(.clearfix all);
} }
......
...@@ -23,172 +23,51 @@ ...@@ -23,172 +23,51 @@
// Visibility utilities // Visibility utilities
.visible-xs { .visible-xs {
.responsive-invisibility(); .responsive-invisibility();
@media (max-width: @screen-xs-max) { @media (max-width: @screen-xs-max) {
.responsive-visibility(); .responsive-visibility();
} }
&.visible-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility();
}
}
&.visible-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility();
}
}
&.visible-lg {
@media (min-width: @screen-lg-min) {
.responsive-visibility();
}
}
} }
.visible-sm { .visible-sm {
.responsive-invisibility(); .responsive-invisibility();
&.visible-xs {
@media (max-width: @screen-xs-max) {
.responsive-visibility();
}
}
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility(); .responsive-visibility();
} }
&.visible-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility();
}
}
&.visible-lg {
@media (min-width: @screen-lg-min) {
.responsive-visibility();
}
}
} }
.visible-md { .visible-md {
.responsive-invisibility(); .responsive-invisibility();
&.visible-xs {
@media (max-width: @screen-xs-max) {
.responsive-visibility();
}
}
&.visible-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility();
}
}
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility(); .responsive-visibility();
} }
&.visible-lg {
@media (min-width: @screen-lg-min) {
.responsive-visibility();
}
}
} }
.visible-lg { .visible-lg {
.responsive-invisibility(); .responsive-invisibility();
&.visible-xs {
@media (max-width: @screen-xs-max) {
.responsive-visibility();
}
}
&.visible-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility();
}
}
&.visible-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility();
}
}
@media (min-width: @screen-lg-min) { @media (min-width: @screen-lg-min) {
.responsive-visibility(); .responsive-visibility();
} }
} }
.hidden-xs { .hidden-xs {
.responsive-visibility();
@media (max-width: @screen-xs-max) { @media (max-width: @screen-xs-max) {
.responsive-invisibility(); .responsive-invisibility();
} }
&.hidden-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-invisibility();
}
}
&.hidden-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-invisibility();
}
}
&.hidden-lg {
@media (min-width: @screen-lg-min) {
.responsive-invisibility();
}
}
} }
.hidden-sm { .hidden-sm {
.responsive-visibility();
&.hidden-xs {
@media (max-width: @screen-xs-max) {
.responsive-invisibility();
}
}
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-invisibility(); .responsive-invisibility();
} }
&.hidden-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-invisibility();
}
}
&.hidden-lg {
@media (min-width: @screen-lg-min) {
.responsive-invisibility();
}
}
} }
.hidden-md { .hidden-md {
.responsive-visibility();
&.hidden-xs {
@media (max-width: @screen-xs-max) {
.responsive-invisibility();
}
}
&.hidden-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-invisibility();
}
}
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-invisibility(); .responsive-invisibility();
} }
&.hidden-lg {
@media (min-width: @screen-lg-min) {
.responsive-invisibility();
}
}
} }
.hidden-lg { .hidden-lg {
.responsive-visibility();
&.hidden-xs {
@media (max-width: @screen-xs-max) {
.responsive-invisibility();
}
}
&.hidden-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-invisibility();
}
}
&.hidden-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-invisibility();
}
}
@media (min-width: @screen-lg-min) { @media (min-width: @screen-lg-min) {
.responsive-invisibility(); .responsive-invisibility();
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
line-height: 1.4; line-height: 1.4;
.opacity(0); .opacity(0);
&.in { .opacity(.9); } &.in { .opacity(@tooltip-opacity); }
&.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }
&.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
&.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }
......
...@@ -81,7 +81,13 @@ small, ...@@ -81,7 +81,13 @@ small,
// Undo browser default styling // Undo browser default styling
cite { font-style: normal; } cite { font-style: normal; }
// Contextual emphasis // Alignment
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
// Contextual colors
.text-muted { .text-muted {
color: @text-muted; color: @text-muted;
} }
...@@ -116,11 +122,42 @@ cite { font-style: normal; } ...@@ -116,11 +122,42 @@ cite { font-style: normal; }
} }
} }
// Alignment // Contextual backgrounds
.text-left { text-align: left; } // For now we'll leave these alongside the text classes until v4 when we can
.text-right { text-align: right; } // safely shift things around (per SemVer rules).
.text-center { text-align: center; } .bg-primary {
.text-justify { text-align: justify; } // Given the contrast here, this is the only class to have it's color inverted
// automatically.
color: #fff;
background-color: @brand-primary;
a&:hover {
background-color: darken(@brand-primary, 10%);
}
}
.bg-warning {
background-color: @state-warning-bg;
a&:hover {
background-color: darken(@state-warning-bg, 10%);
}
}
.bg-danger {
background-color: @state-danger-bg;
a&:hover {
background-color: darken(@state-danger-bg, 10%);
}
}
.bg-success {
background-color: @state-success-bg;
a&:hover {
background-color: darken(@state-success-bg, 10%);
}
}
.bg-info {
background-color: @state-info-bg;
a&:hover {
background-color: darken(@state-info-bg, 10%);
}
}
// Page header // Page header
...@@ -229,12 +266,14 @@ blockquote { ...@@ -229,12 +266,14 @@ blockquote {
border-left: 5px solid @blockquote-border-color; border-left: 5px solid @blockquote-border-color;
p { p {
font-size: (@font-size-base * 1.25); font-size: (@font-size-base * 1.25);
font-weight: 300;
line-height: 1.25;
} }
p:last-child { p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
// Deprecating small and .small for v3.1
// Context: https://github.com/twbs/bootstrap/issues/11660
footer,
small, small,
.small { .small {
display: block; display: block;
......
...@@ -189,6 +189,9 @@ ...@@ -189,6 +189,9 @@
@dropdown-header-color: @gray-light; @dropdown-header-color: @gray-light;
// Note: Deprecated @dropdown-caret-color as of v3.1.0
@dropdown-caret-color: #000;
// COMPONENT VARIABLES // COMPONENT VARIABLES
// -------------------------------------------------- // --------------------------------------------------
...@@ -363,8 +366,16 @@ ...@@ -363,8 +366,16 @@
// Pager // Pager
// ------------------------- // -------------------------
@pager-bg: @pagination-bg;
@pager-border: @pagination-border;
@pager-border-radius: 15px; @pager-border-radius: 15px;
@pager-disabled-color: @gray-light;
@pager-hover-bg: @pagination-hover-bg;
@pager-active-bg: @pagination-active-bg;
@pager-active-color: @pagination-active-color;
@pager-disabled-color: @pagination-disabled-color;
// Jumbotron // Jumbotron
...@@ -402,6 +413,7 @@ ...@@ -402,6 +413,7 @@
@tooltip-max-width: 200px; @tooltip-max-width: 200px;
@tooltip-color: #fff; @tooltip-color: #fff;
@tooltip-bg: #000; @tooltip-bg: #000;
@tooltip-opacity: .9;
@tooltip-arrow-width: 5px; @tooltip-arrow-width: 5px;
@tooltip-arrow-color: @tooltip-bg; @tooltip-arrow-color: @tooltip-bg;
...@@ -450,9 +462,13 @@ ...@@ -450,9 +462,13 @@
@modal-content-fallback-border-color: #999; @modal-content-fallback-border-color: #999;
@modal-backdrop-bg: #000; @modal-backdrop-bg: #000;
@modal-backdrop-opacity: .5;
@modal-header-border-color: #e5e5e5; @modal-header-border-color: #e5e5e5;
@modal-footer-border-color: @modal-header-border-color; @modal-footer-border-color: @modal-header-border-color;
@modal-lg: 900px;
@modal-sm: 300px;
// Alerts // Alerts
// ------------------------- // -------------------------
...@@ -491,24 +507,26 @@ ...@@ -491,24 +507,26 @@
// List group // List group
// ------------------------- // -------------------------
@list-group-bg: #fff; @list-group-bg: #fff;
@list-group-border: #ddd; @list-group-border: #ddd;
@list-group-border-radius: @border-radius-base; @list-group-border-radius: @border-radius-base;
@list-group-hover-bg: #f5f5f5; @list-group-hover-bg: #f5f5f5;
@list-group-active-color: @component-active-color; @list-group-active-color: @component-active-color;
@list-group-active-bg: @component-active-bg; @list-group-active-bg: @component-active-bg;
@list-group-active-border: @list-group-active-bg; @list-group-active-border: @list-group-active-bg;
@list-group-active-text-color: lighten(@list-group-active-bg, 40%);
@list-group-link-color: #555;
@list-group-link-heading-color: #333;
@list-group-link-color: #555;
@list-group-link-heading-color: #333;
// Panels // Panels
// ------------------------- // -------------------------
@panel-bg: #fff; @panel-bg: #fff;
@panel-inner-border: #ddd; @panel-body-padding: 15px;
@panel-border-radius: @border-radius-base; @panel-border-radius: @border-radius-base;
@panel-inner-border: #ddd;
@panel-footer-bg: #f5f5f5; @panel-footer-bg: #f5f5f5;
@panel-default-text: @gray-dark; @panel-default-text: @gray-dark;
...@@ -550,6 +568,7 @@ ...@@ -550,6 +568,7 @@
// Wells // Wells
// ------------------------- // -------------------------
@well-bg: #f5f5f5; @well-bg: #f5f5f5;
@well-border: darken(@well-bg, 7%);
// Badges // Badges
...@@ -568,10 +587,12 @@ ...@@ -568,10 +587,12 @@
// Breadcrumbs // Breadcrumbs
// ------------------------- // -------------------------
@breadcrumb-bg: #f5f5f5; @breadcrumb-padding-vertical: 8px;
@breadcrumb-color: #ccc; @breadcrumb-padding-horizontal: 15px;
@breadcrumb-active-color: @gray-light; @breadcrumb-bg: #f5f5f5;
@breadcrumb-separator: "/"; @breadcrumb-color: #ccc;
@breadcrumb-active-color: @gray-light;
@breadcrumb-separator: "/";
// Carousel // Carousel
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
padding: 19px; padding: 19px;
margin-bottom: 20px; margin-bottom: 20px;
background-color: @well-bg; background-color: @well-bg;
border: 1px solid darken(@well-bg, 7%); border: 1px solid @well-border;
border-radius: @border-radius-base; border-radius: @border-radius-base;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
blockquote { blockquote {
......
{ {
"name": "bootstrap" "name": "bootstrap",
, "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development." "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.",
, "version": "3.0.3" "version": "3.0.3",
, "keywords": ["bootstrap", "css"] "keywords": ["bootstrap", "css"],
, "homepage": "http://getbootstrap.com" "homepage": "http://getbootstrap.com",
, "author": "Twitter, Inc." "author": "Twitter, Inc.",
, "scripts": { "test": "grunt test" } "scripts": { "test": "grunt test" },
, "repository": { "repository": {
"type": "git" "type": "git"
, "url": "https://github.com/twbs/bootstrap.git" , "url": "https://github.com/twbs/bootstrap.git"
} },
, "bugs": { "bugs": {
"url": "https://github.com/twbs/bootstrap/issues" "url": "https://github.com/twbs/bootstrap/issues"
} },
, "licenses": [ "licenses": [
{ {
"type": "Apache-2.0" "type": "Apache-2.0",
, "url": "http://www.apache.org/licenses/LICENSE-2.0" "url": "http://www.apache.org/licenses/LICENSE-2.0"
}
]
, "devDependencies": {
"btoa": "~1.1.1"
, "grunt": "~0.4.1"
, "grunt-banner": "~0.2.0"
, "grunt-contrib-clean": "~0.5.0"
, "grunt-contrib-concat": "~0.3.0"
, "grunt-contrib-connect": "~0.5.0"
, "grunt-contrib-copy": "~0.4.1"
, "grunt-contrib-csslint": "~0.2.0"
, "grunt-contrib-jshint": "~0.7.0"
, "grunt-contrib-less": "~0.8.0"
, "grunt-contrib-qunit": "~0.3.0"
, "grunt-contrib-uglify": "~0.2.4"
, "grunt-contrib-watch": "~0.5.3"
, "grunt-csscomb": "~1.1.0"
, "grunt-html-validation": "~0.1.6"
, "grunt-jekyll": "~0.4.0"
, "grunt-jscs-checker": "~0.2.5"
, "grunt-saucelabs": "~4.1.2"
, "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 } ],
"devDependencies": {
"btoa": "~1.1.1",
"grunt": "~0.4.1",
"grunt-banner": "~0.2.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-csslint": "~0.2.0",
"grunt-contrib-jshint": "~0.7.0",
"grunt-contrib-less": "~0.8.0",
"grunt-contrib-qunit": "~0.3.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-csscomb": "~1.1.0",
"grunt-html-validation": "~0.1.6",
"grunt-jekyll": "~0.4.0",
"grunt-jscs-checker": "~0.2.5",
"grunt-saucelabs": "~4.1.2",
"grunt-sed": "~0.1.1",
"load-grunt-tasks": "~0.2.0"
},
"jspm": {
"main": "js/bootstrap",
"directories": { "lib": "dist" },
"shim": {
"js/bootstrap": {
"imports": "jquery",
"exports": "$"
}
},
"buildConfig": { "uglify": true }
} }
} }
#!/usr/bin/env python2.7
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, remove as _delete_file
from os.path import isfile
from hashlib import sha256
from subprocess import check_call as run
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
NODE_MODULES_TARBALL = 'node_modules.tar.gz'
NEED_TO_UPLOAD_MARKER = '.need-to-upload'
BYTES_PER_MB = 1024 * 1024
try:
BUCKET_NAME = environ['TWBS_S3_BUCKET']
except KeyError:
raise SystemExit("TWBS_S3_BUCKET environment variable not set!")
def _sha256_of_file(filename):
hasher = sha256()
with open(filename, 'rb') as input_file:
hasher.update(input_file.read())
return hasher.hexdigest()
def _delete_file_quietly(filename):
try:
_delete_file(filename)
except (OSError, IOError):
pass
def _tarball_size():
kib = stat(NODE_MODULES_TARBALL).st_size // BYTES_PER_MB
return "{} MiB".format(kib)
if __name__ == '__main__':
# Uses environment variables:
# AWS_ACCESS_KEY_ID - AWS Access Key ID
# AWS_SECRET_ACCESS_KEY - AWS Secret Access Key
argv.pop(0)
if len(argv) != 1:
raise SystemExit("USAGE: node_modules_cache.py <download | upload>")
mode = argv.pop()
conn = S3Connection()
bucket = conn.lookup(BUCKET_NAME)
if bucket is None:
raise SystemExit("Could not access bucket!")
package_json_hash = _sha256_of_file('package.json')
print('sha256(package.json) = ' + package_json_hash)
key = Key(bucket, package_json_hash)
key.storage_class = 'REDUCED_REDUNDANCY'
if mode == 'download':
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
try:
print("Downloading tarball from S3...")
key.get_contents_to_filename(NODE_MODULES_TARBALL)
except S3ResponseError as err:
open(NEED_TO_UPLOAD_MARKER, 'a').close()
print(err)
raise SystemExit("Cached node_modules download failed!")
print("Downloaded {}.".format(_tarball_size()))
print("Extracting tarball...")
run(['tar', 'xzf', NODE_MODULES_TARBALL])
print("node_modules successfully installed from cache.")
elif mode == 'upload':
if isfile(NEED_TO_UPLOAD_MARKER):
print("Creating tarball...")
run(['tar', 'czf', NODE_MODULES_TARBALL, 'node_modules'])
print("Uploading tarball to S3... ({})".format(_tarball_size()))
key.set_contents_from_filename(NODE_MODULES_TARBALL)
print("node_modules cache successfully updated.")
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
else:
print("No need to upload anything.")
else:
raise SystemExit("Unrecognized mode {!r}".format(mode))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment