Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing font-weight for TVML elements

Tags:

css

xml

tvos

tvml

I'm currently working on a TVML app for the Apple TV, and I've been trying to do a few styling adjustments to a few elements.

I've been able to follow the TVML documentation and I've successfully changed the text colour from white to black by doing this:

<description style="color: rgba(0, 0, 0)"> 
  Selvage banjo authentic messenger bag, pork belly occupy heirloom...etc
</description>

Now, according to the documentation, I'd like to style it further by changing other styles such as font-weight to light, and font-size.

Here are a few of my attempts in doing so:

1

<description style="color: rgba(0, 0, 0); font-weight: light"> 
  text goes here
</description>

2

<description style="color: rgba(0, 0, 0) font-weight: light">
  text goes here
</description>

3

<description style="font-weight: light">
  text goes here
</description>

4

<description font-weight="light">
  text goes here
</description>

I can't figure out how to get it working, unfortunately. I'm using the descriptiveAlertTemplate.

like image 346
Kelvin Lau Avatar asked Nov 30 '25 06:11

Kelvin Lau


1 Answers

You need to set tv-text-style: none - for example:

<description style="tv-text-style: none; font-size:36; font-weight:regular;">
like image 184
screaming drills Avatar answered Dec 02 '25 19:12

screaming drills



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!