0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

35 Commits

Author SHA1 Message Date
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
Mark Otto
cdb6504e48 Drop breakpoint CSS custom properties (#29020)
Media queries do not support CSS custom properties (CSS variables), so we've had some useless variables lying around since shipping v4. This finally removes them and the associated documentation content that explained the situation.

Fixes #29012.
2019-07-14 11:44:49 +03:00
Gleb Mazovetskiy
a9fa21e701 Escape SassScript in custom variable values (#24354)
This is required for Sass v3.5+ compatibility.
See https://github.com/sass/sass/blob/stable/doc-src/SASS_CHANGELOG.md#backwards-incompatibilities----must-read and https://github.com/sass/sass/issues/2383
2017-10-14 08:29:43 +01:00
Félix Saparelli
67d7e26e05 Generate CSS variables for colors, breakpoints, fonts (#23761)
* Generate CSS variables

See #23349
Supersedes #23446

* Ignore _root.scss for linting
2017-10-01 21:00:24 -07:00