ionic-tooltips icon indicating copy to clipboard operation
ionic-tooltips copied to clipboard

How can I change tootip style ?

Open lagriffedigitale opened this issue 6 years ago • 7 comments

On IONIC 4, how can I change the tooltip style (background-color, padding, text style, etc...) ? I've searched but I don't find anything...

Thanks.

lagriffedigitale avatar Mar 13 '19 03:03 lagriffedigitale

Hey @lagriffedigitale

As of now I can't give you an answer since I haven't tried to style it externally.

I will update the Ionic 4 implementation to have its own SASS file that uses CSS variables to make customisation easy and more aligned with the current styling methods for Ionic 4.

Please keep in mind the current Ionic 4 version is experimental and might change soon. I've discovered a few issues with it due to usage of shadow DOM in latest Ionic. Hopefully I will find a solution to that soon.

ihadeed avatar Mar 13 '19 17:03 ihadeed

mm

Add this to global.css

tooltip-box {
	background-color: var(--ion-color-primary) !important;
	color: var(--ion-color-primary-contrast) !important;
	border-radius: 5px !important;
}

But i can't style the arrow.. please if u find how post here...

vieiraFelipee avatar Mar 13 '19 19:03 vieiraFelipee

@naolembro the arrow would be tooltip-box:before. See here: https://github.com/zyra/ionic-tooltips/blob/master/projects/ionic-tooltips/src/lib/tooltip-box.component.ts#L46

ihadeed avatar Mar 13 '19 22:03 ihadeed

hey guys

If you are using Ionic 3, you can to add a style:

.tooltip { border-radius: 4px; border: none !important; background: YOUR-COLOR !important; color: #fff; font-size: 1.2rem; }

maybe globally or in you local.

tanrobles avatar Oct 28 '20 17:10 tanrobles

hey guys

If you are using Ionic 3, you can to add a style:

.tooltip { border-radius: 4px; border: none !important; background: YOUR-COLOR !important; color: #fff; font-size: 1.2rem; }

maybe globally or in you local.

this doesn't work for me :(

0x14Rp avatar Jul 13 '21 00:07 0x14Rp

we can modify arrow style also as following .has-arrow.arrow-bottom:before { border-top: 5px solid blueviolet !important; }

antripathi121 avatar Jul 24 '21 05:07 antripathi121

mm

Add this to global.css

tooltip-box {
	background-color: var(--ion-color-primary) !important;
	color: var(--ion-color-primary-contrast) !important;
	border-radius: 5px !important;
}

But i can't style the arrow.. please if u find how post here...

.has-arrow.arrow-bottom:before { border-top: 5px solid blueviolet !important; }

antripathi121 avatar Jul 24 '21 05:07 antripathi121