Skip to content
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

feat(css): Add stroke CSS SVG properties #757

Merged
merged 12 commits into from
Sep 5, 2024
Merged

Conversation

meyerweb
Copy link
Contributor

Description

Adds the properties stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, and stroke-width.

Motivation

These properties are soon to be added to MDN reference content and need the formal syntax data to back them up.

Related issues and pull requests

Relates to mdn/content#34763.

@meyerweb
Copy link
Contributor Author

Hooray, I finally managed to get it to lint! Ready for merge, I hope.

@meyerweb meyerweb changed the title Add stroke CSS SVG properties feat: Add stroke CSS SVG properties Aug 20, 2024
@bsmth bsmth self-requested a review August 26, 2024 08:42
@bsmth
Copy link
Member

bsmth commented Aug 26, 2024

Thanks, Eric! There's a couple of conflicts now, do you want to have a look? I've added myself as reviewer for when you're ready

@meyerweb
Copy link
Contributor Author

Thanks, Eric! There's a couple of conflicts now, do you want to have a look? I've added myself as reviewer for when you're ready

I think I resolved them — let me know if not, thanks!

@estelle
Copy link
Member

estelle commented Aug 27, 2024

Addresses #750

@bsmth
Copy link
Member

bsmth commented Aug 29, 2024

Thanks, Eric! There's a couple of conflicts now, do you want to have a look? I've added myself as reviewer for when you're ready

I think I resolved them — let me know if not, thanks!

Taking a look now 👀

css/properties.json Outdated Show resolved Hide resolved
css/properties.json Outdated Show resolved Hide resolved
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/stroke-linecap"
},
"stroke-linejoin": {
"syntax": "miter | miter-clip | round | bevel | arcs",
Copy link
Member

Choose a reason for hiding this comment

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

In https://www.w3.org/TR/fill-stroke-3/#stroke-linejoin, it has the following:

Suggested change
"syntax": "miter | miter-clip | round | bevel | arcs",
"syntax": "[ crop | arcs | miter ] || [ bevel | round | stupid ]",

Am I looking at the right spec?

Copy link
Member

Choose a reason for hiding this comment

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

The MDN page references https://drafts.fxtf.org/fill-stroke-3/#stroke-linejoin

which has the following syntax [ crop | arcs | miter ] || [ bevel | round | fallback ]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No browser supports this syntax, and all of them support the syntax I included. Is there a way to mark formal syntaxes that diverge from reality? Happy to use that if so.

Copy link
Member

@bsmth bsmth Sep 4, 2024

Choose a reason for hiding this comment

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

It's my understanding that we should be reflecting spec land in this repo and BCD will be where we have implementation data (reality) / granularity per value, but I'm going to get confirmation and get back with an answer shortly.

Copy link
Member

Choose a reason for hiding this comment

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

Hey Eric, we discussed this, and as for mdn/data we always mirror spec syntax, but considering the circumstance with SVG definitions / CSS spec definitions, your additions are good for now so that we have formal definition values.

@meyerweb
Copy link
Contributor Author

meyerweb commented Sep 3, 2024

@bsmth I wrote some responses to your feedback on formal syntaxes; let me know how best to proceed.

@bsmth bsmth requested a review from a team as a code owner September 5, 2024 08:45
@bsmth bsmth requested review from pepelsbey and removed request for a team September 5, 2024 08:45
@bsmth bsmth changed the title feat: Add stroke CSS SVG properties feat(css): Add stroke CSS SVG properties Sep 5, 2024
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Thanks, @meyerweb, I will merge shortly unless there's anything else outstanding, do you want to have a final check beforehand?

@meyerweb
Copy link
Contributor Author

meyerweb commented Sep 5, 2024

Thanks, @meyerweb, I will merge shortly unless there's anything else outstanding, do you want to have a final check beforehand?

Nope, go for it!

@bsmth bsmth merged commit e577bd0 into mdn:main Sep 5, 2024
3 checks passed
@meyerweb meyerweb deleted the css/strokes branch September 9, 2024 13:53
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