Skip to content

Add path-length CSS property definition (Section 9.6.2)#1073

Merged
karlcow merged 2 commits into
mainfrom
user/viralipurbey/path-length-css-property
Apr 23, 2026
Merged

Add path-length CSS property definition (Section 9.6.2)#1073
karlcow merged 2 commits into
mainfrom
user/viralipurbey/path-length-css-property

Conversation

@viralipurbey

Copy link
Copy Markdown
Contributor

Summary

Add a CSS property definition for path-length alongside the existing pathLength SVG attribute in the Paths chapter (Section 9.6.1), per the CSS WG resolution from 22 January 2020.

Changes

paths.html

  • Added new subsection 9.6.2 The 'path-length' property with:
    • CSS property definition table (none | <number [0,∞]>, initial value none, applies to shapes and textPath, not inherited, not animatable).
    • Prose describing the property's effect on 'distance-along-a-path' calculations ('text-on-path' layout, motion animation, stroke dash operations).
    • Statement that pathLength is a presentation attribute for path-length.
    • Note referencing the CSS WG resolution.

definitions.xml

  • Registered path-length in the presentation attributes category.
  • Added <property> entry for path-length.
  • Updated the pathLength attribute definition with presentationattribute mapping.

Addresses #773

Preview

image

Add a CSS property table for 'path-length' alongside the existing
'pathLength' attribute definition in the Paths chapter (Section 9.6.1).

The 'path-length' property provides the author's computation of the
total length of the path for distance-along-a-path calibration. The
SVG 'pathLength' attribute maps to it as a presentation attribute.

Also updates definitions.xml to register 'path-length' as a
presentation attribute in the presentation attribute category.

Includes a note referencing the CSS WG resolution from 22 January 2020.

Addresses #773
@viralipurbey viralipurbey changed the title Add path-length CSS property definition (Section 9.6.1) Add path-length CSS property definition (Section 9.6.2) Mar 11, 2026

@karlcow karlcow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@viralipurbey Thanks for working on this.
We should try to add the change to Changes section of the spec too.
See an example in https://github.com/w3c/svgwg/pull/1071/changes#diff-c7a9bad640ef0fed758e524f8762e900e665c8005337bb9988a2dffc62d04d6dR516-R521

@viralipurbey

Copy link
Copy Markdown
Contributor Author

I have added it in changes section as well. Please review @karlcow @dirkschulze @goldenboy777

@viralipurbey viralipurbey requested a review from karlcow April 1, 2026 07:47
Comment thread master/changes.html Outdated
Comment thread master/changes.html
Comment thread master/paths.html
@viralipurbey viralipurbey force-pushed the user/viralipurbey/path-length-css-property branch from 745058c to 1f03507 Compare April 2, 2026 18:59

@karlcow karlcow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @viralipurbey
This is wonderful.

@karlcow karlcow merged commit 7e51e84 into main Apr 23, 2026
2 checks passed
@karlcow karlcow deleted the user/viralipurbey/path-length-css-property branch April 23, 2026 01:21
@karlcow karlcow removed the Agenda+ label Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants