1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-07 06:06:47 +02:00
Commit Graph

53 Commits

Author SHA1 Message Date
Mark Otto
a9df5dd0e3 border utils, css/sass vars, and more 2025-06-10 09:10:46 -07:00
Mark Otto
bcf9e51c79 Remove some unused rgb vars 2025-05-31 15:28:39 -07:00
Mark Otto
015f19a0a3 Redo background and color utilities with new classes and more 2025-05-30 20:33:22 -07:00
Mark Otto
18f90fbd3b Fix masthead, remove Inter 2025-05-30 20:33:22 -07:00
Mark Otto
a9822ac21c New focus styles 2025-05-30 20:33:22 -07:00
Mark Otto
d30d9bfd96 Tweak docs layout and font-sizes, try out Inter 2025-05-30 20:33:21 -07:00
Mark Otto
f9c74a0974 Move around box shadow vars 2025-05-30 20:33:08 -07:00
Mark Otto
e09539933c Revamp theme colors and more 2025-05-30 20:32:45 -07:00
Mark Otto
12fb082b3b WIP, needs to be broken apart
- button ideas
- rewrite utility mixin
- cleanup some code
- remove hyphen from infix by default
2025-05-30 20:31:15 -07:00
Mark Otto
02c1e34645 More docs Sass modules 2025-05-30 20:31:15 -07:00
Mark Otto
78b6a5a0ad Breakpoints edits
Breakpoints update

- Rename $grid-breakpoints to $breakpoints
- Rename -xxl to -2xl
- Update docs to use new classes
- Update breakpoints docs to add new language around updated breakpoint mixins and media queries, including no longer needing -.02px
2025-05-30 20:30:55 -07:00
Mark Otto
c1e8462c4b Implement CSS layers
Rearrange and comment import stack

