0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Commit Graph

184 Commits

Author SHA1 Message Date
Patrick H. Lauke
cda901f244
v5/docs: reintroduce outline for docs code samples, buttons when :not(:focus-visible) (#36507)
* Remove outline suppression for focused `<pre>`

Sighted keyboard users rely on knowing where their focus is. If the `<pre>` receives focus (so that it can be scrolled by keyboard users, for instance) then it's essential that they know this is the case

* Only suppress outline for buttons when `:not(:focus-visible)`

* Add right-hand margin to pre

avoids having the focus outline awkwardly clipped by the copy button
2022-08-31 18:30:23 -07:00
louismaximepiton
4cea8b1786 Add a comment for track the bug. 2022-08-31 18:03:42 -07:00
louismaximepiton
995df354f2 Set cursor to auto instead of pointer on .DocSearch-Container 2022-08-31 18:03:42 -07:00
Mark Otto
3feaf6ca0b
Move DocSearch out of offcanvas to always show it on mobile (#36824) 2022-07-27 13:30:42 -07:00
Marc Wrobel
6d101b15a4
Fix typos in snippets.js (#36758) 2022-07-17 20:54:34 +02:00
Julien Déramond
6cf72530ed
Docs: add indeterminate disabled checkbox example (#36674) 2022-07-06 07:43:38 +02:00
Julien Déramond
828034f26f
Fix search modal z-index to be on top of all docs showcased components (#36627) 2022-06-28 07:41:15 +02:00
Julien Déramond
8de0488330 Docs: update clipboard.js to v2.0.11 2022-06-25 16:06:07 +03:00
Mark Otto
24d79fe74c
Add example of dark navbar and offcanvas to docs (#36510) 2022-06-15 07:41:39 -07:00
Julien Déramond
ac89c3692b Docs: remove unused _algolia.scss 2022-06-01 14:24:08 -07:00
Julien Déramond
8b85267739
Fix StackBlitz examples by embedding snippets.js when needed (#36352)
* Fix StackBlitz examples by embedding snippets.js when needed

* Fix Popovers

* Fix tooltips

* Fix Toasts

* Add comment sections

* Fix Alerts

* Indeterminate heckboxes + classes handling

* Nothing to do for links

* Fix modals

* Nothing to do for Offcanvas

* Remove correctly .bd-example

* Add body .p-3 for all StackBlitz examples
2022-05-26 14:29:08 -07:00
Louis-Maxime Piton
dea14df8ca
CSS: doc fixes (#36425)
* Remove unused attributes

* Use utilities rather than using new CSS

* Removed unused class

* Change StackBlitz icon `aria-label` + small inconsistency
2022-05-24 10:39:57 -07:00
Mark Otto
3a327c9015
Rewrite Webpack guide (#36382)
* Rewrite Webpack guide

Co-Authored-By: GeoSot <geo.sotis@gmail.com>
Co-Authored-By: Julien Déramond <17381666+julien-deramond@users.noreply.github.com>

* rewrite some pieces

* eslint-skip

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: Julien Déramond <17381666+julien-deramond@users.noreply.github.com>
2022-05-20 13:43:30 -07:00
Louis-Maxime Piton
e2e107fc72
CSS: few proposals (#36406)
* Something to try about `!important` in color-bg helper

* Better understanding border utility `.border-*-0`

* Having rounded numbers of px
2022-05-20 10:28:31 -07:00
Mark Otto
e12e0806fb Update search box styling and position 2022-05-15 14:22:33 -07:00
Mark Otto
46bb9e78d7 Fix homepage npm install snippet 2022-05-13 20:16:05 +03:00
GeoSot
92e6856235
Docs(Scrollspy): minor changes to be aligned with new version of javascript (#36260)
* Docs(Scrollspy): minor changes to be aligned with new version of javascript code

* first example: add proper root-margin
* 'nested nav' example: add more content to sections & enable smooth-scroll

* fix typo

* Changes after feedback

* Update examples and docs to streamline some things and improve how it works section

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-05-06 21:23:49 -07:00
GeoSot
f02bdf7c52 docs: add proper markup on modal's page tooltips ands popovers 2022-05-06 20:44:06 -07:00
Mark Otto
6b49d26b21
v5.2.0: Migrate to DocSearch 3 (#36176)
* Migrate to DocSearch v3

Fixes #33338

* initialize `siteDocsVersion` const after the proper check

* Update site/layouts/partials/stylesheet.html

Co-authored-by: GeoSot <geo.sotis@gmail.com>

* Update header.html

* code review changes

* Update search.js

* Fix contrast issue, tweak some styles

* Fix some navbar changes

* temporary safari fix for docsearch3

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-05-06 16:56:43 -07:00
GeoSot
d2497b0384 ref(Docs assets): Separate js assets 2022-05-05 21:42:14 -07:00
Julien Déramond
54e0af0303 Clean up last $variable-prefix usages 2022-04-28 21:56:46 -07:00
Mark Otto
9a614a7e1d Add .show class to offcanvas example, and disable it's normal behavior in our JS 2022-04-21 19:56:05 -07:00
louismaxime.piton
1dc59b0d4e Minor fixes 2022-04-20 12:35:26 -07:00
Mark Otto
e089aef00f
Refactor some docs examples CSS (#36194)
* Fix some more borders and margins

* Flex utilities docs: remove .bd-highlight class from snippets

* Explicit close target

* Reorder to keep base class up top

* Fix custom position example

* Tooltips: add code snippet, use scss-docs ref for custom tooltip

* Tweak text for pagination examples

* Modals: move custom styles to utilities

* Grid docs: Combine selectors and share coloring

* Refactor tons of little things
2022-04-19 11:21:43 -07:00
Mark Otto
2aad1696f1 One more code snippet fix 2022-04-18 21:49:31 -07:00
Mark Otto
3362c8cf13
Do some CSS and Migration guide cleanup (#36191)
* Do some CSS and Migration guide cleanup

- More code snippet tweaks
- Fix some homepage hero bugs
- Do a cleanup on Migration guide content to highlight more changes and fix some issues from merge conflicts
2022-04-18 20:56:18 -07:00
Mark Otto
3990ff04a0 Fix spacing of code snippets 2022-04-18 18:19:01 -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
fb21233098 Fix Chroma line highlight style 2022-04-14 23:40:32 -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
Tiger Oakes
fe257823ec
Use Babel and ES6 in docs JS files (#31607)
* Pass docs js through Babel

* Use ES6 in docs js

* Only run babel on src files

* Allow babel in Hugo

* Update scripts.html

* Inherit from the root .eslintrc.json

* Use `Array.from`

* Drop Babel from docs

* Prefer template

* replace IIFE with arrow functions

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-04-12 18:07:25 +03:00
Mark Otto
e206a6021b
Update docs syntax colors head of dark mode (#35984)
* update syntax colors in preparation for dark mode changes

* Improve color contrast
2022-04-11 18:43: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
louismaxime.piton
273ebad151 Changing to btnTitle and btnEdit 2022-04-01 11:26:32 +03:00
Julien Déramond
6b4bdcc657
Fix typo for StackBlitz edit button's tooltip (#36073) 2022-03-29 18:16:11 +03: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
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
GeoSot
05c6e7dd66
Fix docs error after #35644 (#36002) 2022-03-11 17:56:57 +02:00
Puru Vijay
645f955845
docs: add a StackBlitz "Try It" button in code examples (#35644)
Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-03-09 17:32:58 +02:00
Mark Otto
2e75ec3c41 Convert popovers to CSS variables 2022-03-08 14:53:53 -08:00
Mark Otto
fdcbbe3d92 Convert tooltips to CSS vars 2022-03-08 14:53:53 -08:00
Julien Déramond
abe9d310ba Site assets: .bd-bg-purple-bright.bd-bg-violet and drop unused .bd-text-purple-bright 2022-02-28 15:17:37 -08:00
Mark Otto
efc5914667 Replace instances of Sass vars for CSS variable versions of border-color and border-width 2022-02-28 11:40:32 -08:00
Mark Otto
12d49f19b0 Remove thicker border on table thead elements
Use the new .table-group-divider to create your own dividers as desired. Would love to find a better way to handle border-color for this, but for now, this is at least opt-in.

I've applied it by default in another way for our docs tables to help differentiate our content vs our components.

Fixes #35342
2022-02-28 11:21:53 -08:00
Mark Otto
1c5ec4c310 Separate override for hr's in component examples 2022-02-25 08:37:38 -08:00
Gaël Poupard
37f3977e6d
Rely on border-width for <hr> size (#35491)
* fix(reboot): revert hr styles to v4 implementation

* docs(cheatsheet): add a hr example

* fix(reboot): currentColor is the initial border-color value

* Document hr element in Reboot docs

* Update migration guide

* Update scss/_variables.scss

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2022-02-22 10:02:47 +02:00
XhmikosR
ae12d645ef
Replace AnchorJS with a Hugo render hook (#32953)
* Replace AnchorJS with a Hugo render hook

* docs(anchors): improve aria-label on anchor links

* docs(anchors): show anchor link when ed

* docs(anchors): add hash in pseudo-element

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
2022-02-19 15:16:23 +02:00
Mark Otto
3e6265ac55 Rewrite custom docs buttons
- Use CSS variables wherever possible
- Rename purple-bright to violet for brevity, add CSS vars versions
- Rename download to accent
2022-02-14 19:00:59 -08:00
Mark Otto
ef9d8538a0 Convert .btn and mixins to use CSS variables 2022-02-14 19:00:59 -08:00
GeoSot
96c67a7ff7
Fix empty content of tooltip after 'copy' action in docs (#35773)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-02-07 10:05:43 +02:00