Commit Graph

2627 Commits

Author SHA1 Message Date
Gaël Poupard
4383ae0459 refactor(color-scheme): reduce complexity 2021-04-14 13:16:01 -07:00
Geremia Taglialatela
6fe75df3aa Hide validation icons from multiple selects
Implementation provided in #33411 does not take into account that some
Operating Systems may display a vertical scrollbar in the multiple
select field

This implementation will hide the validation icons from multiple select
fields, just like Bootstrap 4 does.

Fix: #33591
2021-04-13 22:05:53 -07:00
GeoSot
7b7f4a5ced
Decouple Modal's scrollbar functionality (#33245) 2021-04-11 09:37:59 +03:00
Mark Otto
2d2f5b3dfd Add color-scheme mixin 2021-04-10 09:39:31 -07:00
CFX
0c56749f13
Add equal column mixin (#32155) 2021-04-06 21:45:28 +03:00
Mark Otto
062ecf67b2 Spinner alignment changes 2021-04-04 20:08:15 -07:00
Mark Otto
056ad3ad95
Add offcanvas-top modifier (#33549) 2021-04-04 11:11:33 -07:00
Mark Otto
91a24e2b09 Vertically align offcanvas header components
Fixes #33460
2021-04-04 11:06:49 -07:00
Geremia Taglialatela
bfafabfd53 Fix validation feedback icon in select multiple
Validation feedback for `<select multiple>` should look like
`<textarea>`.

The previous implementation was placing the validation icon in the
middle of the select field together with the single select arrow, that
is not supposed to be part of this kind of inputs
2021-04-02 14:11:35 -07:00
Kyle Tsang
91fa809529
Make .nav-link color consistent when using buttons (#33478)
* Make .nav-link color consistent when using buttons

* Set $nav-link-hover-color to $link-hover-color as default
2021-03-30 23:07:00 -07:00
XhmikosR
220139a89f
Release v5.0.0-beta3 (#33439) 2021-03-23 18:26:54 +02:00
Mark Otto
e775c494f2 Fix flush accordion styles 2021-03-22 13:56:06 -07:00
Mark Otto
c198eb6319
Revamp accordion borders to fix pixel jumping (#33149)
- Pushes the borders to the .accordion-item
- Simplifies the .accordion-flush
- Recreates the .accordion-button border-bottom with an inset box-shadow
- Updates background-color to solid to match other components like list group and prevent stacked translucent borders
- Use negative margin to overlap the consecutive items
2021-03-16 22:16:03 -07:00
Mark Otto
5c6e72c6fe Change from element selector to the opt-in class 2021-03-10 22:04:32 -08:00
Mark Otto
defce83027 Add ol.list-group with psuedo-element numbers 2021-03-10 22:04:32 -08:00
gopal-jayaraman
644afc2761
Removing duplicate text-decoration style for abbr[title] #33197 (#33325)
Removing duplicate text-decoration style for abbr[title] #33197
2021-03-10 19:06:18 -08:00
XhmikosR
bdffdb9380
Update devDependencies (#33307)
* @popperjs/core    ^2.9.0  →    ^2.9.1
* autoprefixer     ^10.2.4  →   ^10.2.5
* clean-css-cli     ^5.2.0  →    ^5.2.1
* postcss           ^8.2.6  →    ^8.2.7
* stylelint       ^13.11.0  →  ^13.12.0
2021-03-08 19:00:06 +02:00
GeoSot
548be2ed66
Offcanvas as component (#29017)
* Add a new offcanvas component

* offcanvas.js: switch to string constants and `event.key`

* Remove unneeded code

* Sass optimizations

* Fixes

Make sure the element is hidden and not offscreen when inactive
fix close icon negative margins
Add content in right & bottom examples
Re-fix bottom offcanvas height not to cover all viewport

* Wording tweaks

* update tests and offcanvas class

* separate scrollbar functionality and use it in offcanvas

* Update .bundlewatch.config.json

* fix focus

* update btn-close / fix focus on close

* add aria-modal and role
return focus on trigger when offcanvas is closed
change body scrolling timings

* move common code to reusable functions

* add aria-labelledby

* Replace lorem ipsum text

* fix focus when offcanvas is closed

* updates

* revert modal, add tests for scrollbar

* show backdrop by default

* Update offcanvas.md

* Update offcanvas CSS to better match modals

- Add background-clip for borders
- Move from outline to border (less clever, more consistent)
- Add scss-docs in vars

* Revamp offcanvas docs

- Add static example to show and explain the components
- Split live examples and rename them
- Simplify example content
- Expand docs notes elsewhere
- Add sass docs

* Add .offcanvas-title instead of .modal-title

* Rename offcanvas example to offcanvas-navbar to reflect it's purpose

* labelledby references title and not header

* Add default shadow to offcanvas

* enable offcanvas-body to fill all the remaining wrapper area

* Be more descriptive, on Accessibility area

* remove redundant classes

* ensure in case of an already open offcanvas, not to open another one

* bring back backdrop|scroll combinations

* bring back toggling class

* refactor scrollbar method, plus tests

* add check if element is not full-width, according to #30621

* revert all in modal

* use documentElement innerWidth

* Rename classes to -start and -end

Also copyedit some docs wording

* omit some things on scrollbar

* PASS BrowserStack tests

-- IOS devices, Android devices and Browsers on Mac, hide scrollbar by default and appear it, only while scrolling.

* Rename '_handleClosing' to '_addEventListeners'

* change pipe usage to comma

* change Data.getData to Data.get

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2021-03-02 19:10:10 +02:00
Mark Otto
6d93a1371a Reset select:disabled opacity and null-ify color to fix rendering differences in Chrome 2021-03-02 06:40:32 -08:00
Gaël Poupard
bed8fc8381 fix(navs): ensure button will grow in fill/justified nav 2021-03-01 11:55:19 -08:00
Gaël Poupard
0bdf931507 fix(list-group): properly set a color on list-group-items 2021-03-01 11:27:08 -08:00
Gaël Poupard
ac3a1069b1 fix(forms): validated controls in input-group 2021-03-01 07:53:39 -08:00
Rohit Sharma
d983744d12
Remove the default positioning from .dropup (#33120) 2021-02-22 08:57:21 +02:00
Gaël Poupard
489e7b6798
fix(card): siblings card links in RTL (#33154)
Fixes a bug mentionned in [#32330](https://github.com/twbs/bootstrap/issues/32330#issuecomment-782001326).

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-22 08:49:38 +02:00
k-utsumi
4d19e0e8a4
Clear duplicated class border-0 (#32925)
* Clear duplicated class `border-0`

* Update migration.md

Co-authored-by: Mark Otto <otto@github.com>
2021-02-16 08:05:09 +02:00
Sam Willis
2f03e32d8c Add input focus blur variable 2021-02-10 21:03:37 -08:00
Patrick H. Lauke
df79aad5e4 Remove explicit suppression of focus outline
It's unclear what the reason for first introducing the original hack here (for `[tabindex="-1"]:focus {...}`) was. Seems something that may have been useful/necessary in SuitCSS, but don't think BS ever relied on this. https://github.com/twbs/bootstrap/issues/18330
It's since been modified to only apply when the browser wouldn't apply a visible outline anyway based on its own heuristics (the `:not(:focus-visible)` part) https://github.com/twbs/bootstrap/pull/28437/

But now, thinking this through more...in browsers that do support this pseudo-selector, what this is essentially saying is redundant: don't apply outline in cases where a `tabindex="-1"` element receives focus but the browser wouldn't normally apply focus outline". at best, this is unnecessary. at worst, this actually overrides things an author may explicitly be trying to do with adding `:focus { outline: ... }` explicitly.
2021-02-10 19:35:52 -08:00
Mark Otto
4c7a3e8adf
Add Sass docs (variables, mixins, and loops) to most pages (#32747)
* WIP: Mention variables, mixins, and loops in docs

* Add Sass sections to component pages

* add sass docs for forms and content

* Update buttons.md

* Remove empty mixins sections

* Massive update to utilities and some consistency changes

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-10 19:29:59 -08:00
XhmikosR
e50c11b8c6
Release v5.0.0-beta2 (#32467)
* Bump version to 5.0.0-beta2

* Dist
2021-02-10 18:14:51 +02:00
Rohit Sharma
29e0c9dfa1
Dropdown — Change the selector to check the use of Popper (#33003)
* Create the popper instance first

Make sure that popper instance has been created first and then apply the
styling on the dropdown(menu)

* Use `data-bs-popper` attibute to check popper

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-09 21:04:23 +02:00
Gaël Poupard
91d3da1f3d
fix(navbar): ensure .navbar-collapse behaves as intended (#33022) 2021-02-09 20:54:37 +02:00
Rohit Sharma
273db7c205 Remove the default left styling in favor of Popper 2021-02-09 14:34:27 +02:00
Mark Otto
8f1c882545 Remove .dropdown-menu[style] reset and adjust .dropdown-menu-* modifiers
- Removes the &[style] selector that was used for resetting Popper styles
- Separate Popper-based alignment from static alignment with `data-bs-popover` attribute that separates the --bs-position and custom right/left properties

Co-Authored-By: Rohit Sharma <rohit2sharma95@gmail.com>
2021-02-09 14:34:27 +02:00
Patrick H. Lauke
96be06e32b
Dynamic tabs: use buttons rather than links (#32630)
* Dynamic tabs: use buttons rather than links

- change docs
- add mention that tabs should be <button> elements
- tweak styles to neutralise border and background

* Update js unit and visual test accordingly

- replace links with buttons
- make one specific test that uses links instead of buttons, as we still want to support it despite it being non-semantically appropriate
- Leaving a couple of tests for now. The test for removed tabs should be redone so that tabs are removed programmatically (as the approach of having that close button inside the link is invalid and broken markup). The test for dropdowns should be removed together we actually ripping out the handling for dropdowns in the tab.js code (arguably a breaking change, though we discouraged this for a few versions and effectively "deprecated" it)

* Add isolation:isolate to prevent focus being overlapped

https://github.com/twbs/bootstrap/pull/32630#issuecomment-756015766
2021-02-09 07:23:45 +02:00
Gaël Poupard
02d103be91
fix(accordion): ensure .accordion-button stays left-aligned (#32951)
Fixes #32938

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-03 21:44:48 +02:00
Gaël Poupard
e4b249d02b
fix(navbar): hardcoded custom property (#32930) 2021-02-03 21:42:24 +02:00
Rohit Sharma
217d84d6b2
Remove the initial margin from dropdown/popover in favor of Popper (#32524)
* Remove the margin from dropdown in favor of Popper

- Set the default margin to 0 for dropdowns (To remove the Popper's  warning)
- Set the required offset in dropdown's defaults

* Remove the margin from the popover component

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-03 21:37:25 +02:00
Mark Otto
88be1ce502 Update docs for color and bg utilities
- Split colors from background utilities with new docs page
- Add Sass docs for both pages
2021-02-03 07:15:49 +02:00
Quy
ed0fc83216
_carousel.scss: Fix typo in comment (#32950) 2021-02-01 15:22:24 +02:00
Patrick H. Lauke
a882614c45 Make carousel indicators actual buttons 2021-01-28 23:32:24 +02:00
Mark Otto
0fa16a5d45
Re-add flex-grow to .navbar-collapse (#32899)
Update .navbar-collapse to drop width 100 and use flex-grow, restoring it to v4's behavior

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-27 21:27:02 +02:00
Patrick H. Lauke
3aa3fda730
Carousel: use buttons, not links, for prev/next controls (#32627)
* Carousel: use buttons, not links, for prev/next

- expand the styles to neutralise border/background
- change docs page
- add extra unit test to check that links or buttons work as controls
- modify visual test to use buttons as well
- use buttons instead of links for prev/next
- remove `role="button"` from links that are actually links

* Clarify that controls can be button or link

* Update site/content/docs/5.0/components/carousel.md

Co-authored-by: Mark Otto <markd.otto@gmail.com>

* Explicitly set padding to 0 to prevent dipping/moving on active in Firefox

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-27 17:31:16 +02:00
Mark Otto
40b15de723
Add .navbar-nav-scroll for vertical scrolling of navbar content (#32037)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-19 07:32:18 +02:00
Mark Otto
bb19b08fbe
Remove popover-arrow margin to fix alignment of the arrow (#32787)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-15 09:12:45 +02:00
Mark Otto
987715fd24 Drop transition on .form-check, keep on .form-switch
To avoid breaking changes, turns -check-transition to null, then adds a new -switch-transition variable
2021-01-14 19:46:50 -08:00
Mark Otto
a8aede0df1 Lighten disabled dropdown text to $gray-500
Fixes #32474
2021-01-14 19:41:34 -08:00
Onycss
041de9d5ed
Add word-break to .toast-body (#32670)
* Update _toasts.scss

* Update scss/_toasts.scss

Co-authored-by: Mark Otto <otto@github.com>
2021-01-13 09:21:57 -08:00
Patrick H. Lauke
78c5b503f9
Darken dropdown item hover style (#32754)
Closes https://github.com/twbs/bootstrap/issues/23329
2021-01-11 01:24:03 +00:00
Patrick H. Lauke
d62d18f172
Consistently use outline:0 rather than outline:none (#32751)
just for code consistency, no actual effect on styling per se
2021-01-10 16:13:08 +00:00
Patrick H. Lauke
a2ae2c364f
Suppress focus outline for buttons when it shouldn't be visible in Chromium (#32689)
Follow-up to https://github.com/twbs/bootstrap/pull/32631

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-10 10:42:26 +00:00