Skip to content

Why keep non-tether css? #22443

@IdanCo

Description

@IdanCo

Both tooltip and popover keep maintaining a .tooltip-[direction] and .popover-[direction] classes, in addition to the tether classes:

// from scss/_tooltip.scss
  &.tooltip-top,
  &.bs-tether-element-attached-bottom {
    padding: $tooltip-arrow-width 0;
    margin-top: -$tooltip-margin;

I admit these non-tether classes are prettier than the tether ones, but they increase the minified bootstrap.css by almost 1k (see non-minified compare), and I can't see the purpose they fulfill. Perhaps it's a relic from the pre-tether era.

Worth mentioning that these classes are currently used in the docs in the static demo section. Even so, they can be easily replaced by the tether classes:

--- docs/components/tooltips.md	(date 1492073561000)
+++ docs/components/tooltips.md	(revision )
@@ -50,7 +50,7 @@

-  <div class="tooltip tooltip-top" role="tooltip">
+  <div class="tooltip bs-tether-element-attached-bottom" role="tooltip">
     <div class="tooltip-inner">
       Tooltip on the top
     </div>

Is it PR worthy? Notice that this will be a breaking change (in case someone relied on these classes), so it might be worth considering before the beta release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions