2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-18 12:39:41 +03:00
Commit Graph

2801 Commits

Author SHA1 Message Date
Mark Otto 015d729445 Add dark mode support
Heavily WIP still, but this begins the process of implementing dark mode for our docs and across the project itself.

- Color modes are toggled in the docs navbar with a custom toggler, which stores the select color mode in local storage.
- Color modes can also be set via data attribute thanks to `data-theme` (with light or dark options available currently).
- Docs are heavily WIP for demonstrating the dark mode.
- In order to best implement color modes, I've spiked out a number of new Sass and CSS variables (e.g., `--bs-secondary-bg` and `--bs-tertiary-bg`). In addition, I've added new global CSS variables like `--bs-border-color` and more. So, in addition to general color modes and theming support, we get greater real-time customization, too.

Todos and open questions:

- [ ] Do we refer to these as themes or color modes?
- [ ] Do we provide a color mode toggler JS plugin?
- [ ] Update all components to better utilize global CSS variables so they can be more easily themed (e.g., see `$dropdown-*` Sass variable changes in the diff).
2022-04-18 18:45:51 -07:00
Mark Otto 195440f2fb v5.2.0 design refresh, plus responsive offcanvas classes (#35736)
* Add responsive offcanvas classes

- Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now.
- Adds some JS to the offcanvas component to help with responsiveness

Co-Authored-By: GeoSot <geo.sotis@gmail.com>

* Redesign homepage, docs, and examples

Homepage:

- New Bootstrap purple navbar
- Redesigned masthead
- Rewrote and redesigned homepage content
- Replace Copy text with icons like Bootstrap Icons site across all ClipboardJS instances
- Fixed padding issues in site footer
- Match homepage button styles to examples page, use gap instead of tons of responsive margin utils

Docs:

- New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles.
- New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings
- Sidebar navigation autoscrolls to active link for better usability
- Subnav and navbar padding issues ironed out
- Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version.
- Redesign callouts to add more color to our pages
- Collapse table of contents on mobile
- Cleanup and redesign button styles with CSS variables
- Update design for subnav version dropdown
- Update highlight and example to be full-width until md
- Improve the Added In badges
- Turn the ToC into a well on mobile
- Redesign code snippets to better house two action buttons

Examples:

- Redesign Examples page layout
- Add new example for responsive offcanvases in navbars

* Convert offcanvas to CSS vars

* Feat: add resize handler to Offcanvas.js.

If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector
The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior
The `aria-modal` addon is to protect us, selection backdrop elements

* Separate examples code, Add some selectors, fix stackblitz btn

Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-04-17 22:17:50 -07:00
louismaxime.piton fa0adc979d Minor fixes 2022-04-16 10:06:13 -07:00
Ryan Buckley 74be17edef Add black to colors map 2022-04-12 20:49:36 -07:00
Julien Déramond 7ff974b4ce Fix space between popover's arrow and triggering element (#35976)
* Fix margin between popover arrow and triggering element

* Oups-use .25 increment for bundlewatch

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-04-12 18:53:17 -07:00
louismaxime.piton 3984ebb407 Fix proposal 2022-04-12 18:36:50 -07:00
louismaxime.piton 36e75f6355 Changing the CSS var management 2022-04-12 18:25:04 -07:00
GeoSot 8aaeb3cb6b Remove tooltip and popover styling as it is handled by Popper (#34627)
* Remove not needed css form tooltip & popover as it is made by popper
Remove tooltip margin variable, as popper needs margin to be zero

* Remove popover left/top initializers as they are handled by popper

* nullify `margin` variable and add deprecation message

* Document change in migration guide

* Update _variables.scss

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-04-12 18:16:18 -07:00
Julien Déramond a58d894a5b Improve use of CSS vars in Toasts 2022-04-11 15:36:10 -07:00
Julien Déramond 10f2830805 Add CSS vars for accordions (#36148)
* Add CSS vars for accordions

* Fix Bundlewatch
2022-04-11 15:33:18 -07:00
XhmikosR 7648848e04 Update devDependencies (#36120)
* Update devDependencies

* @babel/core                ^7.17.8  →  ^7.17.9
* @popperjs/core             ^2.11.4  →  ^2.11.5
* clean-css-cli               ^5.5.2  →   ^5.6.0
* eslint-plugin-import       ^2.25.4  →  ^2.26.0
* find-unused-sass-variables  ^4.0.3  →   ^4.0.4
* karma-rollup-preprocessor   ^7.0.8  →   ^7.0.7
* sass                      ^1.49.11  →  ^1.50.0
* stylelint                   14.2.0  →  ^14.6.1

* Fix currentcolor case
2022-04-08 09:17:00 +03:00
Mark Otto dab026fc2b Revert border-color utilities to use the CSS property instead of the variable 2022-04-07 09:37:04 -07:00
louismaxime.piton 238afd94b3 New CSS var 2022-04-06 13:27:56 -07:00
Mark Otto 0323fe99d2 Fix for missing CSS variables on .navbar-nav (#36105)
* Fix for missing CSS variables on .navbar-nav

* Document new CSS vars on .navbar-nav
2022-04-06 13:08:07 -07:00
Neeraj Kumar Das a7153567e1 Bring back webkit calendar picker indicator for datalists (#35406)
* Bring back webkit calendar picker indicator for datalists

* Replace webkit datalist indicator with Bootstrap Icons

* Use default datalist icons on date or time inputs in Chrome
Remove the dropdown arrow from text type inputs

* Bundlewatch

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-06 10:37:54 -07:00
Louis-Maxime Piton 0ceaad3ab4 Use new CSS vars (#36098)
* Proposal to use new CSS var when it could be used.

* Bundlewatch

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-04 13:51:21 -07:00
louismaxime.piton f789c2cc92 Adding CSS var to list-group-item-action 2022-04-04 10:37:42 -07:00
louismaxime.piton 00d028e646 Adding @include everytime it's not the case 2022-03-31 14:41:02 -07:00
Julien Déramond 53fe10716a Reuse all breadcrumb CSS vars available 2022-03-31 14:16:36 -07:00
Julien Déramond d0714817f8 Fix duplicate border radius CSS var definition 2022-03-31 14:12:14 -07:00
Mark Otto e342142b61 Train PR: CSS variables for accordion, cards, navs, and modals (#36071)
* Convert accordion to CSS vars

* Update accordion.md

* Convert navs to CSS variables

* Split up CSS vars

* bundlewatch

* fix vars

* Convert cards to CSS vars

* Convert modals to CSS variables

* Bundlewatch

Co-authored-by: Geremia Taglialatela <tagliala.dev@gmail.com>
2022-03-28 15:05:37 -07:00
Julien Déramond 7f35bc5b65 Define Pagination font size CSS var (#35917)
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-03-24 21:14:42 -07:00
Mark Otto 0eb808015f Convert list group to CSS variables (#35862)
* Convert list-group to CSS vars

* bundlewatch
2022-03-22 10:02:12 -07:00
Mark Otto 9e73b6a13c v5.2.0 migration updates (#36038) 2022-03-19 11:58:22 -07:00
Mark Otto 88bd287b27 Convert progress bars to CSS variables (#35962)
* Convert progress bars to CSS variables

* bundlewatch
2022-03-18 09:02:03 -07:00
Mark Otto a4841afa26 Convert toasts to CSS variables (#35961)
* Convert toasts to CSS variables

* bundlewatch
2022-03-17 14:48:36 -07:00
Mark Otto 71582eabff Convert spinners to CSS variables (#35960)
* Convert spinners to CSS variables

* bundlewatch
2022-03-17 13:49:57 -07:00
Mark Otto 8182fd9430 Revert #35759, fixes #35869 2022-03-17 13:39:17 -07:00
Mark Otto 11751c613f Fixes #36015: Fix pagination link border-radius if statement 2022-03-17 13:39:17 -07:00
Mark Otto 91f6a01c69 Fixes #36016: Update .dropdown-item padding 2022-03-17 13:39:17 -07:00
Mark Otto acf6ea74a7 Add additional root variables, rename $variable-prefix to $prefix (#35981)
* Add additional root variables, rename $variable-prefix to $prefix

- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout

* Bundlewatch
2022-03-13 10:13:09 -07:00
Mark Otto e567d511d4 Convert breadcrumb to CSS variables 2022-03-11 12:59:55 -08:00
A Web Artisan ce655ee6f2 Allow to set active and disabled class also to .page-link (#35804)
Sometimes we can set `.active` class only to link tag and not parent.
Since active status style is applied only to `.page-link` and not `.page-item`, would also make more sense to just add the active class to `.page-link` itself.

The other way to set `.active` class to `.page-item` still remain, so there is not BC.

Allow to set also `.disabled` class to `.page-link`

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-03-11 21:25:41 +02:00
Mark Otto 58ac9a9a5c Set opacity on dropdown-divider for now 2022-03-11 09:46:03 -08:00
Mark Otto e72a090aee Updates -color to use rgba() 2022-03-11 09:15:33 -08:00
Mark Otto c73480c636 Adjust border-radius values and add some new utilities
- Updates global border-radius values for a more modern appearance
- New .fw-semibold
- New .rounded-4 and .rounded-5
2022-03-11 09:10:37 -08:00
Mark Otto 63145c8bc6 Fix some instances of lazy Sass math when multiplying new CSS var based border-width 2022-03-11 09:04:13 -08:00
XhmikosR d21a51a2ea Ignore warning for .navbar-light deprecation (#35995) 2022-03-10 20:32:48 +02:00
Mark Otto 2e75ec3c41 Convert popovers to CSS variables 2022-03-08 14:53:53 -08:00
Mark Otto 91312486b2 Deprecate the tooltip-arrow-bg color since we're using CSS variables to set tooltip colors 2022-03-08 14:53:53 -08:00
Mark Otto a68e1af2d5 Document new CSS vars in tooltip docs 2022-03-08 14:53:53 -08:00
Mark Otto fdcbbe3d92 Convert tooltips to CSS vars 2022-03-08 14:53:53 -08:00
louismaxime.piton 6c40476af9 Fix dropdowns 2022-03-08 14:37:44 -08:00
Julien Déramond 2d11c1c28a Add missing root border opacity CSS var 2022-03-07 16:24:53 -08:00
cccabinet a9b3445060 fix:border-width 2022-03-02 15:19:21 -08:00
Mark Otto 9030f57db7 Split CSS vars for padding values (#35921)
* Split CSS vars for padding values

Make these few components consistent with where we're heading with other components. Had to add some new Sass variables to handle the dropdown-header element, but not a huge deal. This ensures we can drop the combined variable in v6 when we're ready.

* Update scss/_dropdown.scss

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

* Deprecate dropdown-header-padding var

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
Co-authored-by: Julien Déramond <julien.deramond@orange.com>
2022-03-01 12:52:00 -08:00
Gaël Poupard 954f6e54d3 fix(forms): color input with validation icon 2022-02-28 19:34:34 -08:00
Gaël Poupard a9d1ab2d3f fix(tooltips|popovers): RTL arrows 2022-02-28 19:27:47 -08:00
louismaxime.piton 76d9cd4e7a . 2022-02-28 14:50:37 -08:00
louismaxime.piton 6e2b21c200 Use the new CSS variable in dropdown menu. 2022-02-28 14:50:37 -08:00