We have an app that uses the default fonts of the platform it runs on (native android, iOS, different browsers).
We have one button from an external partner that has a specific font (Roboto). When I add the fonts locally in the src folder and add a fonts.css to define the fonts and set the style of the button, all components in my app are in Roboto (all texts, labels etc), which is is not what we want.
Is there a way to only change the font for only this button and leave it to default for all the other components?
font-size: 18px !important;
font-family: "Roboto" !important;
I only want this button in this font. Any help is appreciated!
Maybe the custom font family name ‘Roboto’ should be without ‘ ?
See example from W3schools
I assume the itsme…. class relates to the specific button?
Not sure why the font-face appies to everything else
I tried without the quotes. That seems to be the correct syntax, thanks for pointing that out. It does not change the behavior though…
The .itsme-buttons-itsme-label class is for one specific button in our app that opens a third party app to login.
The ion-font-family variable is changed.
Gives as a result:
' "Roboto", "Helvetica Neue", sans-serif'
the source code
--ion-default-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif;
--ion-default-font: "Roboto", "Helvetica Neue", sans-serif;
So I guess I have to set the --ion-font-family explicitly without the Roboto font
I updated my variables.css like this:
--ion-font-family: apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
This solves my issue