How to get a property value and use it into the css zone

Using html widget

I’d like to get the colorText value to use it into the css zone. What is the syntax ? the `{’ is used for css…
Here i want to get the background in white the colorText value.

In the yellow rectangle, in html widget the headers need to be font-size set ?
And how to get the whole text displayed when it is too long ?

Each style property is bound to a css variable; when the property is set to auto, the only way to use it is to know the associated css variable. It's not documented yet but you can check them out in the sources.
In your case you need to write this: var(--color-text)

the `{’ is used for css…

It doesn't prevent the other syntaxes from working.

In the yellow rectangle, in html widget the headers need to be font-size set ?

Yes, if you want them to.

And how to get the whole text displayed when it is too long ?

Look for css properties "white-space" and "overflow"

ok thanks for the tip for css value

h1 {color: red; font-size: 150%; background-color: var(--color-text); padding: 1.5em}

As far as h1-h6 are concerned :

sure but they are not "de base" as they are in html : different size displayed ?
fr : ok mais ils ne sont pas de base de différentes tailles d'affichage comme peuvent l'être les h1-h6 de base affichés par un navigateur

sure but they are not “de base” as they are in html : different size displayed ?

No, OSC hard resets everything.

1 Like