Label of Button UI always with text.transform="uppercase"

2,652 views
Skip to first unread message

Pedro Reboredo

unread,
Jun 10, 2017, 1:15:19 AM6/10/17
to Node-RED
Hi all,

I'd like to inject my UI Button Label with {{msg.payload}}.
Right now, I create my plain HTML code with a function node, and send it to my UI Button node via msg.payload.
However, the text (font) will always be displayed in uppercase letters. Is there any possibility to disable the text transformation? (text.transform="none")

Thanks in advance,
Pedro

Dave C-J

unread,
Jun 10, 2017, 3:49:36 AM6/10/17
to node...@googlegroups.com
Hi,
by default the angular-material library will follow the material design guide and make all button text uppercase.
You could apply a style (for example via a ui template) to change this

<style>
    .nr-dashboard-theme .nr-dashboard-button .md-button {
        text-transform:lowercase;
    }
</style>

Pedro Reboredo

unread,
Jun 10, 2017, 2:49:29 PM6/10/17
to Node-RED
Hi Dave,

Thanks for the fast reply. I'd prefer to avoid the Template UI since it's really the Button UI what I need.
Is there any possibility to inject this style tag without overloading the ui_button class / files?

Thanks, Pedro

Pedro Reboredo

unread,
Jun 17, 2017, 4:30:11 PM6/17/17
to Node-RED
Ok, after some try and errors... got now your idea it it works!

Thanks, Pedro
Reply all
Reply to author
Forward
0 new messages