2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-24 14:04:09 +03:00
Commit Graph

71 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
Julien Déramond d059c1d5ba Doc: Uniformization of nav tabs content panes (#36163)
* Doc: Uniformization of nav tabs content panes

* Fix after review
2022-04-13 14:56:29 -07:00
GeoSot ece1601227 Revamp Scrollspy using Intersection observer (#33421)
* Revamp scrollspy to use IntersectionObserver

* Add smooth scroll support

* Update scrollspy.js/md

* move functionality to method

* Update scrollspy.js

* Add SmoothScroll to docs example

* Refactor Using `Maps` and smaller methods

* Update scrollspy.md/js

* Update scrollspy.spec.js

* Support backwards compatibility

* minor optimizations

* Merge activation functionality

* Update scrollspy.md

* Update scrollspy.js

* Rewording some of the documentation changes

* Update scrollspy.js

* Update scrollspy.md

* tweaking calculation functionality & drop text that suggests, to deactivate target when wrapper is not visible

* tweak calculation

* Fix lint

* Support scrollspy in body & tests

* change doc example to a more valid solution

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
2022-04-13 10:29:13 -07:00
louismaxime.piton 3984ebb407 Fix proposal 2022-04-12 18:36:50 -07:00
Anton 33992b7d5b Change second example dropdown form (#36137)
To check cases as #36135
2022-04-12 18:08:12 +03:00
Julien Déramond 3c78f772d5 Doc: fix modals and navs CSS vars description 2022-04-11 09:46:20 -07:00
GeoSot 135b9cdff2 Revamp tabs & follow ARIA 1.1 practices (#33079)
* Tab: Revamp tab.js & add support Aria features

* Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6

* Revert "Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6"

* Support arrow down/up functionality

* add prevent default to avoid scrolling the page during up/down keys handling

* remove panel tabindex handling

* Expand documentation text for JS plugin

* Rearrange new docs to specifically call out a11y

* properly place section

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-06 16:36:08 -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
louismaxime.piton 8006203e47 Doc fixes 2022-03-31 14:27:09 -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
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 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 a9a89debc7 Rewrite docs tables in Markdown with table shortcode (#31337)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-03-14 09:38:04 +02:00
Mark Otto 7c966f5848 Convert added in badges to shortcode (#36007) 2022-03-12 07:27:58 +02:00
Mark Otto e567d511d4 Convert breadcrumb to CSS variables 2022-03-11 12:59:55 -08:00
Mark Otto d16088d5d1 Redesign the "Added in" badges in the docs (#35980)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-03-11 21:29:52 +02:00
Julien Déramond 5bdd5e02a4 docs: add missing .dropup in dropup centered example (#35948) 2022-03-11 16:04:41 +02:00
Mark Otto 2e75ec3c41 Convert popovers to CSS variables 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
Louis-Maxime Piton 050b69b9a2 Remove unneeded classes from toasts docs (#35931) 2022-03-02 16:47:03 +02:00
Jann Westermann 8d7358f231 Add static backdrop to offcanvas (#35832)
* Add static backdrop option,  to offcanvas
* Trigger prevented event on esc with keyboard=false
* Change offcanvas doc , moving backdrop examples to examples section
2022-03-02 02:20:37 +02:00
Mark Otto c0f30366ac Add centered dropdown and dropup options 2022-02-28 14:02:51 -08:00
Mark Otto 28d9aaf670 Add z-index for .toast-container (#35859)
* Add z-index for .toast-container

- Adds positioning and z-index to toast container so that it has a system-declared layer in relation to other components.
- Updates docs to use the class better

Fixes $34028

* Remove unnecessary z-index from docs examples
2022-02-25 08:49:02 -08:00
Julien Déramond 36765912c6 Replace non-existent --bs-btn-padding by --bs-btn-padding-{x|y} 2022-02-23 10:24:50 -08:00
chefarbeiter a381ee320b Fix modal doc 2022-02-22 15:12:20 +02:00
Mark Otto 48a7160cf4 Convert pagination component to CSS variables (#35399)
* Convert pagination component to CSS variables

* Use RFS mixin

* Remove the useless fallback
2022-02-16 10:26:24 -08:00
Mark Otto d568e029da Convert dropdowns to CSS variables 2022-02-14 19:11:35 -08:00
Mark Otto ef9d8538a0 Convert .btn and mixins to use CSS variables 2022-02-14 19:00:59 -08:00
Julien Déramond daefd34693 Fix typo in Badges CSS variables description 2022-02-14 16:10:42 +02:00
Mark Otto a7942190c7 Bump version callout 2022-02-10 19:51:23 -08:00
Mark Otto 7e71fe7bae Convert .badge to CSS variables 2022-02-10 19:51:23 -08:00
Julien Déramond d3babf7d7f Remove remaining .navbar-light classes (#35814)
* Fix typo in CSS variables documentation

* Drop remaining .navbar-light classes
2022-02-09 21:12:08 +02:00
Mark Otto c9cec89764 Convert navbar to CSS variables
Co-Authored-By: Gaël Poupard <ffoodd@users.noreply.github.com>
2022-02-08 10:39:58 -08:00
Florian Lacreuse 957c1dd6ea Fix dropdown docs about autoclose and esc key. 2022-02-03 18:20:47 +02:00
Gaël Poupard a5483a8a96 Breadcrumb docs: drop confusing currentColor and add new callout (#35434) 2022-02-01 15:37:33 +02:00
A Web Artisan 2964c12bb9 docs: remove moot autocomplete attributes (#35741) 2022-01-29 13:20:01 +02:00
XhmikosR d581737f78 Update cspell config (#35647)
* specify the files to scan in the config
* enable `useGitignore` option
* remove a few unneeded suppressions
2022-01-11 11:17:12 +02:00
Arslan Kalwar e8f4cba9a0 fixed button text (#35656)
Added button missing text
2022-01-05 19:44:22 +02:00
Neeraj Kumar Das f7a1b18320 Fix offcanvas title in 'Enable body scrolling' example (#35621) 2022-01-05 19:01:05 +02:00
zhangchenglin 670e12dd0d Remove the useless class of the close button .text-reset 2022-01-05 18:40:15 +02:00
XhmikosR deb8e3febd Add note to carousel crossfade docs about bg color (#35587)
Fixes #35181

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
2021-12-23 14:38:43 +02:00
Patrick H. Lauke f171d3e9f7 Strengthen and expand note about dynamic tabs with dropdown menus (#35588)
following on from https://github.com/twbs/bootstrap/pull/35213 this

- expands the note, making it clear it's not supported
- makes it a callout
2021-12-23 09:15:36 +02:00
Julien Déramond 32401fdc37 fix(docs): typo in Alerts CSS Variables description (#35575)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-21 09:09:43 +02:00
Louis-Maxime Piton 42162546f2 docs: A fix for CSS Variables and some proposal (#35563)
* docs: Fix CSS variables sections

* Minor fix for dropdowns

* Minor fixes for URLs

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-18 13:53:36 +02:00
Mark Otto f729e4c7d1 Convert alerts to CSS variables (#35401)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-17 07:16:24 +02:00
Florian Lacreuse d17801265e Add sticky bottom utility (#35518)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-16 10:27:00 +02:00