forked from statebox/purescript-halogen-svg
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Missing stroke-* attributes #3
Comments
Also, fixing this would resolve an open issue in the Statebox repo: Issue with the strokeWidth prop |
antarestrader
added a commit
to antarestrader/purescript-halogen-svg-elems
that referenced
this issue
Jul 10, 2021
Partially addresses Issue JordanMartinez#3. Additional stroke-* would need to a function added to Attributes.purs
antarestrader
added a commit
to antarestrader/purescript-halogen-svg-elems
that referenced
this issue
Jul 10, 2021
* Allow Named Color attributes Allows the use of named colors. See https://www.w3schools.com/colors/colors_names.asp * Add strokeWidth to Presentation Attributes Partially addresses Issue JordanMartinez#3. Additional stroke-* would need to a function added to Attributes.purs
This was fixed with ac6cd49 and can be closed. |
shamansir
pushed a commit
to shamansir/purescript-halogen-svg-elems
that referenced
this issue
Aug 26, 2021
* Allow Named Color attributes Allows the use of named colors. See https://www.w3schools.com/colors/colors_names.asp * Add strokeWidth to Presentation Attributes Partially addresses Issue JordanMartinez#3. Additional stroke-* would need to a function added to Attributes.purs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to port the Elm Shapes Example, I noticed that this library is missing
stroke-dasharray
and thatstroke-width
applies toline
but not tocircle
,rect
orpath
.The MDN entry for
stroke-width
says that:Below is a table showing which attributes apply to which elements.
It seems like there are two main ways to jump here:
A. We make all the attributes part of
PresentationAttributes
and henceGlobalAttributes
. This produces valid SVG but allows users to set attributes that do nothing.B. We create more granular types for
StrokeAttributes
,StokeEndAttributes
andStrokeJoinAttributes
and apply them selectively to appropriate elements.My instinct is to do B, which better models the underlying SVG spec. However, it is (technically) a breaking change because it would move
stroke
out ofGlobalAttributes
and some users may be setting that for some reason.Thoughts?
The text was updated successfully, but these errors were encountered: