"Italic" font in now mobile card?

RaghavSh
Kilo Patron

Is it possible to change the text font to "italic" in now mobile card?


Raghav
MVP 2023
4 REPLIES 4

Samaksh Wani
Giga Sage
Giga Sage

Hello @RaghavSh 

 

Try it in Mobile Builder.

 

style :-  now-mobile-icons-cards.  //Which is for body content of cards.

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

 

Can you elaborate, provide steps and screenshots if possible.


Raghav
MVP 2023

SwarnadeepNandy
Mega Sage

Hello @RaghavSh,

 

To change the text font to “italic” in a now mobile card, you can use the font-style property in the CSS code of your UI style. The font-style property specifies the font style for a text, such as normal, italic, or oblique. For example, you can use the following code snippet to make the text italic for the short description field in a now mobile card:

//Create a UI style for the short description field 
var uiStyle = new GlideRecord(‘sys_ui_style’); 
uiStyle.initialize(); //Set the table name to sc_req_item 
uiStyle.table = ‘sc_req_item’; //Set the field name to short_description 
uiStyle.field = ‘short_description’; //Set the CSS code to make the text italic 
uiStyle.css = ‘font-style: italic;’; //Insert the UI style record 
uiStyle.insert();

This code will create a UI style record that applies the font-style: italic; CSS code to the short description field in the sc_req_item table. You can modify this code according to your needs and preferences.

To apply the UI style to your now mobile card, you need to add it to your applet.

 

I hope this helps.

 

Kind Regards,

Swarnadeep Nandy

@SwarnadeepNandy 

1. I want to change the font of email field on user profile in now mobile. It does not use any card in applet, how to achieve that with your code?

2. Also to the other point there is no option to apply UI style in "sys_sg_view_template" table.


Raghav
MVP 2023