Open
Description
This is more like a question than an issue. I'm working on offset-path: ray()
, and the definition of contain
is a little bit not clear enough to me.
Per the spec:
The used value of offset-distance is clamped so that the box is entirely contained within the path.
If no offset-distance would lead to the box being enclosed by the path, the path size is minimally increased so that such an offset-distance exists.
For examples: if the box size is 100px x 100px
.
- If the
offset-anchor
is within the box, e.g.50% 50%
- Assume the path length is long enough to enclose all the box (i.e. larger than 100px):
offset-distance
is 0%, so part of the box is not contained within the path. In this case, do we have to move the box forward (i.e. 50px) to make sure all box is entirely contained within the path? (I guess the answer is yes.)offset-distance
is 100%. This case is clear, so we just move the box backward (i.e. 50px) to make sure all box is entirely contained within the path.
- Assuem the path length is not long enough to enclose the path (i.e. less than 100px):
offset-distance
is 0%, so part of the box is not contained within the path. We have to increase the path length to 100px. The question is which direction should we use to increase the path? For example, increase the tail, so we have enough space to move the box forward?offset-distance
is 100%. Same case, just increase the tail of the path to make sure the path size is 100px, right?
- Assume the path length is long enough to enclose all the box (i.e. larger than 100px):
- If the
offset-anchor
is outside the box, e.g.200% -300%
- What is the definition of the box is entirely contained within the path? the box is outside the path already because the anchor point is outside the box.
Thanks. cc @ericwilligers