-
Notifications
You must be signed in to change notification settings - Fork 719
[css-shapes][motion][svg] CSS shapes functions with/without fill-rule parameters #3468
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
Comments
Since I'm going to be sending people to this issue to give feedback, let's do it via a GitHub reactions poll: React to this comment with the following symbols to express a vote:
Of course, if you have detailed use cases, other alternatives, or any other constructive comments, please feel free to leave them below! |
Agenda+ to decide on a final answer. It looks like people are okay with the proposal to:
|
Thanks for adding this to the agenda, @tabatkins! Based on the current schedule, I won't be on the call but I think the summary above still covers everything. Once we pick the final syntax, other things to consider:
(For now, I'm assuming that |
The CSS Working Group just discussed
The full IRC log of that discussion |
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1837305 gecko-commit: 6f345b692ecbd7a6de126296efb8811b6bd8597d gecko-reviewers: emilio
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1837305 gecko-commit: 6f345b692ecbd7a6de126296efb8811b6bd8597d gecko-reviewers: emilio
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625 UltraBlame original commit: 6f345b692ecbd7a6de126296efb8811b6bd8597d
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625 UltraBlame original commit: 6f345b692ecbd7a6de126296efb8811b6bd8597d
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625 UltraBlame original commit: 6f345b692ecbd7a6de126296efb8811b6bd8597d
In order to close this issue, it seems that defining how to handle People may be confused without a clarification in the related specs for these contexts (see w3c/fxtf-drafts#512 and #7390), now that If I am not mistaken, it boils down to defining that: |
For outline shapes, fill-rule should be ignored. We add the flag in the parser of BasicShape, so offset-path can use this flag to ignore fill-rule. Note: "ShapeType" means this property uses filled shapes or outline shapes. For outline shapes, we ignore fill-rule. This is from the concept of `` and ` ` in w3c/csswg-drafts#3468 (comment) No behavir change in this patch, just add the ability for offset-path to ignore ` ` when combining all basic shapes into offset-path. Differential Revision: https://phabricator.services.mozilla.com/D179625
Added the omitted default handling in 5ebf7df |
Uh oh!
There was an error while loading. Please reload this page.
(As Chris Coyier has regularly noted on CSS-Tricks, our current specs and implementation of CSS Shapes functions are a bit of a mess, with certain shapes functions working in some properties but not others. I started writing an explanation of why it's a mess, and ended up with good summaries of two possible solutions. Copying that comment here, in the hopes of finally coming to a decision & getting everything spec'd and shipped!)
The tricky part is fill-rule. The
polygon()
function includes fill-rule keywords as an optional first parameter:https://codepen.io/AmeliaBR/pen/GgWBOy
But a
element uses the keywords set by thefill-rule
ORclip-rule
properties, depending on the shape's context. So having a keyword inside thed
property would create a conflict.The
path()
function as currently spec'd foroffset-path
doesn't include a keyword parameter, because motion only uses the outline, not the fill.We have agreed to use that syntax for
d
(
shape) as a property.But for
clip-path
(and future stuff likeshape-inside
to define the text wrapping area as a shape), we need to know which fill rule to use.One idea I mused about (but never wrote down) is to define two different CSS data types, one of which is a super class of the other:
doesn't have fill-rule keywords
=
(with default fill-rule) |polygon()
andpath()
with keywordsSo, with this option, the
d
property would take an
function, no keywords allowed, and would still use thefill-rule
/clip-rule
properties with no conflict.Another option is to define an
auto
value for the keyword inside the functions, and make that the default. Inclip-path
, anauto
value would behave just like the current default (nonzero
), But ind
, it would behave as "check thefill-rule
orclip-rule
property according to context and use that". If you did specify a different keyword in a function insided
, it would override the other properties:A side benefit, in my opinion, is that this means we could long-term plan to deprecate usage of the
fill-rule
/clip-rule
properties, which are already super annoying in the way they depend on context. If you want context-specific keyword values in the CSS function notation, you could use inherited CSS variable values.But the most important benefit of either of these approaches is that they would allow all the shape functions (possibly minus fill-rule keywords) to be used in all the shape-related properties!!!
The text was updated successfully, but these errors were encountered: