Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/krissihall/bootstrap
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/krissihall/bootstrap: (210 commits)
  grunt dist
  Use HTTPS in CDN URLs in _config.yml
  Tabs to spaces
  speed up js tests a bit
  Follow-up to twbs#13907: simplify JS logic for focus shim
  regenerate docs/assets/js/docs.min.js
  popover dismiss-on-next-click example: instead of <button>, use <a> w/ tabindex
  Fix jsbin link
  Another new js bin link
  add docs note about browsers w/ JS disabled; fixes twbs#14134
  fix twbs#14114 mo' betta
  Fix inaccessible buttons.
  typos
  Redundant thanks to bb1286a
  grunt
  Fixes twbs#14074: Make open dropdown nav links in navbar use gradients
  Fixes twbs#14133
  Fixes twbs#14132: add .alert-dismissible to docs examples
  Use bootstrapcdn links
  New Android select example
  ...
  • Loading branch information
Hall, Kristina authored and Hall, Kristina committed Nov 26, 2014
2 parents 7c9c251 + 49519e9 commit 121507a
Show file tree
Hide file tree
Showing 144 changed files with 18,344 additions and 4,967 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ before_install:
- time travis_retry sudo pip install -r test-infra/requirements.txt
- rvm use 1.9.3 --fuzzy
- export GEMDIR=$(rvm gemdir)
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION rouge=$ROUGE_VERSION" > pseudo_Gemfile.lock; fi
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
Expand All @@ -18,7 +18,8 @@ after_script:
- if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi
env:
global:
- JEKYLL_VERSION: 2.0.3
- JEKYLL_VERSION: 2.1.0
- ROUGE_VERSION: 1.4.0
- SAUCE_USERNAME: bootstrap
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
Expand Down
20 changes: 5 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Guidelines for bug reports:

