You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[motion-1] The computed value of offset-path: path(' ') #392
The EBNF allows the path data string in the d property to be empty. An empty path data string disables rendering of the path. Rendering is also disabled when the d property has the value none.
So an empty path string is valid. And then what is the expected computed value for this case?
offset-path: path(' ');
If someone calls getComputedStyle(div).offsetPath, should we return path('') or none for offset-path? It seems Blinks return none for now. It looks like the spec doesn't mention this, anyway.
It seems to me that path('') is a fine path, just with no commands..
It is, that is why in the example it sets the specified value, while path('nonsense') does not. This is about normalization: no commands is equivalent to no path.
But they're not the same, right? offset-path: path('') should establish a containing block and so on. It's just not equivalent to none the same way as transform: translate(0) is not equivalent to transform: none.
The CSS Working Group just discussed [motion-1] The computed value of offset-path: path(' '), and agreed to the following:
RESOLVED: Invalid path strings make the syntax invalid at parse time
RESOLVED: Empty path is considered invalid
The full IRC log of that discussion
<dael> Topic: [motion-1] The computed value of offset-path: path(' ')
<dael> github: https://github.com//issues/392
<dael> fantasai: I don't know much on this, but it seemed we should resolve and fix.
<dael> heycam: The ultimate issue is we have path function which takes string value. string is svg data string.
<dael> heycam: Some strings are invalid. What does that mean for validity of path function. If you use invalid path string inside is it all parse as invalid and dropped or is string preserved and invalidity handled later
<dael> TabAtkins: If it's valid how to serialize and if not valid clarify that
<dael> florian: Precedint in other properties
<dael> fantasai: IN grid we throw out what's invalid after parsing
<fantasai> s/Precedint/Precedent/
<dael> florian: Same here?
<dael> heycam: NO reason not to
<dael> florian: No architectural complexity so seems like right thing to do
<dael> TabAtkins: Larger question then what's asked in issue. If you have invalid pass it's a separate question. The empty string specifically is a valid path per svg grammer but it disabled rendering of paths. Question is how is it cannonicalized and serialized. In chomre it's serialized as none. All other paths stay as paths but none doesn't so doesn't create containing block
<dael> heycam: Surprises me. I think it then does not make sense to serialize as none
<dael> TabAtkins: If we decide to treat as invalid that's okay with me and this solves iteself. If we want that we should record it. It's about if empty path is valid or not.
<dael> florian: Is it useful?
<dael> TabAtkins: No
<dael> florian: THen make it invalid ad see if world breaks
<dael> TabAtkins: Invalid is probably more consistent with chrome behavior
<dael> fantasai: 2 resolutions?
<dael> heycam: IN issues it's also mentioned strings with only whitespace. Same?
<dael> florian: Suppose so
<dael> TabAtkins: Yeah. Regardless of specifics of svg grammar shouldn't treat different
<dael> Rossen_: can someone summerize?
<dael> TabAtkins: 1) Invalid path strings make the syntax invalid at parse time
<dael> Rossen_: Objections?
<dael> RESOLVED: Invalid path strings make the syntax invalid at parse time
<dael> TabAtkins: 2) The empty string is an invalid path string
<dael> florian: With whoever does the edits being careful for all empty types
<dael> fantasai: Basically 0 length path
<dael> fantasai: 0 length path description
<dael> TabAtkins: If we say it's empty we can deal with specifics lather
<dael> florian: Empty path not empty strong
<fantasai> s/strong/string
<dael> Rossen_: Empty path is considered invalid
<dael> Rossen_: Objections?
<heycam> "a string with no path commands in it", maybe
<dael> RESOLVED: Empty path is considered invalid
<astearns> s/lather/later/
<dael> Rossen_: Anything else?
Activity
BorisChiou commentedon Jan 22, 2020
cc @ericwilligers
[-][motion-1] How to present offset-path: path(' ')[/-][+][motion-1] The computed value of offset-path: path(' ')[/+]ewilligers commentedon Jan 22, 2020
Blink treats
<path d=""/>and<path />and<path style="d: path('')" />and<path style="d: none" />all as having pathnone- example.I don't see value in maintaining different computed style states for these.
The spec could state that
path()with an empty path string serializes asnone.BorisChiou commentedon Jan 22, 2020
Great. Thanks. This is also for
clip-path. I'm also updating Gecko to havenonevalue forclip-path: path(' ').emilio commentedon Jan 23, 2020
It seems really odd to serialize it as
nonebut parse it as valid. It seems to me thatpath('')is a fine path, just with no commands...ewilligers commentedon Jan 23, 2020
It is, that is why in the example it sets the specified value, while
path('nonsense')does not. This is about normalization: no commands is equivalent to no path.emilio commentedon Jan 23, 2020
But they're not the same, right?
offset-path: path('')should establish a containing block and so on. It's just not equivalent tononethe same way astransform: translate(0)is not equivalent totransform: none.Make the empty svg path valid.
Bug 1609786 - Make the empty svg path valid. r=emilio
Bug 1609786 - Make the empty svg path valid. r=emilio
Make the empty svg path valid.
Bug 1609786 - Make the empty svg path valid. r=emilio
Bug 1609786 - Make the empty svg path valid. r=emilio
style: Make the empty svg path valid.
style: Make the empty svg path valid.
style: Make the empty svg path valid.
style: Make the empty svg path valid.
css-meeting-bot commentedon Dec 3, 2020
The CSS Working Group just discussed
[motion-1] The computed value of offset-path: path(' '), and agreed to the following:RESOLVED: Invalid path strings make the syntax invalid at parse timeRESOLVED: Empty path is considered invalidThe full IRC log of that discussion
<dael> Topic: [motion-1] The computed value of offset-path: path(' ')<dael> github: https://github.com//issues/392
<dael> fantasai: I don't know much on this, but it seemed we should resolve and fix.
<dael> heycam: The ultimate issue is we have path function which takes string value. string is svg data string.
<dael> heycam: Some strings are invalid. What does that mean for validity of path function. If you use invalid path string inside is it all parse as invalid and dropped or is string preserved and invalidity handled later
<dael> TabAtkins: If it's valid how to serialize and if not valid clarify that
<dael> florian: Precedint in other properties
<dael> fantasai: IN grid we throw out what's invalid after parsing
<fantasai> s/Precedint/Precedent/
<dael> florian: Same here?
<dael> heycam: NO reason not to
<dael> florian: No architectural complexity so seems like right thing to do
<dael> TabAtkins: Larger question then what's asked in issue. If you have invalid pass it's a separate question. The empty string specifically is a valid path per svg grammer but it disabled rendering of paths. Question is how is it cannonicalized and serialized. In chomre it's serialized as none. All other paths stay as paths but none doesn't so doesn't create containing block
<dael> heycam: Surprises me. I think it then does not make sense to serialize as none
<dael> TabAtkins: If we decide to treat as invalid that's okay with me and this solves iteself. If we want that we should record it. It's about if empty path is valid or not.
<dael> florian: Is it useful?
<dael> TabAtkins: No
<dael> florian: THen make it invalid ad see if world breaks
<dael> TabAtkins: Invalid is probably more consistent with chrome behavior
<dael> fantasai: 2 resolutions?
<dael> heycam: IN issues it's also mentioned strings with only whitespace. Same?
<dael> florian: Suppose so
<dael> TabAtkins: Yeah. Regardless of specifics of svg grammar shouldn't treat different
<dael> Rossen_: can someone summerize?
<dael> TabAtkins: 1) Invalid path strings make the syntax invalid at parse time
<dael> Rossen_: Objections?
<dael> RESOLVED: Invalid path strings make the syntax invalid at parse time
<dael> TabAtkins: 2) The empty string is an invalid path string
<dael> florian: With whoever does the edits being careful for all empty types
<dael> fantasai: Basically 0 length path
<dael> fantasai: 0 length path description
<dael> TabAtkins: If we say it's empty we can deal with specifics lather
<dael> florian: Empty path not empty strong
<fantasai> s/strong/string
<dael> Rossen_: Empty path is considered invalid
<dael> Rossen_: Objections?
<heycam> "a string with no path commands in it", maybe
<dael> RESOLVED: Empty path is considered invalid
<astearns> s/lather/later/
<dael> Rossen_: Anything else?
[css-shapes-1] Clarify that invalid path strings are invalid, per WG …
Bug 1609786 - Make the empty svg path valid. r=emilio