anvilistas / anvil-extras

Other
84 stars 25 forks source link

Can't use css variables as foreground value for Tabs #568

Closed GDuroS closed 1 month ago

GDuroS commented 1 month ago

Describe the bug The foreground field of Tabs is not allowing texts using css variables. The field highlights and erases everything that is typed after loses focus. This does not occour in the background field of the same component.

Version 3.0.0

Screenshots image

s-cork commented 1 month ago

Ok - i've added a PR to add this support note for css vars for foreground we would expect 3 space separated numbers foreground e.g. 255 0 0 This is because we wrap the color in rgb(color) and rgb(color / opacity)

s-cork commented 1 month ago

@GDuroS - if you try master branch and see if it's working better for - keep in mind the restrictions above for what is a valid css var for tab foreground.

GDuroS commented 1 month ago

@s-cork - Just checked and allowed me to type a css var. It didn't work (as expected), however, since my vars are usually hex codes. Changing it to a 3 numbers value worked, but I don't really know if it will be useful for me, since I would need to change a lot in my "custom theme" service for users. Anyway, thanks for the work!

s-cork commented 1 month ago

ok - another PR should help - there's new browser syntax that will make this possible

GDuroS commented 1 month ago

Oh, I Wasn't really complaining, I was ok to continue changing the foreground using roles + css, but thank you!

s-cork commented 1 month ago

Can you have another go @GDuroS and see if now works like you want? Note this may not work in older browsers

GDuroS commented 4 weeks ago

Sorry for the delay, @s-cork. I can confirm that it worked on the master branch! Thank you!