Styling tooltips
See original GitHub issueI would like to be able to put custom style to tooltips template.
I don’t really know how that kind of thing are handled in other library but just being able to inject css in the component style would already be quite usefull.
I already tried to reach the tooltips level with ::ng-deep like this:
Html:
<ng-template #tooltipTemplate let-model="model" class="tooltip">
This is the single point tooltip template
<pre class="test">{{model|json}}</pre>
</ng-template>
Less:
.tooltip::ng-deep {
background-color: @white !important;
border: 1px solid @silver !important;
}
But it didn’t work, maybe there is a workaround ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15
Top Results From Across the Web
CSS Tooltip
Create a tooltip that appears when the user moves the mouse over an element: Example. <style> /* Tooltip container */ .tooltip { position:...
Read more >Creating beautiful tooltips with only CSS
This tutorial shows you how to create, position, and animate a tooltip using only CSS without any additional HTML elements.
Read more >The Best Looking CSS Tooltip Examples You Can Actually ...
CSS tooltips are excellent web tools to provide quick and simple explanations. These include additional details, word definitions, and ...
Read more >How to style the alt tooltip in html? [duplicate]
You cannot design the default tooltip (i.e. styling the alt attribute) but you can use Javascript, CSS and a <div> or <span> tag...
Read more >CSS Tooltip Generator
This generator will help you design and create CSS tooltips for your website. ... This code generator does not cover all the style...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
But what if I want to change the tooltip container background color ?
Tooltip is a global element and cannot be styled with
::ng-deep
. I was able to style the tooltip using global css styles: