mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 12:21:35 +02:00
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>
This commit is contained in:
@@ -23,9 +23,6 @@
|
|||||||
--#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
|
--#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
|
||||||
// scss-docs-end popover-css-vars
|
// scss-docs-end popover-css-vars
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0 #{"/* rtl:ignore */"};
|
|
||||||
z-index: var(--#{$prefix}popover-zindex);
|
z-index: var(--#{$prefix}popover-zindex);
|
||||||
display: block;
|
display: block;
|
||||||
max-width: var(--#{$prefix}popover-max-width);
|
max-width: var(--#{$prefix}popover-max-width);
|
||||||
@@ -42,7 +39,6 @@
|
|||||||
@include box-shadow(var(--#{$prefix}popover-box-shadow));
|
@include box-shadow(var(--#{$prefix}popover-box-shadow));
|
||||||
|
|
||||||
.popover-arrow {
|
.popover-arrow {
|
||||||
position: absolute;
|
|
||||||
display: block;
|
display: block;
|
||||||
width: var(--#{$prefix}popover-arrow-width);
|
width: var(--#{$prefix}popover-arrow-width);
|
||||||
height: var(--#{$prefix}popover-arrow-height);
|
height: var(--#{$prefix}popover-arrow-height);
|
||||||
|
@@ -17,10 +17,10 @@
|
|||||||
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
|
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
|
||||||
// scss-docs-end tooltip-css-vars
|
// scss-docs-end tooltip-css-vars
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
z-index: var(--#{$prefix}tooltip-zindex);
|
z-index: var(--#{$prefix}tooltip-zindex);
|
||||||
display: block;
|
display: block;
|
||||||
margin: var(--#{$prefix}tooltip-margin);
|
margin: var(--#{$prefix}tooltip-margin);
|
||||||
|
@include deprecate("`$tooltip-margin`", "v5", "v5.x", );
|
||||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||||
// So reset our font and text properties to avoid inheriting weird values.
|
// So reset our font and text properties to avoid inheriting weird values.
|
||||||
@include reset-text();
|
@include reset-text();
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
|
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
|
||||||
|
|
||||||
.tooltip-arrow {
|
.tooltip-arrow {
|
||||||
position: absolute;
|
|
||||||
display: block;
|
display: block;
|
||||||
width: var(--#{$prefix}tooltip-arrow-width);
|
width: var(--#{$prefix}tooltip-arrow-width);
|
||||||
height: var(--#{$prefix}tooltip-arrow-height);
|
height: var(--#{$prefix}tooltip-arrow-height);
|
||||||
|
@@ -1294,7 +1294,7 @@ $tooltip-border-radius: $border-radius !default;
|
|||||||
$tooltip-opacity: .9 !default;
|
$tooltip-opacity: .9 !default;
|
||||||
$tooltip-padding-y: $spacer * .25 !default;
|
$tooltip-padding-y: $spacer * .25 !default;
|
||||||
$tooltip-padding-x: $spacer * .5 !default;
|
$tooltip-padding-x: $spacer * .5 !default;
|
||||||
$tooltip-margin: 0 !default;
|
$tooltip-margin: null !default; // TODO: remove this in v6
|
||||||
|
|
||||||
$tooltip-arrow-width: .8rem !default;
|
$tooltip-arrow-width: .8rem !default;
|
||||||
$tooltip-arrow-height: .4rem !default;
|
$tooltip-arrow-height: .4rem !default;
|
||||||
|
@@ -118,6 +118,8 @@ Your custom Bootstrap CSS builds should now look something like this with a sepa
|
|||||||
|
|
||||||
- **Added new snippet examples based to show how to customize our components. —** Pull ready to use customized components and other common design patterns with our new [Snippets examples]({{< docsref "/examples#snippets" >}}). Includes [footers]({{< docsref "/examples/footers/" >}}), [dropdowns]({{< docsref "/examples/dropdowns/" >}}), [list groups]({{< docsref "/examples/list-groups/" >}}), and [modals]({{< docsref "/examples/modals/" >}}).
|
- **Added new snippet examples based to show how to customize our components. —** Pull ready to use customized components and other common design patterns with our new [Snippets examples]({{< docsref "/examples#snippets" >}}). Includes [footers]({{< docsref "/examples/footers/" >}}), [dropdowns]({{< docsref "/examples/dropdowns/" >}}), [list groups]({{< docsref "/examples/list-groups/" >}}), and [modals]({{< docsref "/examples/modals/" >}}).
|
||||||
|
|
||||||
|
- **Removed unused positioning styles from popovers and tooltips** as these are handled solely by Popper.js. `$tooltip-margin` has been deprecated and set to `null` in the process.
|
||||||
|
|
||||||
Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.com/2021/08/04/bootstrap-5-1-0/)
|
Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.com/2021/08/04/bootstrap-5-1-0/)
|
||||||
|
|
||||||
<hr class="my-5">
|
<hr class="my-5">
|
||||||
|
Reference in New Issue
Block a user