• Hi, trying to play with @property in CSS with GS, I wasn’t able to do so except by putting properties in global custom CSS
    When you add this kind of code inside a block’s Custom CSS (GL element, or GS one) :

    @property --myprop {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
    }

    GS converts it to this in the frontend

    @property --myprop {
    syntax: '';
    inherits: false;
    initial-value: 0;
    }

    So it won’t work

    Also in GS Smart Code block in CSS mode

    • This topic was modified 5 months, 1 week ago by Emmanuel Atsé. Reason: added GS smartcode also
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Illia Sanz

    (@illiagreen)

    Are you sure? I just tested that it’s working.

    https://share.cleanshot.com/ZsVKv6n5

    Please share screenshot how you add it

    Thread Starter Emmanuel Atsé

    (@eatse)

    Yes because for this syntax attribute, you don’t specify a number here like 22, but literally the text <number>, (or other accepted names for this attribute depending on what you need MDN documentation) and I think the <> thing and anything in there is stripped out because it look like an html tag, but not in this case

    Here is a screencast

    Plugin Support Illia Sanz

    (@illiagreen)

    You are right, but currently we can’t allow to use tags there for security reason

    Thread Starter Emmanuel Atsé

    (@eatse)

    Oh, well, at least it’s supported by Gutenberg custom html/css block, either in html tab by putting a style tag, or directly in css tab

    So for now I use it as a workaround but this could work on GS side I suppose

    Plugin Support Illia Sanz

    (@illiagreen)

    No, it can’t work on GS as we can’t enable support for tags in this field because of security reason. But you can enable HTML type of content in block and put css in style tags directly in content

    Thread Starter Emmanuel Atsé

    (@eatse)

    Well, that’s a bit weird as workaround since nobody will think of putting custom css into a style tag made inside an HTML type of content, but at least it works…

    Plugin Support Illia Sanz

    (@illiagreen)

    closing

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.