How to use non standard CSS selectors in a CSSReso

2019-04-13 05:13发布

问题:

I am trying to use styles for the scrollbars in webkit. The CSS selectors look like this:

::-webkit-scrollbar-corner
::-webkit-scrollbar-track-piece:disabled

and so on.

When I use those in a ClientBundle as a CSSResource, the compiler is complaining about those selectors. This results in warnings during compile time, not errors.

But those styles aren't being applied.

I tried to escape the colons, dashes etc. without luck. The literal function doesn't apply here either as it is only used in combination with values, not selectors.

I also used the @external annotation to avoid obfuscation of the selectors.

Nothing seems to work.

Has anyone an idea how to get those styles into my ClientBundle?

Greetings, Matthias

回答1:

You can use "Literal function" for non standard CSS definitions http://code.google.com/p/google-web-toolkit/wiki/CssResource#Literal_function