Hello,
complete CSS beginner here. I would like to assign attributes to individual nodes. Strange thing that template node doesn't assign all properties. I'm able to change font-family, font-size and background color, but unable to change Text color and adjust alignment so that Text would be above line:
[{"id":"16de9227c83d1c56","type":"ui_text_input","z":"b48a69981cda79b5","name":"","label":"","tooltip":"","group":"6eb635e620e400ff","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":200,"y":260,"wires":[[]]},{"id":"95dacacef10c9c0e","type":"ui_template","z":"b48a69981cda79b5","group":"6eb635e620e400ff","name":"","order":1,"width":0,"height":0,"format":"<style>\n [node-id=\"16de9227c83d1c56\"] {\n color: red !important;\n background-color: green !important;\n font-size: 40px;\n height:unset;\n font-family: \"Times New Roman\", serif;\n \n }\n</style>\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":200,"y":320,"wires":[[]]},{"id":"6eb635e620e400ff","type":"ui_group","name":"","tab":"3410bb34f2bc4d84","order":1,"disp":true,"width":"12","collapse":false,"className":""},{"id":"3410bb34f2bc4d84","type":"ui_tab","name":"Control","icon":"dashboard","disabled":false,"hidden":false}]
Template:
<style>
[node-id="16de9227c83d1c56"] {
color: red !important;
background-color: green !important;
font-size: 40px;
height: unset;
font-family: "Times New Roman", serif;
}
</style>
NodeRed log
Welcome to Node-RED
===================
5 Aug 09:36:29 - [info] Node-RED version: v3.0.2
5 Aug 09:36:29 - [info] Node.js version: v16.16.0
5 Aug 09:36:29 - [info] Linux 5.15.0-43-generic x64 LE
5 Aug 09:36:30 - [info] Loading palette nodes
5 Aug 9:36:31 - [s7comm-Error] - Installation of Module net-keepalive failed because we might be on the wrong OS. OS=linux
5 Aug 9:36:31 - [s7comm-Info] - Debug configuration for logLevelNodeS7:{"debug":0,"silent":true}
5 Aug 9:36:31 - [s7comm-Info] - Debug configuration for logLevelNodeRED:{"debug":2,"silent":true}
5 Aug 09:36:31 - [info] Dashboard version 3.1.7 started at /ui
5 Aug 09:36:31 - [info] Settings file : /data/settings.js
5 Aug 09:36:31 - [info] Context store : 'default' [module=memory]
5 Aug 09:36:31 - [info] User directory : /data
5 Aug 09:36:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
5 Aug 09:36:31 - [info] Flows file : /data/flows.json
5 Aug 09:36:31 - [info] Creating new flow file
5 Aug 09:36:31 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
5 Aug 09:36:31 - [warn] Encrypted credentials not found
5 Aug 09:36:31 - [info] Server now running at http://127.0.0.1:8888/
5 Aug 09:36:31 - [info] Starting flows
5 Aug 09:36:31 - [info] Started flows
This problem appeared on Windows and on docker.
P.S
Could somebody give a link to guide or small example how to properly use CSS class in nodered?