Move content stylesheets to new folder
2025-05-30 20:30:55 -07:00
Mark Otto
3ce5bfcfb2 Migrate to Sass modules
fix function
2025-05-30 20:30:55 -07:00
Mark Otto
ede41f571b New _colors.scss 2025-05-30 20:30:55 -07:00
Julien Déramond
bde23ae661 Allow <mark> colors customization for color modes (#39141) 2023-09-13 08:50:42 +02:00
Louis-Maxime Piton
0bea3f35c6 CSS: New var proposal + init headings-color (#37904)
* Proposal

* Revert opacity changes

---------

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2023-04-20 20:09:43 -07:00
Julien Déramond
51299bf4e1 Drop unused --bs-focus-ring-box-shadow and add documentation for --bs-focus-ring-{x|y|blur} (#38095) 2023-02-25 08:01:20 +01:00
Mark Otto
8fddb9fe57 Update form validation styles to use new CSS variables for color and border-color (#38044)
* Update form validation styles to use new CSS variables for color and border-color

* Use better Sass variables
2023-02-14 15:22:35 -08:00
louismaximepiton
15744ee1d0 Proposal to rename the CSS and Sass variables 2023-01-21 09:46:48 -08:00
Mark Otto
ca88999448 Fix .form-control in dark mode (#37893)
* Fix .form-control in dark mode

* Remove CSS vars from docs
2023-01-16 15:56:23 -08:00
Julien Déramond
60714e32c7 Add theme maps specific to dark mode (#37843)
* Add theme maps specific to dark mode

* Fix CSS building

* Fix other failing test

Co-authored-by: Mark Otto <markdotto@gmail.com>
2023-01-11 21:06:18 -08:00
Julien Déramond
47580ff9ba Drop duplicate --bs-body-bg-rgb declaration + reorder props 2023-01-11 10:07:09 -08:00
Julien Déramond
748702d00f Reduce bootstrap-grid.css content 2023-01-11 10:01:11 -08:00
Louis-Maxime Piton
8265927fc1 CSS: rename some variables to be consistent (#37804)
* Fix

* fix(review)
2023-01-06 11:46:03 -08:00
Julien Déramond
702a3b6a61 Fix duplicate --bs-emphasis-color set value (#37809)
* Fix duplicate `--bs-emphasis-color` set value

* Restore body- prefix

Co-authored-by: Mark Otto <markdotto@gmail.com>
2023-01-05 19:59:24 -08:00
Julien Déramond
1c05a887ea Remove duplicate definition of --bs-highlight-bg in scss/_root.scss 2023-01-05 19:19:32 -08:00
Mark Otto
da1c968965 Remove dark mode --bs-heading-color value, set to null, and add custom styles for the docs dark mode headings 2023-01-03 19:36:20 -08:00
Mark Otto
9e17b2b34c Focus ring helper and utilities (#33125)
* Add global variables for box-shadow focus rings

* Update instances of -btn-focus-box-shadow to use -ring-box-shadow, unless it's for buttons or inputs

* fix variable name

* Add CSS variables for global focus styling, document it

* Move to CSS vars section

* Update scss/_nav.scss

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>

* Helper and utils

* Fix bundlewatch

* Change 'Focus ring' in sidebar so that the page can be visible

* Minor typo fix

* fix merge

* Revamp some more, improve docs

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
2022-12-29 14:19:22 -08:00
Mark Otto
5d9c09ccba Add color-scheme to dark root selector 2022-12-28 13:00:36 -08: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
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
chris
abdd3fef1f Keep string representation in --bs-body-font-family (#37526) 2022-11-21 23:22:27 +01:00
Stefan Haack
2fa7aa0c18 Added breakpoints as css variables (#36095) 2022-10-03 11:04:19 -07:00
Mark Otto
270344a0d5 Remove headings-color CSS variable due to backward compatibility issues 2022-07-11 00:56:26 -07:00
Mark Otto
427c089961 Stylelint: Disable custom-property-empty-line-before 2022-05-22 19:58:14 -07:00
Mark Otto
bca99232b8 Iterate on border utilities (#36239)
* Remove `--bs-border-opacity: 1` from `.border-*` utilities

We set `--bs-border-opacity: 1` globally at the `:root` level, so redeclaring it on every `.border-*` utility doesn't make much sense. I think we can drop this.

* Remove global border-opacity var, restore on .border-color classes, move .border-color utils down the list to fix some specificity issues

* Add some demos of border utils to the docs
2022-05-05 21:32:02 -07:00
Mark Otto
7745730e41 Revert border-color change (#36238)
* Revert `border-color` change

* Add new border-color-translucent for when we want optional alpha-transparency in our border-color

Apply to drodpowns, modals, offcanvas, popovers, and toasts

* bundlewatch
2022-04-29 13:59:41 -07:00
Julien Déramond
d0714817f8 Fix duplicate border radius CSS var definition 2022-03-31 14:12:14 -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
Julien Déramond
2d11c1c28a Add missing root border opacity CSS var 2022-03-07 16:24:53 -08:00
Mark Otto
de0dfca9a1 Convert border utilities to CSS variables
- Updates the utilities mixin to check for specific CSS variable names via `css-variable`
- Bonus fix: we now prevent local variables for `0` value utilities (e.g., `.border-top-0` no longer sets `--bs-border-opacity: 1`
- Adds new `.border-opacity-*` classes
- Adds new root variables: `--bs-border-color`, `--bs-border-style`, `--bs-border-width`
- Documents the new variable changes
2022-02-28 11:40:32 -08:00
Travis Risner
45eb70e03c Correctly implement RFS in :root CSS variable for $body-font-size (#35326)
* rfs fix

* Update scss/_root.scss

* Update _reboot.scss

Co-authored-by: Mark Otto <otto@github.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2021-11-25 14:01:19 -10:00
Mark Otto
612d235faf Add check to rgba-css-var function for body or bg (#34699) 2021-08-10 17:16:48 +03:00
Mark Otto
4d7911a27b Add and document additional :root CSS variables
- Adds grayscale colors
- Adds root and body variables

Note that some Sass variables default to `null`, so as we generate and use the CSS variable, we'll be potentially adding some lines of code.
2021-08-03 17:06:06 -07:00
Mark Otto
e72916e5b7 Update color and background-color utilities
- Adds new functions to generate additional Sass maps
- Adds new root variables for rgb() versions of our theme colors, plus a few extras
- Adds ability to change the alpha transparency of text color and background color utilities with new utilities, inline styles, or local CSS var
- Updates documentation for color and background-color utilities pages
- Deprecates .text-black-50 and .text-white-50 since those (and additional transparency levels) can be generated on the fly

Change approach slightly to prevent cascade
2021-08-03 17:06:06 -07:00
Mark Otto
3cf51c6ac9 Add Sass variable for CSS variable prefix (#31684)
* Add Sass variable for CSS variable prefix

* Update other --bs-* var instances
2020-09-30 08:32:58 +03:00
Martijn Cuppens
b531bda07c Improve gradients
- Use a semitransparent gradient from light to dark which works on any background-color
- Store the gradient as a custom property (--bs-gradient)
- Remove `.bg-gradient-*` variants in favour of `.bg-gradient` which works even when `$enable-gradients` are enabled
- Add gradients to navbar, active page links and badges when gradients are enabled
2020-05-15 15:03:12 +03:00
Martijn Cuppens
8cdb057111 Add bs- prefixes to custom properties (#30591) 2020-04-15 18:52:16 +02:00
XhmikosR
ee01dc2340 theming.md: automate _root.scss. (#29326) 2019-08-29 15:09:24 +03:00
XhmikosR
84cba07246 theming.md: bring :root up to par with Scss. (#29323)
Also, add a warning in _root.scss so that we don't miss it again.
2019-08-29 11:10:06 +03:00