Friday, April 27, 2018

Using StyleInjector with Polymer and Custom CSS Properties

I use StyleInjector to inject CSS rules that work with Shadow DOM Custom Properties:

A snippit from the CSS I inject:

event-action-table.event-action-list-editor {
--table-height: 200px;
-property-with-no-double-minus-prefix: 0;

A snippit from the custom element template:
-grid {
: 100%;
: var(--table-height);

However, at run time, it looks like anything that is prefixed with '--' get's ignored by the injector. In the above case, my output element style looks like:
event-action-table.event-action-list-editor {
-property-with-no-double-minus-prefix: 0;

Why is that?

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment