Added CSS Paged Media Name
I was forced to write:
Html[selector].Each((i, el) => el.Style.SetRaw("page", pageName));
When I really just wanted to write:
This even curiously threw an error:
Html[selector].Each((i, el) => el.Style.SetStyle("page", pageName, false));
The last method should have worked - I will take a look at that. Just glanced at the code and didn't see anything obvious but will create some tests and see what's up.
I keep meaning to add a global option to disable style syntax checking too, since styles evolve pretty fast and this might not be wanted by everyone, this might be the time.
I cannot seem to reproduce the last one. :-/ I was looking at the code and could not figure why it was not working. Apparently it was user error. Thanks for taking my commit!
Alls well that ends well. I will still be adding that option, syntax checking should not be mandatory!
Is there an ad hoc way of adding arbitrary class rules? So one can have validation, but one can add one's own.
The style definitions are loaded into a dictionary of HtmlParser.HtmlStyles.StyleDefs so you could certainly add your own, all the objects are public. The style data is parsed into CsQuery.Implementation.CssStyle objects which are stored in the dictionary.