Use tooltips with CSS only, instead of popper.js. CSS tooltips can be realized e.g. with the pseudo elements before/after. Some 3rd party libraries (not validated the implementation):
.tooltip::after {
content: attr(data-tooltip);
// etc.
}
Or other attributes like aria-label or the title attribute, which already shows the browsers native tooltip. But I'm not sure if we can suppress the native title tooltip. Anyway... CSS Tooltips would be nice. For tooltip with HTML content, we could e.g. child element (instead of pseudo element).
Motivation and context
Bootstrap currently uses popper.js for the tooltips. And this must be initialized manually by query select all elements. This works well for static HTML pages, but if you use something like Angular, React, Vue, or Svelte, you'll notice some issues.
Prerequisites
Proposal
Use tooltips with CSS only, instead of popper.js. CSS tooltips can be realized e.g. with the pseudo elements before/after. Some 3rd party libraries (not validated the implementation):
Or other attributes like
aria-label
or thetitle
attribute, which already shows the browsers native tooltip. But I'm not sure if we can suppress the native title tooltip. Anyway... CSS Tooltips would be nice. For tooltip with HTML content, we could e.g. child element (instead of pseudo element).Motivation and context
Bootstrap currently uses popper.js for the tooltips. And this must be initialized manually by query select all elements. This works well for static HTML pages, but if you use something like Angular, React, Vue, or Svelte, you'll notice some issues.