Bug on Custom CSS in theme editor

Short description of issue

Custom CSS within theme editor rejects valid CSS

Reproduction steps

When inputting valid CSS code into the Custom CSS field within the Shopify theme editor, valid code is often rejected. In this example I am referring to use of CSS filters, however there are other examples I regularly encounter.

When writing CSS into the field, the theme editor shows an error and then strips out the code, not allowing it to be saved.

Additional info

The Custom CSS field previously worked fine up until earlier this year. Recent changes have made it almost useless because it rarely works.

What type of topic is this

Bug report

Upload screenshot(s) of issue

@Andrew_Winter This is Shopify theme editor bug.
The CSS validator inside the editor is too aggressive and rejects vald CSS properties sometimes. In this case we need to bypass the theme editor CSS validator entirely.

  1. You can put the code in base.css as global style
  2. You can add it to the code with the style attribute

Sometimes the media query can avoid this kind of aggressive CSS validator but not sure.
Hope this is helpful.