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

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

parents 23e746d4 0d34169e
Showing with 3756 additions and 8616 deletions
+3756 -8616
...@@ -9,6 +9,7 @@ before_install: ...@@ -9,6 +9,7 @@ before_install:
- rvm install 2.2 - rvm install 2.2
- rvm use 2.2 --fuzzy - rvm use 2.2 --fuzzy
- export GEMDIR=$(rvm gemdir) - export GEMDIR=$(rvm gemdir)
- npm install -g npm@3
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\"" - "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 validator\]'; export TWBS_DO_VALIDATOR=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
......
...@@ -21,6 +21,23 @@ module.exports = function (grunt) { ...@@ -21,6 +21,23 @@ module.exports = function (grunt) {
var isTravis = require('is-travis'); var isTravis = require('is-travis');
var npmShrinkwrap = require('npm-shrinkwrap'); var npmShrinkwrap = require('npm-shrinkwrap');
var mq4HoverShim = require('mq4-hover-shim'); 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 generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' }); var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
...@@ -215,43 +232,30 @@ module.exports = function (grunt) { ...@@ -215,43 +232,30 @@ module.exports = function (grunt) {
}, },
postcss: { 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: { core: {
options: { options: {
map: true map: true,
processors: [
mq4HoverShim.postprocessorFor({ hoverSelectorPrefix: '.bs-true-hover ' }),
autoprefixer
]
}, },
src: 'dist/css/*.css' src: 'dist/css/*.css'
}, },
docs: { docs: {
options: {
processors: [
autoprefixer
]
},
src: 'docs/assets/css/docs.min.css' src: 'docs/assets/css/docs.min.css'
}, },
examples: { examples: {
options: {
processors: [
autoprefixer
]
},
expand: true, expand: true,
cwd: 'docs/examples/', cwd: 'docs/examples/',
src: ['**/*.css'], src: ['**/*.css'],
...@@ -474,7 +478,7 @@ module.exports = function (grunt) { ...@@ -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:extras', 'sass:docs']);
grunt.registerTask('sass-compile', ['sass:core', '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. // Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']); grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
...@@ -498,7 +502,7 @@ module.exports = function (grunt) { ...@@ -498,7 +502,7 @@ module.exports = function (grunt) {
}); });
// Docs task. // 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('docs-js', ['uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']); grunt.registerTask('lint-docs-js', ['jscs:assets']);
grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']); grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);
......
...@@ -6,11 +6,11 @@ group: content ...@@ -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>`. 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 %} {% example html %}
<figure class="figure"> <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> <figcaption class="figure-caption">A caption for the above image.</figcaption>
</figure> </figure>
{% endexample %} {% endexample %}
...@@ -19,7 +19,7 @@ Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl ...@@ -19,7 +19,7 @@ Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl
{% example html %} {% example html %}
<figure class="figure"> <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> <figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
</figure> </figure>
{% endexample %} {% endexample %}
...@@ -87,7 +87,7 @@ Bootstrap requires the use of the HTML5 doctype. Without it, you'll see some fun ...@@ -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>`. 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 %} {% 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 %} {% endhighlight %}
You can see an example of this in action in the [starter template](#starter-template). You can see an example of this in action in the [starter template](#starter-template).
......
...@@ -73,6 +73,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with ...@@ -73,6 +73,7 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with
### Forms ### Forms
- Moved element resets to the `_reboot.scss` file. - 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. - 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. - Dropped `.form-group-*` classes for simplicity's sake. Use `.form-control-*` classes instead now.
- Horizontal forms overhauled: - Horizontal forms overhauled:
...@@ -80,6 +81,10 @@ New to Bootstrap 4 is the Reboot, a new stylesheet that builds on Normalize with ...@@ -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. - `.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. - Added new `.form-control-label` class to vertically center labels with `.form-control`s.
### Buttons
- Renamed `.btn-default` to `.btn-secondary`.
### Grid system ### Grid system
- Added a new `~480px` grid breakpoint, meaning there are now five total tiers. - Added a new `~480px` grid breakpoint, meaning there are now five total tiers.
......
This diff is collapsed.
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
}, },
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"autoprefixer": "^6.0.3",
"babel-eslint": "^4.1.3", "babel-eslint": "^4.1.3",
"btoa": "~1.1.2", "btoa": "~1.1.2",
"glob": "~5.0.14", "glob": "~5.0.14",
"grunt": "~0.4.5", "grunt": "~0.4.5",
"grunt-autoprefixer": "~3.0.3",
"grunt-babel": "^5.0.3", "grunt-babel": "^5.0.3",
"grunt-build-control": "~0.6.0", "grunt-build-control": "~0.6.0",
"grunt-contrib-clean": "~0.6.0", "grunt-contrib-clean": "~0.6.0",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.alert { .alert {
padding: $alert-padding; padding: $alert-padding;
margin-bottom: $spacer-y; margin-bottom: $spacer-y;
border: 1px solid transparent; border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius); @include border-radius($alert-border-radius);
// Improve alignment and spacing of inner content // Improve alignment and spacing of inner content
......
...@@ -169,10 +169,10 @@ ...@@ -169,10 +169,10 @@
// Card image caps // Card image caps
.card-img-top { .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 { .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 @@ ...@@ -257,7 +257,7 @@
} }
&:last-child { &:last-child {
@include border-left-radius(0); @include border-left-radius(0);
.card-img-top { .card-img-top {
border-top-left-radius: 0; border-top-left-radius: 0;
} }
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
display: inline-block; display: inline-block;
width: 0; width: 0;
height: 0; height: 0;
margin-left: .25rem;
margin-right: .25rem; margin-right: .25rem;
margin-left: .25rem;
vertical-align: middle; vertical-align: middle;
content: ""; content: "";
border-top: $caret-width solid; border-top: $caret-width solid;
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
min-width: 160px; min-width: 160px;
padding: 5px 0; padding: 5px 0;
margin: 2px 0 0; // override default ul margin: 2px 0 0; // override default ul
color: $body-color;
font-size: $font-size-base; font-size: $font-size-base;
color: $body-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none; list-style: none;
background-color: $dropdown-bg; background-color: $dropdown-bg;
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
// Allow for dropdowns to go bottom up (aka, dropup-menu) // 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? // TODO: abstract this so that the navbar fixed styles are not placed here?
.dropup, .dropup,
......
...@@ -40,12 +40,11 @@ ...@@ -40,12 +40,11 @@
.figure { .figure {
// Ensures the caption's text aligns with the image. // Ensures the caption's text aligns with the image.
display: inline-block; display: inline-block;
}
> img { .figure-img {
@extend .img-fluid; margin-bottom: ($spacer-y / 2);
margin-bottom: ($spacer-y / 2); line-height: 1;
line-height: 1;
}
} }
.figure-caption { .figure-caption {
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
.nav-pills { .nav-pills {
@include clearfix(); @include clearfix();
.nav-item { .nav-item {
float: left; float: left;
......
...@@ -196,6 +196,16 @@ img { ...@@ -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 // Tables
// //
......
...@@ -526,6 +526,7 @@ $modal-sm: 300px !default; ...@@ -526,6 +526,7 @@ $modal-sm: 300px !default;
$alert-padding: 15px !default; $alert-padding: 15px !default;
$alert-border-radius: $border-radius !default; $alert-border-radius: $border-radius !default;
$alert-link-font-weight: bold !default; $alert-link-font-weight: bold !default;
$alert-border-width: $border-width !default;
$alert-success-bg: $state-success-bg !default; $alert-success-bg: $state-success-bg !default;
$alert-success-text: $state-success-text !default; $alert-success-text: $state-success-text !default;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@mixin form-control-validation($color) { @mixin form-control-validation($color) {
// Color the label and help text // Color the label and help text
.help-block, .text-help,
.form-control-label, .form-control-label,
.radio, .radio,
.checkbox, .checkbox,
......
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