Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[css-shapes-2] Specify the grammar for
shape()
#11207base: main
Are you sure you want to change the base?
[css-shapes-2] Specify the grammar for
shape()
#11207Changes from 1 commit
772d7e7
924abaa
52a829b
a691bfc
27335ce
3036180
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When implementing this, I mentioned this to @smfr, and he didn't quite agree, but I thought I would bring it to a slightly larger audience.
While generally I don't really see the benefit in disallowing to be used for
by
(since is really just sugar for [ ], but if the distinction is going to be made, I think the grammar can be a bit more friendly:with one like so:
or, if you dislike the duplication, of the
from
section,This allows a user who is already using an absolute control point, for example like so:
who decides that
with top left
(aka with 0% 0%) should really bewith top left from start
to do so. In the current grammar, they have to translate their top left to percentage form and write outwith 0% 0% from start
.(doing this also removes a slightly annoying, though manageable, ambiguity in the grammar when parsing
<<control-point>
since its not clear if "10% 10%" should match<position>
or<coordinate-pair>
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows
to bottom left from end
, how would you interpret that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As identical to ‘to 100% 0% from end’?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so like transpose the reference rect to the start/end point... not sure it's a useful box for positioning, might create more confusion than usefulness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More confusing than the fact that ‘to 100% 0% from end’ is valid and ‘to bottom left’ is valid but not the merged form?
Mostly the point I am trying to make is that treating as something other than syntax sugar for two s seems undesirable. But changing this later is also non-breaking as far I can tell, so I really don’t want to push this any further than I have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to 0 100% from end
is not valid, onlywith 0 100% from end
orwith 10px 220px / 100% 0% from end
, thefrom start|end|origin
syntax is only for curve control points.I read
with bottom left
as a shorthand forwith 0 100% from origin
, so expanding it towith 0 100% from origin from end
is indeed confusing.Sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true when
from start
/from end
are used. There probably needs to be a new paragraph that explains how control points are resolved, or a "see below for details".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right... There is a paragraph for control points, I'll refer to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use
''shape()/by''
for the markup. I think.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed