[go: nahoru, domu]

Skip to content

Commit

Permalink
Upgrade from Bootstrap v5.2.0 to v5.2.2 (#455)
Browse files Browse the repository at this point in the history
* Close #453. Upgrade from Bootstrap v5.2.0 to v5.2.2

* Add patch for bootswatch sketchy's use of rgb() without commas (which LibSass doesn't support)
  • Loading branch information
cpsievert committed Oct 24, 2022
1 parent d15909c commit 0906a9f
Show file tree
Hide file tree
Showing 80 changed files with 383 additions and 183 deletions.
2 changes: 1 addition & 1 deletion R/versions.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT
# This file is auto-generated by tools/yarn_install.R
version_bs5 <- "5.2.0"
version_bs5 <- "5.2.2"
version_bs4 <- "4.6.0"
version_bs3 <- "3.4.1"
version_accessibility <- "1.0.6"
4 changes: 2 additions & 2 deletions inst/css-precompiled/5/bootstrap.min.css

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions inst/lib/bs5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,18 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`

Several quick start options are available:

- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.0.zip)
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.2.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.2.0`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.2.0`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.0`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.2.2`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.2.2`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.2`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`

Read the [Getting started page](https://getbootstrap.com/docs/5.2/getting-started/introduction/) for information on the framework contents, templates, examples, and more.


## Status

[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
[![Build Status](https://img.shields.io/github/workflow/status/twbs/bootstrap/JS%20Tests/main?label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
[![npm version](https://img.shields.io/npm/v/bootstrap)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap)](https://rubygems.org/gems/bootstrap)
Expand Down Expand Up @@ -138,14 +137,14 @@ 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/main/.github/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/main/.github/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/choose).


## Documentation

Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.

Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
Documentation search is powered by [Algolia's DocSearch](https://docsearch.algolia.com/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.

### Running documentation locally

Expand Down Expand Up @@ -178,7 +177,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and

- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- Ask and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
Expand Down
4 changes: 2 additions & 2 deletions inst/lib/bs5/dist/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/lib/bs5/dist/js/bootstrap.bundle.min.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions inst/lib/bs5/package.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": "5.2.0",
"version": "5.2.2",
"config": {
"version_short": "5.2"
},
Expand Down Expand Up @@ -53,7 +53,7 @@
"js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
"js-compile-plugins": "node build/build-plugins.js",
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js .",
"js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
"js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.esm.js.map,includeSources,url=bootstrap.esm.min.js.map\" --output dist/js/bootstrap.esm.min.js dist/js/bootstrap.esm.js",
Expand Down Expand Up @@ -91,7 +91,7 @@
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\""
},
"peerDependencies": {
"@popperjs/core": "^2.11.5"
"@popperjs/core": "^2.11.6"
},
"files": ["dist/{css,js}/*.{css,js,map}", "js/{src,dist}/**/*.{js,map}", "scss/**/*.scss"],
"hugo-bin": {
Expand All @@ -110,7 +110,7 @@
},
"dependencies": {},
"peerDependencies": {
"@popperjs/core": "^2.11.5"
"@popperjs/core": "^2.11.6"
}
}
}
11 changes: 7 additions & 4 deletions inst/lib/bs5/scss/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.accordion {
// scss-docs-start accordion-css-vars
--#{$prefix}accordion-color: #{color-contrast($accordion-bg)};
--#{$prefix}accordion-color: #{$accordion-color};
--#{$prefix}accordion-bg: #{$accordion-bg};
--#{$prefix}accordion-transition: #{$accordion-transition};
--#{$prefix}accordion-border-color: #{$accordion-border-color};
Expand All @@ -13,7 +13,7 @@
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
--#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
--#{$prefix}accordion-btn-color: #{$accordion-color};
--#{$prefix}accordion-btn-color: #{$accordion-button-color};
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
Expand Down Expand Up @@ -49,7 +49,7 @@
&:not(.collapsed) {
color: var(--#{$prefix}accordion-active-color);
background-color: var(--#{$prefix}accordion-active-bg);
box-shadow: inset 0 calc(var(--#{$prefix}accordion-border-width) * -1) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list

&::after {
background-image: var(--#{$prefix}accordion-btn-active-icon);
Expand Down Expand Up @@ -143,7 +143,10 @@
&:last-child { border-bottom: 0; }

.accordion-button {
@include border-radius(0);
&,
&.collapsed {
@include border-radius(0);
}
}
}
}
2 changes: 1 addition & 1 deletion inst/lib/bs5/scss/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@include border-radius($btn-border-radius);

// Prevent double borders when buttons are next to each other
> .btn:not(:first-child),
> :not(.btn-check:first-child) + .btn,
> .btn-group:not(:first-child) {
margin-left: -$btn-border-width;
}
Expand Down
35 changes: 28 additions & 7 deletions inst/lib/bs5/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
--#{$prefix}btn-border-width: #{$btn-border-width};
--#{$prefix}btn-border-color: transparent;
--#{$prefix}btn-border-radius: #{$btn-border-radius};
--#{$prefix}btn-hover-border-color: transparent;
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
--#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
Expand Down Expand Up @@ -58,8 +59,14 @@
border-color: var(--#{$prefix}btn-hover-border-color);
}

.btn-check:focus + &,
&:focus {
.btn-check + &:hover {
// override for the checkbox/radio buttons
color: var(--#{$prefix}btn-color);
background-color: var(--#{$prefix}btn-bg);
border-color: var(--#{$prefix}btn-border-color);
}

&:focus-visible {
color: var(--#{$prefix}btn-hover-color);
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
border-color: var(--#{$prefix}btn-hover-border-color);
Expand All @@ -72,9 +79,20 @@
}
}

.btn-check:focus-visible + & {
border-color: var(--#{$prefix}btn-hover-border-color);
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
} @else {
box-shadow: var(--#{$prefix}btn-focus-box-shadow);
}
}

.btn-check:checked + &,
.btn-check:active + &,
&:active,
:not(.btn-check) + &:active,
&:first-child:active,
&.active,
&.show {
color: var(--#{$prefix}btn-active-color);
Expand All @@ -84,7 +102,7 @@
border-color: var(--#{$prefix}btn-active-border-color);
@include box-shadow(var(--#{$prefix}btn-active-shadow));

&:focus {
&:focus-visible {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
Expand Down Expand Up @@ -171,17 +189,20 @@
-moz-text-decoration: $link-decoration;
-ms-text-decoration: $link-decoration;
-o-text-decoration: $link-decoration;
@if $enable-gradients {
background-image: none;
}

&:hover,
&:focus {
&:focus-visible {
text-decoration: $link-hover-decoration;
-webkit-text-decoration: $link-hover-decoration;
-moz-text-decoration: $link-hover-decoration;
-ms-text-decoration: $link-hover-decoration;
-o-text-decoration: $link-hover-decoration;
}

&:focus {
&:focus-visible {
color: var(--#{$prefix}btn-color);
}

Expand Down
3 changes: 2 additions & 1 deletion inst/lib/bs5/scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// The dropdown menu
.dropdown-menu {
// scss-docs-start dropdown-css-vars
--#{$prefix}dropdown-zindex: #{$zindex-dropdown};
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
Expand Down Expand Up @@ -46,7 +47,7 @@
// scss-docs-end dropdown-css-vars

position: absolute;
z-index: $zindex-dropdown;
z-index: var(--#{$prefix}dropdown-zindex);
display: none; // none by default, but block on "open" of the menu
min-width: var(--#{$prefix}dropdown-min-width);
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
Expand Down
2 changes: 1 addition & 1 deletion inst/lib/bs5/scss/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
// Replace `$search` with `$replace` in `$string`
// Used on our SVG icon backgrounds for custom forms.
//
// @author Hugo Giraudel
// @author Kitty Giraudel
// @param {String} $string - Initial string
// @param {String} $search - Substring to replace
// @param {String} $replace ('') - New value
Expand Down
11 changes: 6 additions & 5 deletions inst/lib/bs5/scss/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@
border-color: var(--#{$prefix}list-group-active-border-color);
}

& + & {
// stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
& + .list-group-item {
border-top-width: 0;

&.active {
margin-top: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-top-width: var(--#{$prefix}list-group-border-width);
}
}
Expand All @@ -133,12 +134,12 @@
-webkit-flex-direction: row;

> .list-group-item {
&:first-child {
&:first-child:not(:last-child) {
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
@include border-top-end-radius(0);
}

&:last-child {
&:last-child:not(:first-child) {
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
@include border-bottom-start-radius(0);
}
Expand All @@ -152,7 +153,7 @@
border-left-width: 0;

&.active {
margin-left: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-left-width: var(--#{$prefix}list-group-border-width);
}
}
Expand Down
2 changes: 1 addition & 1 deletion inst/lib/bs5/scss/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

.btn-close {
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
margin: calc(var(--#{$prefix}modal-header-padding-y) * -.5) calc(var(--#{$prefix}modal-header-padding-x) * -.5) calc(var(--#{$prefix}modal-header-padding-y) * -.5) auto;
margin: calc(-.5 * var(--#{$prefix}modal-header-padding-y)) calc(-.5 * var(--#{$prefix}modal-header-padding-x)) calc(-.5 * var(--#{$prefix}modal-header-padding-y)) auto;
}
}

Expand Down
4 changes: 2 additions & 2 deletions inst/lib/bs5/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);

.nav-link {
margin-bottom: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
background: none;
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
Expand Down Expand Up @@ -101,7 +101,7 @@

.dropdown-menu {
// Make dropdown border overlap tab border
margin-top: calc(var(--#{$prefix}nav-tabs-border-width) * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
// Remove the top rounded corners here since there is a hard edge above the menu
@include border-top-radius(0);
}
Expand Down
2 changes: 2 additions & 0 deletions inst/lib/bs5/scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@

.navbar-dark {
background-color: $navbar-dark-bg; // not !important so .bg-* utilities can still override
// scss-docs-start navbar-dark-css-vars
--#{$prefix}navbar-color: #{$navbar-dark-color};
--#{$prefix}navbar-hover-color: #{$navbar-dark-hover-color};
--#{$prefix}navbar-disabled-color: #{$navbar-dark-disabled-color};
Expand All @@ -305,4 +306,5 @@
--#{$prefix}navbar-brand-hover-color: #{$navbar-dark-brand-hover-color};
--#{$prefix}navbar-toggler-border-color: #{$navbar-dark-toggler-border-color};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
// scss-docs-end navbar-dark-css-vars
}
9 changes: 5 additions & 4 deletions inst/lib/bs5/scss/_offcanvas.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

%offcanvas-css-vars {
// scss-docs-start offcanvas-css-vars
--#{$prefix}offcanvas-zindex: #{$zindex-offcanvas};
--#{$prefix}offcanvas-width: #{$offcanvas-horizontal-width};
--#{$prefix}offcanvas-height: #{$offcanvas-vertical-height};
--#{$prefix}offcanvas-padding-x: #{$offcanvas-padding-x};
Expand Down Expand Up @@ -31,7 +32,7 @@
@include media-breakpoint-down($next) {
position: fixed;
bottom: 0;
z-index: $zindex-offcanvas;
z-index: var(--#{$prefix}offcanvas-zindex);
display: flex;
display: -webkit-flex;
flex-direction: column;
Expand Down Expand Up @@ -132,9 +133,9 @@

.btn-close {
padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
margin-top: calc(var(--#{$prefix}offcanvas-padding-y) * -.5);
margin-right: calc(var(--#{$prefix}offcanvas-padding-x) * -.5);
margin-bottom: calc(var(--#{$prefix}offcanvas-padding-y) * -.5);
margin-top: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
margin-right: calc(-.5 * var(--#{$prefix}offcanvas-padding-x));
margin-bottom: calc(-.5 * var(--#{$prefix}offcanvas-padding-y));
}
}

Expand Down
2 changes: 1 addition & 1 deletion inst/lib/bs5/scss/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
margin-left: $pagination-margin-start;
}

@if $pagination-margin-start == (calc($pagination-border-width * -1)) {
@if $pagination-margin-start == ($pagination-border-width * -1) {
&:first-child {
.page-link {
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
Expand Down
Loading

0 comments on commit 0906a9f

Please sign in to comment.