3. **Isolate the problem** &mdash; ideally create a [reduced test
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
[This JS Bin](http://jsbin.com/EBAwOkOK/1) is a helpful template.
[This JS Bin](http://jsbin.com/lefey/1/edit?html,output) is a helpful template.


A good bug report shouldn't leave others needing to chase you up for more
Expand Down Expand Up @@ -154,26 +154,16 @@ license your work under the terms of the [MIT License](LICENSE.md).

### HTML

- Two spaces for indentation, never tabs.
- Double quotes only, never single quotes.
- Always use proper indentation.
[Adhere to the Code Guide.](http://codeguide.co/#html)

- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.

### CSS

- CSS changes must be done in `.less` files first, never just in the compiled `.css` files.
- Adhere to the [CSS property order](http://markdotto.com/2011/11/29/css-property-order/).
- 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;`).
- End all lines with a semi-colon.
- For multiple, comma-separated selectors, place each selector on its own line.
- Don't add vendor prefixed properties to their unprefixed counterparts (e.g., only `box-sizing` and not also include `-webkit-box-sizing`), as this is done automagically at build time.
- 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.
[Adhere to the Code Guide.](http://codeguide.co/#css)

- When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast).
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details.

Expand Down
69 changes: 39 additions & 30 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ module.exports = function (grunt) {

var fs = require('fs');
var path = require('path');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var npmShrinkwrap = require('npm-shrinkwrap');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
var updateShrinkwrap = require('./grunt/shrinkwrap.js');

// Project configuration.
grunt.initConfig({
Expand All @@ -33,7 +32,7 @@ module.exports = function (grunt) {
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n',
// NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too.
jqueryCheck: 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',
jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',

// Task configuration.
clean: {
Expand All @@ -60,7 +59,7 @@ module.exports = function (grunt) {
src: 'js/tests/unit/*.js'
},
assets: {
src: ['docs/assets/js/_src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
}
},

Expand Down Expand Up @@ -119,21 +118,22 @@ module.exports = function (grunt) {
},
customize: {
src: [
'docs/assets/js/_vendor/less.min.js',
'docs/assets/js/_vendor/jszip.min.js',
'docs/assets/js/_vendor/uglify.min.js',
'docs/assets/js/_vendor/blob.js',
'docs/assets/js/_vendor/filesaver.js',
'docs/assets/js/vendor/less.min.js',
'docs/assets/js/vendor/jszip.min.js',
'docs/assets/js/vendor/uglify.min.js',
'docs/assets/js/vendor/blob.js',
'docs/assets/js/vendor/filesaver.js',
'docs/assets/js/raw-files.min.js',
'docs/assets/js/_src/customizer.js'
'docs/assets/js/src/customizer.js'
],
dest: 'docs/assets/js/customize.min.js'
},
docsJs: {
// NOTE: This src list is duplicated in footer.html; if making changes here, be sure to update the other copy too.
src: [
'docs/assets/js/_vendor/holder.js',
'docs/assets/js/_vendor/ZeroClipboard.min.js',
'docs/assets/js/_src/application.js'
'docs/assets/js/vendor/holder.js',
'docs/assets/js/vendor/ZeroClipboard.min.js',
'docs/assets/js/src/application.js'
],
dest: 'docs/assets/js/docs.min.js'
}
Expand Down Expand Up @@ -199,7 +199,7 @@ module.exports = function (grunt) {
src: 'dist/css/<%= pkg.name %>-theme.css'
},
docs: {
src: 'docs/assets/css/_src/docs.css'
src: 'docs/assets/css/src/docs.css'
},
examples: {
expand: true,
Expand All @@ -225,14 +225,15 @@ module.exports = function (grunt) {
ids: false,
'overqualified-elements': false
},
src: 'docs/assets/css/_src/docs.css'
src: 'docs/assets/css/src/docs.css'
}
},

cssmin: {
options: {
compatibility: 'ie8',
keepSpecialComments: '*'
keepSpecialComments: '*',
noAdvanced: true
},
core: {
files: {
Expand All @@ -242,8 +243,8 @@ module.exports = function (grunt) {
},
docs: {
src: [
'docs/assets/css/_src/docs.css',
'docs/assets/css/_src/pygments-manni.css'
'docs/assets/css/src/docs.css',
'docs/assets/css/src/pygments-manni.css'
],
dest: 'docs/assets/css/docs.min.css'
}
Expand Down Expand Up @@ -277,7 +278,7 @@ module.exports = function (grunt) {
},
docs: {
files: {
'docs/assets/css/_src/docs.css': 'docs/assets/css/_src/docs.css'
'docs/assets/css/src/docs.css': 'docs/assets/css/src/docs.css'
}
}
},
Expand All @@ -292,8 +293,8 @@ module.exports = function (grunt) {
expand: true,
cwd: './dist',
src: [
'{css,js}/*.min.*',
'css/*.map',
'css/*',
'js/*',
'fonts/*'
],
dest: 'docs/dist'
Expand Down Expand Up @@ -378,6 +379,7 @@ module.exports = function (grunt) {
options: {
build: process.env.TRAVIS_JOB_ID,
concurrency: 10,
maxRetries: 3,
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
}
Expand All @@ -387,9 +389,6 @@ module.exports = function (grunt) {
exec: {
npmUpdate: {
command: 'npm update'
},
npmShrinkWrap: {
command: 'npm shrinkwrap --dev'
}
}
});
Expand Down Expand Up @@ -446,15 +445,13 @@ module.exports = function (grunt) {
grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']);

// Default task.
grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']);
grunt.registerTask('default', ['test', 'dist', 'build-customizer']);

// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'sed');

grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); });

// task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
grunt.registerTask('build-customizer-html', 'jade');
Expand All @@ -463,7 +460,19 @@ module.exports = function (grunt) {
generateRawFiles(grunt, banner);
});

// Task for updating the npm packages used by the Travis build.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']);
grunt.registerTask('_update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); });
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
grunt.registerTask('_update-shrinkwrap', function () {
var done = this.async();
npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) {
if (err) {
grunt.fail.warn(err);
}
var dest = 'test-infra/npm-shrinkwrap.json';
fs.renameSync('npm-shrinkwrap.json', dest);
grunt.log.writeln('File ' + dest.cyan + ' updated.');
done();
});
});
};
47 changes: 6 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ To get started, check out <http://getbootstrap.com>!
- [Quick start](#quick-start)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation)
- [Compiling CSS and JavaScript](#compiling-css-and-javascript)
- [Contributing](#contributing)
- [Community](#community)
- [Versioning](#versioning)
Expand All @@ -25,7 +24,7 @@ To get started, check out <http://getbootstrap.com>!

Three quick start options are available:

- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.1.1.zip).
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.2.0.zip).
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
- Install with [Bower](http://bower.io): `bower install bootstrap`.

Expand Down Expand Up @@ -67,10 +66,11 @@ Bootstrap's documentation, included in this repo in the root directory, is built

### Running documentation locally

1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.0.x).
- **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. We use Pygments for syntax highlighting, so make sure to read the sections on installing Python and Pygments.
2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
3. Open <http://localhost:9001> in your browser, and voilà.
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.1.x).
- **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems.
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
4. Open <http://localhost:9001> in your browser, and voilà.

Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).

Expand All @@ -82,41 +82,6 @@ Documentation for v2.3.2 has been made available for the time being at <http://g



## Compiling CSS and JavaScript

Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.

### Install Grunt

From the command line:

1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there.

When completed, you'll be able to run the various Grunt commands provided from the command line.

**Unfamiliar with npm? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.

### Available Grunt commands

#### Build - `grunt`
Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**

#### Only compile CSS and JavaScript - `grunt dist`
`grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**

#### Tests - `grunt test`
Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).

#### Watch - `grunt watch`
This is a convenience method for watching just Less files and automatically building them whenever you save.

### Troubleshooting dependencies

Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.



## Contributing

Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
Expand Down
16 changes: 8 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies
markdown: kramdown
highlighter: pygments
highlighter: rouge

# Permalinks
permalink: pretty
Expand All @@ -15,19 +15,19 @@ url: http://getbootstrap.com
encoding: UTF-8

# Custom vars
current_version: 3.1.1
current_version: 3.2.0
repo: https://github.com/twbs/bootstrap
sass_repo: https://github.com/twbs/bootstrap-sass

download:
source: https://github.com/twbs/bootstrap/archive/v3.1.1.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.1.1/bootstrap-3.1.1-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.1.1.tar.gz
source: https://github.com/twbs/bootstrap/archive/v3.2.0.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.2.0/bootstrap-3.2.0-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.2.0.tar.gz

blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com

cdn:
css: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
css_theme: //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css
js: //netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js
css: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css
css_theme: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css
js: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.1.1",
"version": "3.2.0",
"keywords": [
"css",
"js",
Expand All @@ -23,7 +23,7 @@
"dist/fonts/glyphicons-halflings-regular.woff"
],
"ignore": [
".*",
"/.*",
"_config.yml",
"CNAME",
"composer.json",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"license": "MIT",
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
"dev-master": "3.2.x-dev"
}
},
"replace": {
Expand Down
Loading

0 comments on commit 121507a

Please sign in to comment.