0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

2906 Commits

Author SHA1 Message Date
Mark Otto
5d9c09ccba Add color-scheme to dark root selector 2022-12-28 13:00:36 -08:00
Patrick H. Lauke
eb4819474d
Update colour contrast formula with new constant from WCAG 2.2 (#37731)
See https://github.com/w3c/wcag/pull/1780

Closes #37022
2022-12-27 14:13:38 +00:00
Mark Dumay
98ebf3a336
Improve consistency of navbar icon declaration (#37720)
* Use $navbar-light-color instead of inline color

* Introduce separate $navbar-light-icon-color
2022-12-26 21:19:53 +02:00
XhmikosR
d891159950
Make scss tests work on Windows too. (#37713)
Also, add missing `'use strict'` statements; these aren't real modules.
2022-12-25 18:09:26 +02:00
Romaric Pascal
33ccbc23e3
SCSS testing of the utilities API (#36029)
* Set up CSS testing using sass-true and mocha

Use mocha to handle the heavy lifting of finding tests and running them.
Mocha is made to look directly for SCSS files which are compiled
thanks to Node's require.extensions mechanism.

* Add CSS tests to workflow

* Add tests for the generate-utility mixin

* Add tests for utilities generation

* Fix linting issues

* Fix test contents

Don't know why the whole utilities.test.scss ended up copied in the api.test.scss

* Remove unnecessary entry in package.json

* Move to Jasmine for running the tests

* Move running of CSS tests before CSS build

* Update linting set up

Add exceptions for test files in stylelint

* Remove irrelevant option for sass-true

* Fix linting issues after rebase

* Add color mode tests

* Fix linter

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-12-24 14:29:20 -08:00
XhmikosR
cf9454caa0
Release v5.3.0-alpha1 (#37661)
* Bump version to 5.3.0-alpha1

* Dist

* Add docs versions updates

* Update note in homepage hero

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-12-24 18:37:22 +02:00
Julien Déramond
41f62c5a11
Fix Sass compilation when $color-mode-type is set to media-query (#37687)
* Fix Sass compilation when `$color-mode-type` is set to `media-query`

* Update mixin names, fix docs color modes for using media queries by using mixin

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-12-21 08:52:07 +02:00
Mark Otto
f6687e99b5 Follow up 2022-12-20 14:25:36 -08:00
jonnysp
efce829777 Update _variables.scss 2022-12-20 12:57:29 -08:00
Julien Déramond
fd3da4eb3e Fix --bs-form-check-bg definition 2022-12-10 18:06:15 -08:00
Patrick H. Lauke
26a3ef1bcb
Rework progress bar markup and styles (#36831)
* Rework progress bar markup and styles

Logically moves the various `role` and `aria-` attributes to the `.progress` element itself, leaving the `.progress-bar` to be used purely for the visual presentation. This fixes the problem #36736 that in certain browser/AT combinations, zero-value/zero-width progress bars are completely ignored and not announced.

For multiple/stacked progress bars, this PR introduces a new wrapper and class `.progress-stacked`, to accommodate for the fact that with the more logical structure above, we need full `.progress` elements with child `.progress-bar` elements, and can't get away with the fudge we had before of having a single `.progress` with multiple `.progress-bar`s.

Note that the old markup structures still work with this change, so this could be considered a non-breaking change - though one we definitely want to highlight as it's more accessible (as it now guarantees that zero-value/zero-width progress bars, whether on their own or as part of a multi/stacked bar, are actually announced)

* Add a note about progress bar change in migration guide

* Add notes with old markup examples and explanation

* Fix bundlewatch

* Update site/content/docs/5.2/components/progress.md

Co-authored-by: Julien Déramond <julien.deramond@orange.com>

* Reintroduce deleted styles

Turns out they're needed for correct positioning of text inside progress bar

* Move changes in markup to Migrationg guide, link to that from top of progress page, rewrite some content

* Fix typo in callout

* Clarify "Sizing" section

* Remove redundant "now"

Co-authored-by: Julien Déramond <julien.deramond@orange.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-11-28 23:07:48 -08:00
Mark Otto
fc3f4b67d6
Add dark mode support (#35857)
* Add dark mode to docs

* Minor fix: missing space indentation

* Minor fix: revert utilities/z-index added-in modification

* Remove prev: and next: from doc because extracted to another PR

* Use .bg-body-tertiary in all Utilities > Overflow examples

* fix example

* Fix up spacing examples

* Update box-shadow Sass variables and utilities to auto-adjust to color modes

* Remove unused docs class

* Refactor form styles to use CSS variable for background images on .form-check and .form-switch

* Fix docs selector

* Rename shortcut for clarity

* Heading consistency

* Reintroduce missing 4th grid item in Utilities > Spacing example

* Fix bundlewatch

* .bd-callout* rendering is OK so removing comments in the code

* Update scss/_utilities.scss

Co-authored-by: Julien Déramond <julien.deramond@orange.com>

* Fix gutters example styling

* Fix text colors on background utils docs

* redesign and fix up position marker example, which doesn't show nicely in darkmode but at least isn't broken

* fix some color utils examples

* Deprecate mixin notice

* Deprecate notice for list-group-item-variant() mixin

* Revamp new link CSS vars

* Use map-keys in some each Sass files

* Remove list-group-item-variant mixin ref in sass loop desc

* Display CSS vars scoped to our built-in dark mode

* Revert previous commit

* Fix list group variant link

* Fix typo

* Remove imports of alert/list-group mixins in scss/_mixins.scss

* Small formatting + comments removal in scss/_content.scss

* Fix alert links colors

* fix dropdown border-radius mixin

* fix link color and underline again, this time using CSS var override for color var and fallback value for the underline

* fix colors on docs navbar for dark mode

* remove two changes

* missing ref

* another link underline fix, just use sass vars for link decoration for now

* missing color bg docs, plus move dropdown override to scss

* more changes from review

* fix some examples, drop unused docs navbar styles, update docs navbar color mode to use mixin

* Few fixes around type

- Restored CSS variable for color on headings, this time with a fallback value
- In conjunction, restored and wrapped the default CSS var with a null value check
- Split headings and paragraphs docs in Reboot, elaborated on them

* Restyle custom details > summary element in docs

* Rewrite some migration docs

* fix form checks

* Fix up some navbar styling, tweak docs callout

* Fix select images, mostly for validation styling

* Clean up some migration notes, document some new form control CSS vars, mention new variables-dark in sass docs

* Update site/content/docs/5.2/components/scrollspy.md

Co-authored-by: Julien Déramond <julien.deramond@orange.com>

* Apply suggestions from code review

Co-authored-by: Julien Déramond <julien.deramond@orange.com>

* mention form control css vars in migration guide

* Tweak grid and flex docs background examples

* clarify some docs

* fix some more things

Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Julien Déramond <julien.deramond@orange.com>
2022-11-28 22:30:26 -08:00
XhmikosR
8f6de23682
Merge branch 'main' into prepare-523 2022-11-22 09:51:29 +02:00
chris
abdd3fef1f
Keep string representation in --bs-body-font-family (#37526) 2022-11-21 23:22:27 +01:00
XhmikosR
39589472f7 Bump version to 5.2.3 2022-11-21 20:15:33 +02:00
Gaël Poupard
127a816f77 fix(carousel): RTL translate() direction
Trying to fix #37180
2022-11-21 20:12:28 +02:00
Eric Leibenguth
77c456d8c4 Import root in bootstrap-utilities (#37377)
* Fixes https://github.com/twbs/bootstrap/issues/37376
2022-11-21 20:12:03 +02:00
Sebastian Blank
b72236981f Fix deprecation warning with sass 1.56.0 (#37425)
Deprecation Warning: $weight: Passing a number without unit % (100) is deprecated.
To preserve current behavior: $weight * 1%
More info: https://sass-lang.com/d/function-units
2022-11-21 20:11:18 +02:00
Daniel Raymond
5f67d38bb2
Grid Gap Updates (#37413)
* Grid Gap Updates

- added column-gap
- added row-gap

* Grid Gap Updates

* Bundlewatch update

* Apply suggestions from code review

Co-authored-by: Daniel O <dobiekwe@byteworks.com.ng>
Co-authored-by: Mark Otto <otto@github.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-11-15 18:51:44 -08:00
Julien Déramond
85765210cd Fix disabled floating labels color 2022-11-14 09:32:35 -08:00
Sebastian Blank
2b21094074
Fix deprecation warning with sass 1.56.0 (#37425)
Deprecation Warning: $weight: Passing a number without unit % (100) is deprecated.
To preserve current behavior: $weight * 1%
More info: https://sass-lang.com/d/function-units
2022-11-04 14:44:11 +01:00
Mitchell Cash
cda47731c6
Add support for customising a card title color (#36979)
* Add support for customising a card title color

* Group `*card-title-*` variables together

* Add support for customising a card subtitle color

Co-authored-by: Julien Déramond <julien.deramond@orange.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-10-30 20:06:02 -04:00
Stephen Reay
4b54d22483
Prevent extraneous whitespace around date time inputs in Webkit (#37350)
* Prevent extraneous whitespace around date time inputs in Webkit

Closes twbs/bootstrap#34433

* Updated bundlewatch config
2022-10-30 18:02:10 -04:00
Julien Déramond
06bed9b45a
Fix disabled floating labels and add some examples of it in the docs (#37299)
* Fix disabled floating labels and add some examples of it in the docs

* Add disabled custom height textarea
2022-10-29 20:30:59 -04:00
Eric Leibenguth
60b02041c4
Import root in bootstrap-utilities (#37377)
* Fixes https://github.com/twbs/bootstrap/issues/37376
2022-10-29 09:03:59 +02:00
jonnysp
db60ae0625 fix 2022-10-23 12:51:51 -04:00
jonnysp
7cb376a8fd
Use --bs-border-width for some components (#37344)
* Update _variables.scss

adds variable border-width to some components.
to combine utility borders (border-1, boder-2, ...) on these.

like "card border-2", "alert border-4" , ...

* add more border-width

* fix lint & bundlewatch
2022-10-23 00:13:13 -04:00
Mark Otto
0968db8099
Add z-index utilities, .z-* (#37317)
* Add z-index utilities, .z-*

* Fix missing comma in _utilities.scss

* Fix bundlewatch

* Fix lint

* Update site/content/docs/5.2/utilities/z-index.md

Co-authored-by: Julien Déramond <julien.deramond@orange.com>

* custom appearance

* linter

Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Julien Déramond <julien.deramond@orange.com>
2022-10-22 17:13:39 -04:00
Daniel Raymond
708a3a0e39
Utilities for overflow and object fit (#36848)
* Added "overflow-x" and "overflow-y"

- Having the same properties as overflow but for just the x and y axises
- Usecase being I want my y axis to be scrollable but not my x axis
- E.g a card with a vertical list of items.

* Added "object-fit" utilities

- The CSS object-fit property is used to specify how an <img> or <video> should be resized to fit its container.
- A responsive alternative to using background-img for a resizable fill/fit image.

* Updated documantation for the overflow utilities

- Now includes docs for `overflow-x` and `overflow-y` utilities

* Placeholder shortcode updated

- Can now choose to render an img tag or svg
- The image contains a base64 svg generated within the template
- example shortcode updated to detect, replace and render preview of 'img' tags as well

* New documentaion for Object Fit added

- Documentation added for the 'object-fit' util

* Updated spell checks issues

* Update object-fit.md

* Update overflow.md

* Update object-fit.md

* Updated markup to address HTML Validation Errors

- error: Bad value  for attribute "src" on element "img": Illegal character in scheme data: space is not allowed.
- info warning: Self-closing tag syntax in text/html documents is widely discouraged; it's unnecessary and interacts badly with other HTML features (e.g., unquoted attribute values). If you're using a tool that injects self-closing tag syntax into all void elements, without any option to prevent it from doing so, then consider switching to a different tool.

* Updated Fix

- Added Legibility to the img markup (example.html)
- Fixed issue with example not working properly (because image closing tag no longer has "/>" )

* update values by step of 0.25 in bundlewatch.config

The following values in .bundlewatch.config.json have been updated:
- ./dist/css/bootstrap-utilities.css
- ./dist/css/bootstrap-utilities.min.css
- ./dist/css/bootstrap.css
- ./dist/css/bootstrap.min.css

Co-authored-by: Daniel O <dobiekwe@byteworks.com.ng>
Co-authored-by: Mark Otto <otto@github.com>
2022-10-06 13:14:11 -07:00
Gaël Poupard
5029370a10 fix(carousel): RTL translate() direction
Trying to fix #37180
2022-10-06 13:07:49 -07:00
Julien Déramond
9936ed48d7 Add $enable-important-utilities condition in colored links 2022-10-06 13:04:43 -07:00
Louis-Maxime Piton
bf6240dad9
Add an artificial background to floating labels (#37125) 2022-10-06 08:12:00 +02:00
Neeraj Kumar Das
5975ca65c5
Remove duplicate --#{$prefix}offcanvas-zindex (#37257) 2022-10-04 13:38:07 +02:00
Julien Déramond
b1185b91ea
Add new border-radius utilities (#36540)
* Add new border-radius utilities

* Fix bundlewatch

* Fix bundlewatch again

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-10-03 11:52:41 -07:00
maks
fffe0553c2 Add parameters to the caret mixin 2022-10-03 11:19:56 -07:00
Stefan Haack
2fa7aa0c18
Added breakpoints as css variables (#36095) 2022-10-03 11:04:19 -07:00
maks
9a582767c6
add font-weight-medium(=500) / fw-medium (#36781)
* add font-weight-medium = 500

* Update _utilities.scss
2022-10-03 10:52:02 -07:00
Isabelle Chanclou
838debaad2
Add new css vars for Offcanvas (#36815)
* Add 3 new css vars for Offcanvas feature

* Fix new css variable after review

* Update _offcanvas.scss

Co-authored-by: Mark Otto <otto@github.com>
2022-10-03 10:51:30 -07:00
Vino Rodrigues
18b99f7387 color css vars for .btn-close 2022-10-03 10:48:22 -07:00
Vino Rodrigues
3b95c311ea
Add color CSS vars for .alert-link (#36456)
* color css vars for .alert-link

* Update scss/mixins/_alert.scss

Co-authored-by: Mark Otto <otto@github.com>
2022-10-03 10:47:51 -07:00
XhmikosR
961d5ff984
Release v5.2.2 (#37236)
* Bump version to v5.2.2

* Dist
2022-10-03 10:44:02 +03:00
Julien Déramond
9edfed8a5e
Don't redefine $border-color in table-variant mixin (#37239)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-10-02 16:33:11 +02:00
Mark Otto
37e2e7e124
Use Sass variable for accordion color (#37182)
Fixes #37144
2022-09-21 18:55:57 +02:00
Patrick H. Lauke
2be9cd59ba
Explicitly target .btn-check and undo :hover (#37165)
rather than the other way around, which caused specificity issues
2022-09-20 15:15:46 +02:00
flavio-b
636bb496c9 Set toast z-index variable in the correct spot
The .toast-container tries to use the z-index CSS variable, which is defined under .toast. 
However, this variable is not accessible to the container. This change copies the variable to the spot where it can be used.
2022-09-20 04:36:45 -07:00
XhmikosR
23e50829f9
Release v5.2.1 (#37098)
* Bump version to v5.2.1.

* Dist
2022-09-07 18:31:39 +03:00
Sebastian Homeier
7a7469b8ab Fix accordion button color
Use the Sass variable `$accordion-button-color` to set the CSS custom
property `--bs-accordion-btn-color`.
2022-09-06 10:06:43 -07:00
AmirHossein
9b943880fc Update _button-group.scss 2022-09-05 12:52:43 -07:00
AmirHossein
97a9060a8f Update _button-group.scss 2022-09-05 12:52:43 -07:00
Mark Otto
2504b89950 Remove gradient from .btn-link 2022-09-04 11:12:38 -07:00