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

Make line stroke style overridable #153

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Make line stroke style overridable #153

merged 2 commits into from
Apr 25, 2024

Conversation

jeremywiebe
Copy link
Collaborator

@jeremywiebe jeremywiebe commented Apr 23, 2024

Summary:

We noticed that the dashed line style for Mafs lines varied some across the different lines it draws. The stroke-dasharray prop value was also hard-coded in the components and so couldn't be adjusted by a consuming application.

This PR adjusts all (except Plot.Inequalities) lines to use a CSS variable for the dash style.

Type Screenshot
Segment image
ThroughPoints image
PointSlope image
PointAngle image
Plot OfX and OfY image
Polyline image
Circle image
Ellipse image
Parametric image

Test plan:

Edit the line examples in docs/components/guide-examples/LinePointSlopeExample.tsx (for example) to use style="dashed" for the line.

yarn start

Check the line dash style

@jeremywiebe jeremywiebe self-assigned this Apr 23, 2024
Copy link

vercel bot commented Apr 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mafs-6swq ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 10:03pm

@stevenpetryk stevenpetryk merged commit 2f30bd2 into main Apr 25, 2024
8 checks passed
@stevenpetryk stevenpetryk deleted the jer/dash-styles branch April 25, 2024 15:42
@stevenpetryk
Copy link
Owner

Thanks for this!

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.

2 participants