Recognize selectors of the forms [attr=val], [attr*=val], [attr~=val]
and [attr^=val], optionally with single-quoted values.
Because these selectors previously weren't recognized, trying to
apply /* @noflip */ to one of them would be recognized as a
single-property noflip rather than a rule-wide noflip, and so only
the first property in the rule would be noflipped.
The (simplified) input that triggered this bug was:
/* @noflip */ figure[typeof*='mw:Image'].mw-halign-left { clear: left; float: left; }
which became { clear: left; float: right; } when run through CSSJanus.
See also I4cddce80397d8 which is a workaround for this issue
Bug: 50910
Change-Id: If424a1df26bb7a5a18cee4b0318b029392528fc0
We just need to negate the horizontal offset value in both of them.
This only supports *a single shadow* per element; multiple shadows
are not supported (only the first will be flipped).
Second attempt. First, reverted one: I14822955.
Bug: 45677
Change-Id: I97ee7431e1a5acb35d594076a88a0f9acf290402
The values are not "top right bottom left" here, but
"top-left top-right bottom-right bottom-left".
Bug: 49074
Change-Id: I22bc777b59e667aeb36727fdc8e41e8681979128
The 'color' rule, and by extension 'four_notation_color' too,
only understood #rrggbb and named colors. Extend it to match
rgb[a](...) and hsl[a](...) syntaxes as well.
This makes usage of rgb(a)/hsl(a) syntax in declarations like
'border-color: a b c d;' be interpreted and flipped correctly.
Change-Id: I218a9aa55a86b3d955b92375c1a209fdde312138
Don't mangle 5+ consecutive numeric values in the
'four_notation_quantity' and 'four_notation_color' rules. This
prevents box-shadow rules from being utterly broken in RTL (but still
doesn't flip them properly).
Bug: 45677
Change-Id: I16cb9e171a79c6f299b40fa02908b0c045e3c474
We just need to negate the horizontal offset value in both of them.
This only supports *a single shadow* per element; multiple shadows
are not supported (only the first will be flipped).
Also, to make it possible:
* don't mangle 5+ consecutive numeric values in the
'four_notation_quantity' rule
* support rgb(a) and hsl(a) colors in the 'color' rule
Change-Id: I148229558e1b9a0516e413ffe86007235c3c3ef8