Ionic framework cannot set button icon size
21,731
Solution 1
Lucas was close but the correct syntax is this one
button.customIconSound:before {
font-size: 22px !important;
}
Solution 2
If you didn`t solve your problem yet or for people dealing with it in future.
You have to change css style for i pseudo element :before
button.customIconSound i:before {
font-size: 52px !important;
}
Solution 3
Your example is working here.
Maybe your problem is caused by something else.
PS: If you want only to resize the icon this css line is enough.
.customIconSound {
font-size: 52px;
}
Author by
redrom
Updated on July 09, 2022Comments
-
redrom almost 2 years
I would like to set custom icon (ionicons) size for this code:
<button class="button button-icon icon ion-stop customIconSound"></button>
For class customIconSound i tried following:
button.customIconSound,button.button-icon { font-size: 52px !important; color: #fff; line-height: 55px!important; }
But without luck. If i tried icon class without the button button-icon class i fount that it is working but without button class icons has not pressed state (because is it not a button).
How can i solve it please?
Thanks for any advice.