Commit 1bc8607b authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'master' into css-source-maps

Conflicts:
	Gruntfile.js
parents 9e38e255 d15218a0
Showing with 1228 additions and 635 deletions
+1228 -635
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 - rvm use 1.9.3 --fuzzy
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
install:
- time npm install -g grunt-cli
- time ./test-infra/s3_cache.py download 'node.js packages' package.json ./node_modules || time npm install
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py download rubygems pseudo_Gemfile.lock $(rvm gemdir) || gem install -N jekyll -v $JEKYLL_VERSION; fi
after_script:
- if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'node.js packages' package.json ./node_modules; fi
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi
env: env:
global: global:
- SAUCE_USERNAME: bootstrap - JEKYLL_VERSION: 1.4.1
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ=" - SAUCE_USERNAME: bootstrap
- 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({
...@@ -113,6 +115,7 @@ module.exports = function (grunt) { ...@@ -113,6 +115,7 @@ module.exports = function (grunt) {
less: { less: {
compileCore: { compileCore: {
options: { options: {
strictMath: true,
sourceMap: true, sourceMap: true,
outputSourceFiles: true, outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map', sourceMapURL: '<%= pkg.name %>.css.map',
...@@ -124,6 +127,7 @@ module.exports = function (grunt) { ...@@ -124,6 +127,7 @@ module.exports = function (grunt) {
}, },
compileTheme: { compileTheme: {
options: { options: {
strictMath: true,
sourceMap: true, sourceMap: true,
outputSourceFiles: true, outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>-theme.css.map', sourceMapURL: '<%= pkg.name %>-theme.css.map',
...@@ -204,6 +208,9 @@ module.exports = function (grunt) { ...@@ -204,6 +208,9 @@ module.exports = function (grunt) {
validation: { validation: {
options: { options: {
charset: 'utf-8',
doctype: 'HTML5',
failHard: true,
reset: true, reset: true,
relaxerror: [ relaxerror: [
'Bad value X-UA-Compatible for attribute http-equiv on element meta.', 'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
...@@ -247,90 +254,7 @@ module.exports = function (grunt) { ...@@ -247,90 +254,7 @@ module.exports = function (grunt) {
build: process.env.TRAVIS_JOB_ID, build: process.env.TRAVIS_JOB_ID,
concurrency: 3, concurrency: 3,
urls: ['http://127.0.0.1:3000/js/tests/index.html'], urls: ['http://127.0.0.1:3000/js/tests/index.html'],
browsers: [ browsers: grunt.file.readYAML('sauce_browsers.yml')
// See https://saucelabs.com/docs/platforms/webdriver
{
browserName: 'safari',
version: '6',
platform: 'OS X 10.8'
},
{
browserName: 'chrome',
version: '28',
platform: 'OS X 10.6'
},
/* FIXME: currently fails 1 tooltip test
{
browserName: 'firefox',
version: '25',
platform: 'OS X 10.6'
},*/
// Mac Opera not currently supported by Sauce Labs
/* FIXME: currently fails 1 tooltip test
{
browserName: 'internet explorer',
version: '11',
platform: 'Windows 8.1'
},*/
/*
{
browserName: 'internet explorer',
version: '10',
platform: 'Windows 8'
},
{
browserName: 'internet explorer',
version: '9',
platform: 'Windows 7'
},
{
browserName: 'internet explorer',
version: '8',
platform: 'Windows 7'
},
{// unofficial
browserName: 'internet explorer',
version: '7',
platform: 'Windows XP'
},
*/
{
browserName: 'chrome',
version: '31',
platform: 'Windows 8.1'
},
{
browserName: 'firefox',
version: '25',
platform: 'Windows 8.1'
},
// Win Opera 15+ not currently supported by Sauce Labs
{
browserName: 'iphone',
version: '6.1',
platform: 'OS X 10.8'
},
// iOS Chrome not currently supported by Sauce Labs
// Linux (unofficial)
{
browserName: 'chrome',
version: '30',
platform: 'Linux'
},
{
browserName: 'firefox',
version: '25',
platform: 'Linux'
}
// Android Chrome not currently supported by Sauce Labs
/* Android Browser (super-unofficial)
{
browserName: 'android',
version: '4.0',
platform: 'Linux'
}
*/
],
} }
} }
} }
...@@ -338,31 +262,25 @@ module.exports = function (grunt) { ...@@ -338,31 +262,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/).
......
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
<li><a href="#forms-horizontal">Horizontal form</a></li> <li><a href="#forms-horizontal">Horizontal form</a></li>
<li><a href="#forms-controls">Supported controls</a></li> <li><a href="#forms-controls">Supported controls</a></li>
<li><a href="#forms-controls-static">Static control</a></li> <li><a href="#forms-controls-static">Static control</a></li>
<li><a href="#forms-control-states">Control states</a></li> <li><a href="#forms-control-focus">Focus state</a></li>
<li><a href="#forms-control-disabled">Disabled state</a></li>
<li><a href="#forms-control-validation">Validation states</a></li>
<li><a href="#forms-control-sizes">Control sizing</a></li> <li><a href="#forms-control-sizes">Control sizing</a></li>
<li><a href="#forms-help-text">Help text</a></li> <li><a href="#forms-help-text">Help text</a></li>
</ul> </ul>
...@@ -87,6 +89,8 @@ ...@@ -87,6 +89,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 +109,11 @@ ...@@ -105,3 +109,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="#support">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",
......
...@@ -902,9 +902,13 @@ base_url: "../" ...@@ -902,9 +902,13 @@ base_url: "../"
{% endhighlight %} {% endhighlight %}
<h3 id="dropdowns-alignment">Alignment options</h3> <h3 id="dropdowns-alignment">Alignment options</h3>
<p>Add <code>.pull-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p> <p>Add <code>.dropdown-menu-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>
<div class="bs-callout bs-callout-warning">
<h4>Deprecated <code>.pull-right</code> alignment</h4>
<p>As of v3.1, we've deprecated <code>.pull-right</code> on dropdown menus. To right-align a menu, use <code>.dropdown-menu-right</code>. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use <code>.dropdown-menu-left</code>.</p>
</div>
{% highlight html %} {% highlight html %}
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel"> <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dLabel">
... ...
</ul> </ul>
{% endhighlight %} {% endhighlight %}
...@@ -1099,7 +1103,7 @@ base_url: "../" ...@@ -1099,7 +1103,7 @@ base_url: "../"
{% endhighlight %} {% endhighlight %}
<h3 id="btn-groups-vertical">Vertical variation</h3> <h3 id="btn-groups-vertical">Vertical variation</h3>
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p> <p>Make a set of buttons appear vertically stacked rather than horizontally. <strong class="text-danger">Split button dropdowns are not supported here.</strong></p>
<div class="bs-example"> <div class="bs-example">
<div class="btn-group-vertical"> <div class="btn-group-vertical">
<button type="button" class="btn btn-default">Button</button> <button type="button" class="btn btn-default">Button</button>
...@@ -1548,6 +1552,7 @@ base_url: "../" ...@@ -1548,6 +1552,7 @@ base_url: "../"
<h2 id="input-groups-basic">Basic example</h2> <h2 id="input-groups-basic">Basic example</h2>
<p>Place one add-on or button on either side of an input. You may also place one on both sides of an input. <strong class="text-danger">We do not support multiple add-ons on a single side.</strong></p>
<form class="bs-example bs-example-form" role="form"> <form class="bs-example bs-example-form" role="form">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">@</span> <span class="input-group-addon">@</span>
...@@ -2169,7 +2174,7 @@ base_url: "../" ...@@ -2169,7 +2174,7 @@ base_url: "../"
<h2 id="navbar-forms">Forms</h2> <h2 id="navbar-forms">Forms</h2>
<p>Place form content within <code>.navbar-form</code> for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.</p> <p>Place form content within <code>.navbar-form</code> for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.</p>
<p>As a heads up, <code>.navbar-form</code> shares much of its code with <code>.form-inline</code> via mixin.</p> <p>As a heads up, <code>.navbar-form</code> shares much of its code with <code>.form-inline</code> via mixin. <strong class="text-danger">Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.</strong></p>
<div class="bs-example"> <div class="bs-example">
<nav class="navbar navbar-default" role="navigation"> <nav class="navbar navbar-default" role="navigation">
<div class="navbar-header"> <div class="navbar-header">
...@@ -2200,6 +2205,11 @@ base_url: "../" ...@@ -2200,6 +2205,11 @@ base_url: "../"
</form> </form>
{% endhighlight %} {% endhighlight %}
<div class="bs-callout bs-callout-warning">
<h4>Mobile device caveats</h4>
<p>There are some caveats regarding using form controls within fixed elements on mobile devices. <a href="{{ page.base_url }}getting-started#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
</div>
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Always add labels</h4> <h4>Always add labels</h4>
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the <code>.sr-only</code> class.</p> <p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the <code>.sr-only</code> class.</p>
...@@ -2285,33 +2295,36 @@ base_url: "../" ...@@ -2285,33 +2295,36 @@ base_url: "../"
<h2 id="navbar-fixed-top">Fixed to top</h2> <h2 id="navbar-fixed-top">Fixed to top</h2>
<p>Add <code>.navbar-fixed-top</code>.</p> <p>Add <code>.navbar-fixed-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
<div class="bs-example bs-navbar-top-example"> <div class="bs-example bs-navbar-top-example">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display --> <!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
<div class="navbar-header"> <div class="container-fluid">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6"> <div class="navbar-header">
<span class="sr-only">Toggle navigation</span> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6">
<span class="icon-bar"></span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<a class="navbar-brand" href="#">Brand</a> </button>
</div> <a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav">
<ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li>
<li class="active"><a href="#">Home</a></li> <li><a href="#">Link</a></li>
<li><a href="#">Link</a></li> <li><a href="#">Link</a></li>
<li><a href="#">Link</a></li> </ul>
</ul> </div><!-- /.navbar-collapse -->
</div><!-- /.navbar-collapse --> </div>
</nav> </nav>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
... <div class="container">
...
</div>
</nav> </nav>
{% endhighlight %} {% endhighlight %}
...@@ -2326,33 +2339,36 @@ body { padding-top: 70px; } ...@@ -2326,33 +2339,36 @@ body { padding-top: 70px; }
<h2 id="navbar-fixed-bottom">Fixed to bottom</h2> <h2 id="navbar-fixed-bottom">Fixed to bottom</h2>
<p>Add <code>.navbar-fixed-bottom</code> instead.</p> <p>Add <code>.navbar-fixed-bottom</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
<div class="bs-example bs-navbar-bottom-example"> <div class="bs-example bs-navbar-bottom-example">
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation"> <nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<!-- Brand and toggle get grouped for better mobile display --> <!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
<div class="navbar-header"> <div class="container-fluid">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-7"> <div class="navbar-header">
<span class="sr-only">Toggle navigation</span> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-7">
<span class="icon-bar"></span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<a class="navbar-brand" href="#">Brand</a> </button>
</div> <a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-7">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-7"> <ul class="nav navbar-nav">
<ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li>
<li class="active"><a href="#">Home</a></li> <li><a href="#">Link</a></li>
<li><a href="#">Link</a></li> <li><a href="#">Link</a></li>
<li><a href="#">Link</a></li> </ul>
</ul> </div><!-- /.navbar-collapse -->
</div><!-- /.navbar-collapse --> </div>
</nav> </nav>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation"> <nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
... <div class="container">
...
</div>
</nav> </nav>
{% endhighlight %} {% endhighlight %}
...@@ -2367,33 +2383,38 @@ body { padding-bottom: 70px; } ...@@ -2367,33 +2383,38 @@ body { padding-bottom: 70px; }
<h2 id="navbar-static-top">Static top</h2> <h2 id="navbar-static-top">Static top</h2>
<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code>. Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p> <p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
<p>Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p>
<div class="bs-example bs-navbar-top-example"> <div class="bs-example bs-navbar-top-example">
<nav class="navbar navbar-default navbar-static-top" role="navigation"> <nav class="navbar navbar-default navbar-static-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display --> <!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
<div class="navbar-header"> <div class="container-fluid">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-8"> <div class="navbar-header">
<span class="sr-only">Toggle navigation</span> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-8">
<span class="icon-bar"></span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<a class="navbar-brand" href="#">Brand</a> </button>
</div> <a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-8"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-8">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li> <li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li> <li><a href="#">Link</a></li>
<li><a href="#">Link</a></li> <li><a href="#">Link</a></li>
</ul> </ul>
</div><!-- /.navbar-collapse --> </div><!-- /.navbar-collapse -->
</div>
</nav> </nav>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<nav class="navbar navbar-default navbar-static-top" role="navigation"> <nav class="navbar navbar-default navbar-static-top" role="navigation">
... <div class="container">
...
</div>
</nav> </nav>
{% endhighlight %} {% endhighlight %}
......
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 diff is collapsed.
...@@ -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 diff is collapsed.
...@@ -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 diff is collapsed.
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;
}
Supports Markdown
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