Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev

This commit is contained in:
Mark Otto 2015-11-14 17:23:22 -08:00
commit 1a3acc8a4b
15 changed files with 3938 additions and 8798 deletions

View File

@ -9,6 +9,7 @@ before_install:
- rvm install 2.2
- rvm use 2.2 --fuzzy
- export GEMDIR=$(rvm gemdir)
- npm install -g npm@3
- "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

View File

@ -21,6 +21,23 @@ module.exports = function (grunt) {
var isTravis = require('is-travis');
var npmShrinkwrap = require('npm-shrinkwrap');
var mq4HoverShim = require('mq4-hover-shim');
var autoprefixer = require('autoprefixer')({
browsers: [
'Android 2.3',
'Android >= 4',
'Chrome >= 35',
'Firefox >= 31',
// Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
// NOT the Edge app version shown in Edge's "About" screen.
// For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
// See also https://github.com/Fyrd/caniuse/issues/1928
'Edge >= 12',
'Explorer >= 9',
'iOS >= 7',
'Opera >= 12',
'Safari >= 7.1'
]
});
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
@ -215,43 +232,30 @@ module.exports = function (grunt) {
},
postcss: {
options: {
map: true,
processors: [mq4HoverShim.postprocessorFor({ hoverSelectorPrefix: '.bs-true-hover ' })]
},
core: {
src: 'dist/css/*.css'
}
},
autoprefixer: {
options: {
browsers: [
'Android 2.3',
'Android >= 4',
'Chrome >= 35',
'Firefox >= 31',
// Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
// NOT the Edge app version shown in Edge's "About" screen.
// For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
// See also https://github.com/Fyrd/caniuse/issues/1928
'Edge >= 12',
'Explorer >= 9',
'iOS >= 7',
'Opera >= 12',
'Safari >= 7.1'
]
},
core: {
options: {
map: true
map: true,
processors: [
mq4HoverShim.postprocessorFor({ hoverSelectorPrefix: '.bs-true-hover ' }),
autoprefixer
]
},
src: 'dist/css/*.css'
},
docs: {
options: {
processors: [
autoprefixer
]
},
src: 'docs/assets/css/docs.min.css'
},
examples: {
options: {
processors: [
autoprefixer
]
},
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
@ -474,7 +478,7 @@ module.exports = function (grunt) {
// grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']);
grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']);
grunt.registerTask('dist-css', ['sass-compile', 'postcss:core', 'autoprefixer:core', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);
grunt.registerTask('dist-css', ['sass-compile', 'postcss:core', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);
// Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
@ -498,7 +502,7 @@ module.exports = function (grunt) {
});
// Docs task.
grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
grunt.registerTask('docs-css', ['postcss:docs', 'postcss:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
grunt.registerTask('docs-js', ['uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']);
grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);

View File

@ -6,11 +6,11 @@ group: content
Anytime you need to display a piece of content—like an image—with an optional caption, consider using a `<figure>`.
Use the included `.figure` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. As a bonus, immediate children images are automatically responsive.
Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive.
{% example html %}
<figure class="figure">
<img data-src="holder.js/400x300" class="img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
<img data-src="holder.js/400x300" class="figure-img img-fluid img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
<figcaption class="figure-caption">A caption for the above image.</figcaption>
</figure>
{% endexample %}
@ -19,7 +19,7 @@ Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl
{% example html %}
<figure class="figure">
<img data-src="holder.js/400x300" class="img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
<img data-src="holder.js/400x300" class="figure-img img-fluid img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
<figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
</figure>
{% endexample %}

View File

@ -87,7 +87,7 @@ Bootstrap requires the use of the HTML5 doctype. Without it, you'll see some fun
Bootstrap is developed *mobile first*, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, **add the responsive viewport meta tag** to your `<head>`.
{% highlight html %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% endhighlight %}
You can see an example of this in action in the [starter template](#starter-template).

View File

@ -73,6 +73,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with
### Forms
- Moved element resets to the `_reboot.scss` file.
- Renamed `.control-label` to `.form-control-label`.
- Renamed `.input-lg` and `.input-sm` to `.form-control-lg` and `.form-control-sm`, respectively.
- Dropped `.form-group-*` classes for simplicity's sake. Use `.form-control-*` classes instead now.
- Horizontal forms overhauled:
@ -80,6 +81,10 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with
- `.form-group` no longer mixins the `.row` class, so it's now required for grid layouts.
- Added new `.form-control-label` class to vertically center labels with `.form-control`s.
### Buttons
- Renamed `.btn-default` to `.btn-secondary`.
### Grid system
- Added a new `~480px` grid breakpoint, meaning there are now five total tiers.

12618
grunt/npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,11 +28,11 @@
},
"license": "MIT",
"devDependencies": {
"autoprefixer": "^6.0.3",
"babel-eslint": "^4.1.3",
"btoa": "~1.1.2",
"glob": "~5.0.14",
"grunt": "~0.4.5",
"grunt-autoprefixer": "~3.0.3",
"grunt-babel": "^5.0.3",
"grunt-build-control": "~0.6.0",
"grunt-contrib-clean": "~0.6.0",

View File

@ -5,7 +5,7 @@
.alert {
padding: $alert-padding;
margin-bottom: $spacer-y;
border: 1px solid transparent;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);
// Improve alignment and spacing of inner content

View File

@ -169,10 +169,10 @@
// Card image caps
.card-img-top {
@include border-radius(.25rem .25rem 0 0);
@include border-radius($card-border-radius-inner $card-border-radius-inner 0 0);
}
.card-img-bottom {
@include border-radius(0 0 .25rem .25rem);
@include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner);
}
@ -257,7 +257,7 @@
}
&:last-child {
@include border-left-radius(0);
.card-img-top {
border-top-left-radius: 0;
}

View File

@ -10,8 +10,8 @@
display: inline-block;
width: 0;
height: 0;
margin-left: .25rem;
margin-right: .25rem;
margin-left: .25rem;
vertical-align: middle;
content: "";
border-top: $caret-width solid;
@ -45,8 +45,8 @@
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0; // override default ul
color: $body-color;
font-size: $font-size-base;
color: $body-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none;
background-color: $dropdown-bg;
@ -172,7 +172,7 @@
// Allow for dropdowns to go bottom up (aka, dropup-menu)
//
// Just add .dropup after the standard .dropdown class and you're set, bro.
// Just add .dropup after the standard .dropdown class and you're set.
// TODO: abstract this so that the navbar fixed styles are not placed here?
.dropup,

View File

@ -40,12 +40,11 @@
.figure {
// Ensures the caption's text aligns with the image.
display: inline-block;
}
> img {
@extend .img-fluid;
margin-bottom: ($spacer-y / 2);
line-height: 1;
}
.figure-img {
margin-bottom: ($spacer-y / 2);
line-height: 1;
}
.figure-caption {

View File

@ -92,7 +92,7 @@
.nav-pills {
@include clearfix();
.nav-item {
float: left;

View File

@ -196,6 +196,16 @@ img {
}
// iOS "clickable elements" fix for role="button"
//
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
[role="button"] {
cursor: pointer;
}
//
// Tables
//

View File

@ -526,6 +526,7 @@ $modal-sm: 300px !default;
$alert-padding: 15px !default;
$alert-border-radius: $border-radius !default;
$alert-link-font-weight: bold !default;
$alert-border-width: $border-width !default;
$alert-success-bg: $state-success-bg !default;
$alert-success-text: $state-success-text !default;

View File

@ -5,7 +5,7 @@
@mixin form-control-validation($color) {
// Color the label and help text
.help-block,
.text-help,
.form-control-label,
.radio,
.checkbox,