New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CSS Paged Media Module page declaration #40

Merged
merged 1 commit into from Sep 19, 2012

Conversation

Projects
None yet
2 participants
@kaleb
Contributor

kaleb commented Sep 19, 2012

See: http://www.w3.org/TR/css3-page/#page

e.g.

div.landscape {
    page: my-landscape-page;
}
@kaleb

This comment has been minimized.

Show comment
Hide comment
@kaleb

kaleb Sep 19, 2012

Owner

I was forced to write:

Html[selector].Each((i, el) => el.Style.SetRaw("page", pageName));

When I really just wanted to write:

Html[selector].Css("page", pageName);

This even curiously threw an error:

Html[selector].Each((i, el) => el.Style.SetStyle("page", pageName, false));
Owner

kaleb commented on da2abe4 Sep 19, 2012

I was forced to write:

Html[selector].Each((i, el) => el.Style.SetRaw("page", pageName));

When I really just wanted to write:

Html[selector].Css("page", pageName);

This even curiously threw an error:

Html[selector].Each((i, el) => el.Style.SetStyle("page", pageName, false));

jamietre added a commit that referenced this pull request Sep 19, 2012

Merge pull request #40 from kaleb/master
Added CSS Paged Media Module page declaration

@jamietre jamietre merged commit ebd38ff into jamietre:master Sep 19, 2012

@jamietre

This comment has been minimized.

Show comment
Hide comment
@jamietre

jamietre Sep 19, 2012

Owner

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.

Owner

jamietre commented Sep 19, 2012

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.

@kaleb

This comment has been minimized.

Show comment
Hide comment
@kaleb

kaleb Sep 19, 2012

Contributor

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!

Contributor

kaleb commented Sep 19, 2012

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!

@jamietre

This comment has been minimized.

Show comment
Hide comment
@jamietre

jamietre Sep 19, 2012

Owner

Alls well that ends well. I will still be adding that option, syntax checking should not be mandatory!

Owner

jamietre commented Sep 19, 2012

Alls well that ends well. I will still be adding that option, syntax checking should not be mandatory!

@kaleb

This comment has been minimized.

Show comment
Hide comment
@kaleb

kaleb Sep 19, 2012

Contributor

Is there an ad hoc way of adding arbitrary class rules? So one can have validation, but one can add one's own.

Contributor

kaleb commented Sep 19, 2012

Is there an ad hoc way of adding arbitrary class rules? So one can have validation, but one can add one's own.

@jamietre

This comment has been minimized.

Show comment
Hide comment
@jamietre

jamietre Sep 19, 2012

Owner

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.

Owner

jamietre commented Sep 19, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment