jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.16k stars 250 forks source link

Allow specifying !important on style unit values. #131

Closed ejsmith closed 11 years ago

ejsmith commented 11 years ago

Removing this in favor of a pull request from my fork.

jamietre commented 11 years ago

Seems like this is needed. You can also set styles directly on elements using SetStyles(string style, bool strict) method (with false for strict) to skip syntax checking which I should permit pretty much anything.

I didn't actually realize you could put !important on inline style attributes, since its purpose (so I thought) was to ensure a global style took precedence, but it seems like it can also be used this way (I assume overriding even an !important on the same target from a style sheet?). I am having a hard time finding a spec describing this though.