Default template contents

When a ui-template widget is dragged onto the editor, it has a default type of Widget (Group-Scoped) and default content, including <template>, <script> and <style> sections.

I can put CSS in the style section and it is applied as expected.

However, if I change the widget type to CSS (Single Page) or CSS (All Pages) the presence of <template>, <script> or <style> tags breaks the CSS.

Shouldn't CSS be accepted in a CSS type template even if it is within <style> ... </style> tags?

Technically speaking <style> is not valid CSS, its HTML. CSS is the content within the tags. We pass the contents through a CSS parser, hence it breaks.

From a UX perspective though, I understand the frustration. Not sure I want us to get into a habit though of just ignoring user's content (e.g. the template/script)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.