Commit ea20f448 authored by Mark Otto's avatar Mark Otto

Merge branch 'master' into docs_derp

Conflicts:
	docs/assets/css/docs.css
parents 04161a8c 7f153974
......@@ -92,11 +92,11 @@ implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
Please adhere to the [coding conventions](#code-conventions) used throughout a
Please adhere to the [coding guidelines](#code-guidelines) used throughout the
project (indentation, accurate comments, etc.) and any other requirements
(such as test coverage).
Adhering to the following this process is the best way to get your work
Adhering to the following process is the best way to get your work
included in the project:
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
......@@ -147,27 +147,27 @@ included in the project:
with a clear title and description against the `master` branch.
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the the terms of the [MIT License](LICENSE.md).
license your work under the terms of the [MIT License](LICENSE.md).
## Code guidelines
### HTML
- Two spaces for indentation, never tabs
- Double quotes only, never single quotes
- Always use proper indentation
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags)
- Two spaces for indentation, never tabs.
- Double quotes only, never single quotes.
- Always use proper indentation.
- 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://`.
### 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
- 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.
- 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`).
......
......@@ -10,8 +10,11 @@ module.exports = function (grunt) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}
var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js')
var fs = require('fs')
var btoa = require('btoa')
var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js')
var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js')
var path = require('path')
// Project configuration.
grunt.initConfig({
......@@ -20,7 +23,7 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
' */\n',
jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n',
......@@ -45,6 +48,9 @@ module.exports = function (grunt) {
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
},
docsGrunt: {
src: ['docs/grunt/*.js']
}
},
......@@ -63,6 +69,9 @@ module.exports = function (grunt) {
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
},
docsGrunt: {
src: ['docs/grunt/*.js']
}
},
......@@ -114,7 +123,7 @@ module.exports = function (grunt) {
options: {
banner: '/*!\n' +
' * Bootstrap Docs (<%= pkg.homepage %>)\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under the Creative Commons Attribution 3.0 Unported License. For\n' +
' * details, see http://creativecommons.org/licenses/by/3.0/.\n' +
' */\n',
......@@ -127,7 +136,7 @@ module.exports = function (grunt) {
'docs/assets/js/filesaver.js',
'docs/assets/js/customizer.js'
],
dest: 'docs/assets/js/customize.js'
dest: 'docs/assets/js/customize.min.js'
}
},
......@@ -208,7 +217,7 @@ module.exports = function (grunt) {
cwd: './dist',
src: [
'{css,js}/*.min.*',
'{css}/*.map',
'css/*.map',
'fonts/*'
],
dest: 'docs/dist'
......@@ -235,6 +244,23 @@ module.exports = function (grunt) {
docs: {}
},
jade: {
compile: {
options: {
pretty: true,
data: function () {
var filePath = path.join(__dirname, 'less/variables.less');
var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
var parser = new BsLessdocParser(fileContent);
return {sections: parser.parseFile()};
}
},
files: {
'docs/_includes/customizer-variables.html': 'docs/customizer-variables.jade'
}
}
},
validation: {
options: {
charset: 'utf-8',
......@@ -300,7 +326,7 @@ module.exports = function (grunt) {
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']);
testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-vars-form']);
}
// Skip HTML validation if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') {
......@@ -335,46 +361,10 @@ module.exports = function (grunt) {
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', ['sed']);
grunt.registerTask('build-glyphicons-data', function () {
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// buffer
var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8')
var glpyhiconsLines = glyphiconsFile.split('\n')
// Use any line that starts with ".glyphicon-" and capture the class name
var iconClassName = /^\.(glyphicon-[^\s]+)/
var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.** \n' +
'# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
for (var i = 0, len = glpyhiconsLines.length; i < len; i++) {
var match = glpyhiconsLines[i].match(iconClassName)
if (match != null) {
glyphiconsData += '- ' + match[1] + '\n'
}
}
// Create the `_data` directory if it doesn't already exist
if (!fs.existsSync('docs/_data')) fs.mkdirSync('docs/_data')
fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData)
});
grunt.registerTask('build-glyphicons-data', generateGlyphiconsData);
// task for building customizer
grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () {
function getFiles(type) {
var files = {}
fs.readdirSync(type)
.filter(function (path) {
return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
var fullPath = type + '/' + path
return files[path] = (type == 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'))
})
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
}
var files = getFiles('js') + getFiles('less') + getFiles('fonts')
fs.writeFileSync('docs/assets/js/raw-files.js', files)
});
grunt.registerTask('build-customizer', ['build-customizer-vars-form', 'build-raw-files']);
grunt.registerTask('build-customizer-vars-form', ['jade']);
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', generateRawFilesJs);
};
The MIT License (MIT)
Copyright (c) 2014 Twitter, Inc
Copyright (c) 2011-2014 Twitter, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -54,7 +54,7 @@ We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified
## Bugs and feature requests
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
## Documentation
......@@ -88,7 +88,7 @@ Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working
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](package.json) and automatically install the necessary local dependencies listed there.
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.
......@@ -120,7 +120,7 @@ Please read through our [contributing guidelines](https://github.com/twbs/bootst
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
Editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
......@@ -170,4 +170,4 @@ For more information on SemVer, please visit <http://semver.org/>.
## Copyright and license
Copyright 2013 Twitter, Inc under [the MIT license](LICENSE).
Copyright 2011-2014 Twitter, Inc. under [the MIT license](LICENSE).
......@@ -11,13 +11,11 @@
],
"ignore": [
"**/.*",
"*.html",
"_*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs-assets",
"examples",
"docs",
"js/tests"
],
"dependencies": {
......
/*!
* Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
......@@ -89,6 +89,24 @@
background-color: #419641;
border-color: #3e8f3e;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
......@@ -125,24 +143,6 @@
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
......
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
......@@ -10,12 +10,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: transition.js v3.0.3
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
......@@ -58,12 +59,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: alert.js v3.0.3
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// ALERT CLASS DEFINITION
// ======================
......@@ -146,12 +148,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: button.js v3.0.3
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
......@@ -253,12 +256,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: carousel.js v3.0.3
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
......@@ -458,12 +462,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: collapse.js v3.0.3
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
......@@ -627,12 +632,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: dropdown.js v3.0.3
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
......@@ -774,12 +780,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: modal.js v3.0.3
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// MODAL CLASS DEFINITION
// ======================
......@@ -1018,12 +1025,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
......@@ -1226,7 +1234,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
jQuery.offset.setOffset($tip[0], $.extend({
$.offset.setOffset($tip[0], $.extend({
using: function (props) {
$tip.css({
top: Math.round(props.top),
......@@ -1416,12 +1424,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: popover.js v3.0.3
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
......@@ -1526,12 +1535,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: scrollspy.js v3.0.3
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
......@@ -1679,12 +1689,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: tab.js v3.0.3
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
......@@ -1804,12 +1815,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* Bootstrap: affix.js v3.0.3
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// AFFIX CLASS DEFINITION
// ======================
......
This diff is collapsed.
This diff is collapsed.
......@@ -36,7 +36,7 @@
{% if page.slug == "customize" %}
<script src="{{ site.baseurl }}assets/js/raw-files.js"></script>
<script src="{{ site.baseurl }}assets/js/customize.js"></script>
<script src="{{ site.baseurl }}assets/js/customize.min.js"></script>
{% endif %}
{% comment %}
......
/*csslint ids: false, overqualified-elements: false*/
/*!
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
......@@ -1255,6 +1256,13 @@ h1[id] {
font-weight: normal;
}
.bs-customizer-input {
float: left;
width: 33.333333%;
padding-left: 15px;
padding-right: 15px;
}
/* Downloads */
.bs-customize-download .btn-outline {
padding: 20px;
......@@ -1379,6 +1387,7 @@ h1[id] {
/* Pseudo :focus state for showing how it looks in the docs */
#focusedInput {
border-color: rgb(204,204,204); /* Restate unfocused value to make CSSLint happy that there's a pre-CSS3 fallback*/
border-color: rgba(82,168,236,.8);
outline: 0;
outline: thin dotted \9; /* IE6-9 */
......
......@@ -3,7 +3,7 @@
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
......@@ -10,7 +10,7 @@
window.onload = function () { // wait for load in a dumb way because B-0
var cw = '/*!\n' +
' * Bootstrap v3.0.3 (http://getbootstrap.com)\n' +
' * Copyright 2013 Twitter, Inc.\n' +
' * Copyright 2011-2014 Twitter, Inc.\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n\n';
......@@ -173,20 +173,55 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
}
// Returns an Array of @import'd filenames from 'bootstrap.less' in the order
// Returns an Array of @import'd filenames in the order
// in which they appear in the file.
function bootstrapLessFilenames() {
function includedLessFilenames(lessFilename) {
var IMPORT_REGEX = /^@import \"(.*?)\";$/
var bootstrapLessLines = __less['bootstrap.less'].split('\n')
var lessLines = __less[lessFilename].split('\n')
for (var i = 0, imports = []; i < bootstrapLessLines.length; i++) {
var match = IMPORT_REGEX.exec(bootstrapLessLines[i])
for (var i = 0, imports = []; i < lessLines.length; i++) {
var match = IMPORT_REGEX.exec(lessLines[i])
if (match) imports.push(match[1])
}
return imports
}
function generateLESS(lessFilename, lessFileIncludes, vars) {
var lessSource = __less[lessFilename]
$.each(includedLessFilenames(lessFilename), function(index, filename) {
var fileInclude = lessFileIncludes[filename]
// Files not explicitly unchecked are compiled into the final stylesheet.
// Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'.
if (fileInclude || (fileInclude == null)) lessSource += __less[filename]
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
if (('variables.less' === filename) && vars) lessSource += generateCustomCSS(vars)
})
lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports
return lessSource
}
function compileLESS(lessSource, baseFilename, intoResult) {
var parser = new less.Parser({
paths: ['variables.less', 'mixins.less'],
optimization: 0,
filename: baseFilename + '.css'
}).parse(lessSource, function (err, tree) {
if (err) {
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
}
intoResult[baseFilename + '.css'] = cw + tree.toCSS()
intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
})
}
function generateCSS() {
var oneChecked = false
var lessFileIncludes = {}
......@@ -202,43 +237,18 @@ window.onload = function () { // wait for load in a dumb way because B-0
var result = {}
var vars = {}
var css = ''
$('#less-variables-section input')
.each(function () {
$(this).val() && (vars[$(this).prev().text()] = $(this).val())
})
$.each(bootstrapLessFilenames(), function(index, filename) {
var fileInclude = lessFileIncludes[filename]
// Files not explicitly unchecked are compiled into the final stylesheet.
// Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'.
if (fileInclude || (fileInclude == null)) css += __less[filename]
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
if (('variables.less' === filename) && vars) css += generateCustomCSS(vars)
})
css = css.replace(/@import[^\n]*/gi, '') //strip any imports
var bsLessSource = generateLESS('bootstrap.less', lessFileIncludes, vars)
var themeLessSource = generateLESS('theme.less', lessFileIncludes, vars)
try {
var parser = new less.Parser({
paths: ['variables.less', 'mixins.less'],
optimization: 0,
filename: 'bootstrap.css'
}).parse(css, function (err, tree) {
if (err) {
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
}
result = {
'bootstrap.css' : cw + tree.toCSS(),
'bootstrap.min.css' : cw + tree.toCSS({ compress: true })
}
})
compileLESS(bsLessSource, 'bootstrap', result)
compileLESS(themeLessSource, 'bootstrap-theme', result)
} catch (err) {
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
}
......
......@@ -2,7 +2,7 @@
// IT'S JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2013 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
......
This diff is collapsed.
......@@ -2616,17 +2616,17 @@ body { padding-bottom: 70px; }
<div class="col-sm-6">
<ul class="list-group">
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
<li class="list-group-item list-group-item-warning">Porta ac consectetur ac</li>
<li class="list-group-item list-group-item-danger">Vestibulum at eros</li>
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
</ul>
</div>
<div class="col-sm-6">
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
<a href="#" class="list-group-item list-group-item-warning">Porta ac consectetur ac</a>
<a href="#" class="list-group-item list-group-item-danger">Vestibulum at eros</a>
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
</div>
</div>
</div>
......@@ -2634,15 +2634,15 @@ body { padding-bottom: 70px; }
{% highlight html %}
<ul class="list-group">
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
<li class="list-group-item list-group-item-warning">Porta ac consectetur ac</li>
<li class="list-group-item list-group-item-danger">Vestibulum at eros</li>
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
</ul>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
<a href="#" class="list-group-item list-group-item-warning">Porta ac consectetur ac</a>
<a href="#" class="list-group-item list-group-item-danger">Vestibulum at eros</a>
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
</div>
{% endhighlight %}
......
......@@ -1314,21 +1314,21 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</tr>
<tr>
<td>
<code>.warning</code>
<code>.info</code>
</td>
<td>Indicates a warning that might need attention</td>
<td>Indicates a neutral informative change or action</td>
</tr>
<tr>
<td>
<code>.danger</code>
<code>.warning</code>
</td>
<td>Indicates a dangerous or potentially negative action</td>
<td>Indicates a warning that might need attention</td>
</tr>
<tr>
<td>
<code>.info</code>
<code>.danger</code>
</td>
<td>Indicates a neutral informative change or action</td>
<td>Indicates a dangerous or potentially negative action</td>
</tr>
</tbody>
</table>
......@@ -1368,7 +1368,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<td>Column content</td>
<td>Column content</td>
</tr>
<tr class="warning">
<tr class="info">
<td>5</td>
<td>Column content</td>
<td>Column content</td>
......@@ -1380,7 +1380,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<td>Column content</td>
<td>Column content</td>
</tr>
<tr class="danger">
<tr class="warning">
<td>7</td>
<td>Column content</td>
<td>Column content</td>
......@@ -1392,7 +1392,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<td>Column content</td>
<td>Column content</td>
</tr>
<tr class="info">
<tr class="danger">
<td>9</td>
<td>Column content</td>
<td>Column content</td>
......@@ -2854,17 +2854,17 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="color-swatches">
<div class="color-swatch brand-primary"></div>
<div class="color-swatch brand-success"></div>
<div class="color-swatch brand-info"></div>
<div class="color-swatch brand-warning"></div>
<div class="color-swatch brand-danger"></div>
<div class="color-swatch brand-info"></div>
</div>
</div>
{% highlight css %}
@brand-primary: #428bca;
@brand-success: #5cb85c;
@brand-info: #5bc0de;
@brand-warning: #f0ad4e;
@brand-danger: #d9534f;
@brand-info: #5bc0de;
{% endhighlight %}
<p>Use any of these color variables as they are or reassign them to more meaningful variables for your project.</p>
......@@ -2989,7 +2989,7 @@ a {
{% endhighlight %}
<h3 id="less-mixins-rounded-corners">Rounded corners</h3>
<p>Today all modern browsers support the non-prefixed <code>border-radius</code> property. As such, there is no <code>.border-radius()</code> mixin, but Preboot does include shortcuts for quickly rounding two corners on a particular side of an object.</p>
<p>Today all modern browsers support the non-prefixed <code>border-radius</code> property. As such, there is no <code>.border-radius()</code> mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.</p>
{% highlight css %}
.border-top-radius(@radius) {
border-top-right-radius: @radius;
......@@ -3284,7 +3284,7 @@ a {
{% endhighlight %}
<h3 id="less-mixins-retina-images">Retina images</h3>
<p>Specify two image paths and the @1x image dimensions, and Preboot will provide an @2x media query. <strong>If you have many images to serve, consider writing your retina image CSS manually in a single media query.</strong></p>
<p>Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. <strong>If you have many images to serve, consider writing your retina image CSS manually in a single media query.</strong></p>
{% highlight css %}
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
......
This diff is collapsed.
// NOTE: DO NOT EDIT THE FOLLOWING SECTION DIRECTLY! It is autogenerated via the `build-customizer-vars-form` Grunt task using the customizer-variables.jade template.
each section in sections
if section.customizable
h2(id=section.id)= section.heading
if section.docstring
p!= section.docstring.html
each subsection in section.subsections
if subsection.heading
h3(id=subsection.id)= subsection.heading
div.row
each variable in subsection.variables
div.bs-customizer-input
label(for="input-" + variable.name)= variable.name
input.form-control(
id="input-" + variable.name
type="text"
value=variable.defaultValue
data-var=variable.name)
if variable.docstring
p.help-block!= variable.docstring.html
// NOTE: DO NOT EDIT THE PRECEDING SECTION DIRECTLY! It is autogenerated via the `build-customizer-vars-form` Grunt task using the customizer-variables.jade template.
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff is collapsed.
......@@ -53,7 +53,7 @@
<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 class="blog-post-meta">January 1, 2014 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>
......@@ -86,7 +86,7 @@
<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 class="blog-post-meta">December 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>
......@@ -98,7 +98,7 @@
<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 class="blog-post-meta">December 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>
......@@ -125,6 +125,7 @@
<div class="sidebar-module">
<h4>Archives</h4>
<ol class="list-unstyled">
<li><a href="#">January 2014</a></li>
<li><a href="#">December 2013</a></li>
<li><a href="#">November 2013</a></li>
<li><a href="#">October 2013</a></li>
......@@ -136,7 +137,6 @@
<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">
......
......@@ -190,7 +190,7 @@
<!-- FOOTER -->
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
<p>&copy; 2013 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
<p>&copy; 2014 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
</div><!-- /.container -->
......
......@@ -69,7 +69,7 @@
</div>
<div class="footer">
<p>&copy; Company 2013</p>
<p>&copy; Company 2014</p>
</div>
</div> <!-- /container -->
......
......@@ -85,7 +85,7 @@
<hr>
<footer>
<p>&copy; Company 2013</p>
<p>&copy; Company 2014</p>
</footer>
</div> <!-- /container -->
......
......@@ -71,7 +71,7 @@
<!-- Site footer -->
<div class="footer">
<p>&copy; Company 2013</p>
<p>&copy; Company 2014</p>
</div>
</div> <!-- /container -->
......
......@@ -113,7 +113,7 @@
<hr>
<footer>
<p>&copy; Company 2013</p>
<p>&copy; Company 2014</p>
</footer>
</div><!--/.container-->
......
......@@ -446,6 +446,10 @@ bootstrap/
<td><code>.input-large</code></td>
<td><code>.input-lg</code></td>
</tr>
<tr>
<td><code>.input-block-level</code></td>
<td><code>.form-control</code></td>
</tr>
<tr>
<td><code>.control-group</code></td>
<td><code>.form-group</code></td>
......@@ -673,6 +677,11 @@ bootstrap/
<td><code>.control-group.info</code></td>
<td class="text-muted">N/A</td>
</tr>
<tr>
<td>Block level from input</td>
<td><code>.input-block-level</code></td>
<td>No direct equivalent, but <a href="../css/#forms-controls">forms controls</a> are similar.</td>
</tr>
<tr>
<td>Fluid container</td>
<td><code>.container-fluid</code></td>
......
/* jshint node: true */
var fs = require('fs')
module.exports = function generateGlyphiconsData() {
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// buffer
var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8')
var glpyhiconsLines = glyphiconsFile.split('\n')
// Use any line that starts with ".glyphicon-" and capture the class name
var iconClassName = /^\.(glyphicon-[^\s]+)/
var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.** \n' +
'# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
for (var i = 0, len = glpyhiconsLines.length; i < len; i++) {
var match = glpyhiconsLines[i].match(iconClassName)
if (match != null) {
glyphiconsData += '- ' + match[1] + '\n'
}
}
// Create the `_data` directory if it doesn't already exist
if (!fs.existsSync('docs/_data')) fs.mkdirSync('docs/_data')
fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData)
}
/* jshint node: true */
var markdown = require('markdown').markdown;
function markdown2html(markdownString) {
// the slice removes the <p>...</p> wrapper output by Markdown processor
return markdown.toHTML(markdownString.trim()).slice(3, -4);
}
/*
Mini-language:
//== This is a normal heading, which starts a section. Sections group variables together.
//## Optional description for the heading
//** Optional description for the following variable. You **can** use Markdown in descriptions to discuss `<html>` stuff.
@foo: #ffff;
//-- This is a heading for a section whose variables shouldn't be customizable
All other lines are ignored completely.
*/
var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
var SECTION_DOCSTRING = /^[/]{2}#{2}(.*)$/;
var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]+);[ ]*$/;
var VAR_DOCSTRING = /^[/]{2}[*]{2}(.*)$/;
function Section(heading, customizable) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.customizable = customizable;
this.docstring = null;
this.subsections = [];
}
Section.prototype.addSubSection = function (subsection) {
this.subsections.push(subsection);
}
function SubSection(heading) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.variables = [];
}
SubSection.prototype.addVar = function (variable) {
this.variables.push(variable);
};
function VarDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function SectionDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function Variable(name, defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
this.docstring = null;
}
function Tokenizer(fileContent) {
this._lines = fileContent.split('\n');
this._next = undefined;
}
Tokenizer.prototype.unshift = function (token) {
if (this._next !== undefined) {
throw new Error('Attempted to unshift twice!');
}
this._next = token;
};
Tokenizer.prototype._shift = function () {
// returning null signals EOF
// returning undefined means the line was ignored
if (this._next !== undefined) {
var result = this._next;
this._next = undefined;
return result;
}
if (this._lines.length <= 0) {
return null;
}
var line = this._lines.shift();
var match = null;
match = SUBSECTION_HEADING.exec(line);
if (match !== null) {
return new SubSection(match[1]);
}
match = CUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], true);
}
match = UNCUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], false);
}
match = SECTION_DOCSTRING.exec(line);
if (match !== null) {
return new SectionDocstring(match[1]);
}
match = VAR_DOCSTRING.exec(line);
if (match !== null) {
return new VarDocstring(match[1]);
}
var commentStart = line.lastIndexOf('//');
var varLine = (commentStart === -1) ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) {
return new Variable(match[1], match[2]);
}
return undefined;
};
Tokenizer.prototype.shift = function () {
while (true) {
var result = this._shift();
if (result === undefined) {
continue;
}
return result;
}
};
function Parser(fileContent) {
this._tokenizer = new Tokenizer(fileContent);
}
Parser.prototype.parseFile = function () {
var sections = [];
while (true) {
var section = this.parseSection();
if (section === null) {
if (this._tokenizer.shift() !== null) {
throw new Error('Unexpected unparsed section of file remains!');
}
return sections;
}
sections.push(section);
}
};
Parser.prototype.parseSection = function () {
var section = this._tokenizer.shift();
if (section === null) {
return null;
}
if (!(section instanceof Section)) {
throw new Error('Expected section heading; got: ' + JSON.stringify(section));
}
var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) {
section.docstring = docstring;
}
else {
this._tokenizer.unshift(docstring);
}
this.parseSubSections(section);
return section;
};
Parser.prototype.parseSubSections = function (section) {
while (true) {
var subsection = this.parseSubSection();
if (subsection === null) {
if (section.subsections.length === 0) {
// Presume an implicit initial subsection
subsection = new SubSection('');
this.parseVars(subsection);
}
else {
break;
}
}
section.addSubSection(subsection);
}
if (section.subsections.length === 1 && !(section.subsections[0].heading) && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection
section.subsections = [];
}
};
Parser.prototype.parseSubSection = function () {
var subsection = this._tokenizer.shift();
if (subsection instanceof SubSection) {
this.parseVars(subsection);
return subsection;
}
this._tokenizer.unshift(subsection);
return null;
};
Parser.prototype.parseVars = function (subsection) {
while (true) {
var variable = this.parseVar();
if (variable === null) {
return;
}
subsection.addVar(variable);
}
};
Parser.prototype.parseVar = function () {
var docstring = this._tokenizer.shift();
if (!(docstring instanceof VarDocstring)) {
this._tokenizer.unshift(docstring);
docstring = null;
}
var variable = this._tokenizer.shift();
if (variable instanceof Variable) {
variable.docstring = docstring;
return variable;
}
this._tokenizer.unshift(variable);
return null;
};
module.exports = Parser;
/* jshint node: true */
var btoa = require('btoa') // jshint ignore:line
var fs = require('fs')
function getFiles(type) {
var files = {}
fs.readdirSync(type)
.filter(function (path) {
return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
var fullPath = type + '/' + path
return files[path] = (type == 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'))
})
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
}
module.exports = function generateRawFilesJs() {
var files = getFiles('js') + getFiles('less') + getFiles('fonts')
fs.writeFileSync('docs/assets/js/raw-files.js', files)
}
......@@ -3,7 +3,7 @@
"requireLeftStickedOperators": [","],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireLineFeedAtFileEnd": true,
"requireRightStickedOperators": ["!"],
......
......@@ -2,12 +2,13 @@
* Bootstrap: affix.js v3.0.3
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// AFFIX CLASS DEFINITION
// ======================
......
......@@ -2,12 +2,13 @@
* Bootstrap: alert.js v3.0.3
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// ALERT CLASS DEFINITION
// ======================
......
......@@ -2,12 +2,13 @@
* Bootstrap: button.js v3.0.3
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
......
......@@ -2,12 +2,13 @@
* Bootstrap: carousel.js v3.0.3
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
......
......@@ -2,12 +2,13 @@
* Bootstrap: collapse.js v3.0.3
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
......
......@@ -2,12 +2,13 @@
* Bootstrap: dropdown.js v3.0.3
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
......
......@@ -2,12 +2,13 @@
* Bootstrap: modal.js v3.0.3
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// MODAL CLASS DEFINITION
// ======================
......
......@@ -2,12 +2,13 @@
* Bootstrap: popover.js v3.0.3
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
......
......@@ -2,12 +2,13 @@
* Bootstrap: scrollspy.js v3.0.3
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
......
......@@ -2,12 +2,13 @@
* Bootstrap: tab.js v3.0.3
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
......
......@@ -3,12 +3,13 @@
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
......
......@@ -2,12 +2,13 @@
* Bootstrap: transition.js v3.0.3
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2014 Twitter, Inc.
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) { 'use strict';
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
......
......@@ -11,6 +11,7 @@
"outline-none": false,
"qualified-headings": false,
"regex-selectors": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
......
......@@ -60,6 +60,10 @@
.btn-success {
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}
// Warning appears as orange
.btn-warning {
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
......@@ -68,10 +72,6 @@
.btn-danger {
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
// Info appears as blue-green
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}
// Link buttons
......
......@@ -52,6 +52,12 @@ input[type="file"] {
display: block;
}
// Make range inputs behave like textual form controls
input[type="range"] {
display: block;
width: 100%;
}
// Make multiple select elements height not fixed
select[multiple],
select[size] {
......@@ -276,15 +282,15 @@ input[type="checkbox"],
}
// Feedback states
.has-success {
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
}
.has-warning {
.form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
}
.has-error {
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
}
.has-success {
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
}
// Static form control text
......
......@@ -14,7 +14,7 @@
src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')",
~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')",
~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')",
~"url('@{icon-font-path}@{icon-font-name}.svg#glyphicons-halflingsregular') format('svg')";
~"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')";
}
// Catchall baseclass
......
......@@ -91,9 +91,9 @@ a.list-group-item {
// Organizationally, this must come after the `:hover` states.
.list-group-item-variant(success; @state-success-bg; @state-success-text);
.list-group-item-variant(info; @state-info-bg; @state-info-text);
.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
.list-group-item-variant(info; @state-info-bg; @state-info-text);
// Custom content options
......
......@@ -851,7 +851,7 @@
border-color: @border-color;
background-color: @background-color;
}
// Optional feedack icon
// Optional feedback icon
.form-control-feedback {
color: @text-color;
}
......
......@@ -59,7 +59,7 @@
> .table,
> .table-responsive > .table {
margin-bottom: 0;
> tbody:last-child,
> tfoot:last-child {
> tr:last-child {
......@@ -185,12 +185,12 @@
.panel-success {
.panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
}
.panel-info {
.panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
}
.panel-warning {
.panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
}
.panel-danger {
.panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
}
.panel-info {
.panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
}
......@@ -157,9 +157,9 @@ table {
// Generate the contextual variants
.table-row-variant(active; @table-bg-active);
.table-row-variant(success; @state-success-bg);
.table-row-variant(info; @state-info-bg);
.table-row-variant(warning; @state-warning-bg);
.table-row-variant(danger; @state-danger-bg);
.table-row-variant(info; @state-info-bg);
// Responsive tables
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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