I realize that the GWT Css resource parser only support CSS2 at the moment, but is there a way to make the css shared parent select (the “~” selector) to work in a Css Resource?
For example:
.password{
font-weight: normal;
}
.email ~ .password{ /* <--- This selector won't be included */
font-weight: bold;
}
If worse comes to worst and you don’t find an elegant solution to this, you can always inject some styles after compilation. That is, let CssResource turn
.emailand.passwordintoemail()andpassword(), and then injectemail() + " ~ " + password()into your page manually. Clearly an ugly hack, but you’d still get all the benefits of CssResource (except browser-specific tweaking) and the styles should apply as you expect.I guess the simplest workaround is to create
.email-password-parentand apply it manually to the parent.