SVGHMI: add a way for widgets and other yslt2 files to add css definitions to resultng page.
authorEdouard Tisserant
Mon, 13 Jun 2022 11:57:37 +0200
changeset 3511 7c27d57b6ec0
parent 3510 0d7f9c555ae2
child 3512 fce3d407bb46
SVGHMI: add a way for widgets and other yslt2 files to add css definitions to resultng page.
svghmi/gen_index_xhtml.ysl2
--- a/svghmi/gen_index_xhtml.ysl2	Fri Jun 10 09:39:10 2022 +0200
+++ b/svghmi/gen_index_xhtml.ysl2	Mon Jun 13 11:57:37 2022 +0200
@@ -34,6 +34,7 @@
             xmlns:declarations="declarations"
             xmlns:definitions="definitions"
             xmlns:epilogue="epilogue"
+            xmlns:cssdefs="cssdefs"
 
             /* Namespace to invoke python code */
             xmlns:ns="beremiz"
@@ -74,6 +75,7 @@
             head {
                 style type="text/css" media="screen" {
                     value "ns:GetFonts()";
+                    apply "document('')/*/cssdefs:*";
                 }
             }
             // prevents user selection by mouse click / touch and drag