Skip to content

[css-grid] syntax errors in examples #1166

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

Closed
phax opened this issue Apr 4, 2017 · 6 comments
Closed

[css-grid] syntax errors in examples #1166

phax opened this issue Apr 4, 2017 · 6 comments
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-grid-1 Tracked in DoC

Comments

@phax
Copy link

phax commented Apr 4, 2017

Spec version: hhttps://www.w3.org/TR/2017/CR-css-grid-1-20170209/

Example 1 is missing one closing bracket (2. bullet point, at @media print {)

Example 2 uses the character - what's the purpose?

Example 31 is missing the closing comment after Equivalent to grid-area: 2 / 3;

Example 43 uses instead of CSS comment

Thanks and keep up the good work!

@SelenIT
Copy link
Collaborator

SelenIT commented Apr 5, 2017

I suppose it's usually better to link to the current Editor's draft then to the published snapshot, since the spec changes constanly and even the numbering of the examples is now different (e.g. the old Example 1 is now Example 3). But at least some of the errors you mentioned are still in place.

In the example 43 (Example 41 in the current ED), I guess the point of these was not to replace CSS comments, but to mark that there is some CSS code was skipped, something like "replace this with the CSS code that creates a 4-column / 3-row grid container". Have you any ideas how this can be expressed more clearly, other than to place the actual code instead?

@phax
Copy link
Author

phax commented Apr 6, 2017

I personally would simple change … 4-column / 3-row grid container … to /* … 4-column / 3-row grid container … */

The intention of writing this issue was basically that all stuff from the examples that looks like code can be copy-pasted into a real CSS. That's all. I personally use the code as examples for my CSS parser to see that he gets everything right.

@SelenIT
Copy link
Collaborator

SelenIT commented Apr 6, 2017

If the goal is to enable copy-paste the examples for testing, the actual code to create such grid container (e.g. grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);) needs to be added after (or instead of) the comment. Wouldn't it make the example too verbose?

@phax
Copy link
Author

phax commented Apr 6, 2017

I personally don't think so - there are so many specs out there that it is hard to read all of them in depth - therefore having working examples as a basis would imho be a good idea.
If you choose not to - I also understand your reasons....

mrego added a commit to mrego/csswg-drafts that referenced this issue Apr 6, 2017
@mrego
Copy link
Member

mrego commented Apr 6, 2017

I agree it'd be nice to fix the examples, so just in case people copy&paste them we avoid weird confusions.

@mrego
Copy link
Member

mrego commented Apr 10, 2017

This should be fixed now by #1181.

@mrego mrego closed this as completed Apr 10, 2017
@fantasai fantasai added Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Oct 17, 2017
@fantasai fantasai added this to the css-grid-1 CR 2016-09-29+ milestone Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-grid-1 Tracked in DoC
Projects
None yet
Development

No branches or pull requests

4 participants