-
Notifications
You must be signed in to change notification settings - Fork 0
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
Polish before publishing #3
Conversation
9f8d2d2
to
162ee7d
Compare
Svg nodes don't have props and when trying to set e.g. class using Html.Attributes.class on an svg, a run time error occurs. elm/svg#3
570589c
to
c019cdf
Compare
c019cdf
to
2f96f72
Compare
README.md
Outdated
module MyModule exposing (customHtml) | ||
|
||
import Html exposing (Html) | ||
import Svg.Attribute exposing (class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module is called Svg.Attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
abbdd8f
to
f806239
Compare
README.md
Outdated
## Icons Color | ||
For convenience sake by default the icons will take the current color of their parent element. | ||
If this is not the desired behaviour it can be changed using the CSS `fill` propery and setting it to the desired value by either using a class or an inline style. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add some things
For convenience sake by default the icons will take the current color of their parent element. So the preferred way to set colors would be to set something like
color: green
in CSS.
If this is not the desired behaviour, a different fill mode can be set via the fill attribute, or CSS fill property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
build/index.js
Outdated
.replace(new RegExp("Html.Attribute", "g"), "Svg.Attribute") | ||
.replace( | ||
/\[(viewBox\s+"[\s0-9]+")\]\s+\+\+/, | ||
`$1 :: Svg.Attributes.fill "currentColor" :: ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fill
is enough because you are importing Svg.Attributes exposing (..)
in the module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
f74ea63
to
279c071
Compare
build/index.js
Outdated
|
||
|
||
## Customizing Icons Size | ||
The icons \`viewBox\` is set to "0 0 20 20". To resize the icons set either \`widht\` or \`height\` CSS property using either a class or an inline style. The icons' aspect ratio will be kept, so there is no need of specifying both properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo widht
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
build/index.js
Outdated
# Icons | ||
## Customizing Icons Color | ||
For convenience sake by default the icons will take the current color of their parent element. | ||
If this is not the desired behaviour it can be changed using the CSS \`fill\` propery and setting it to the desired value by either using a class or an inline style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add some things
For convenience sake by default the icons will take the current text color of their parent element. So the preferred way to set colors would be to set something like
color: green
in CSS.
If this is not the desired behaviour, a different fill mode can be set via the fill attribute, or CSS fill property.
279c071
to
1536866
Compare
1536866
to
a883256
Compare
Use
Svg.Attribute
instead ofHtml.Attribute
to avoid a possible run time error.Update readme to include an attribution to Zondicons author and add note regarding using svg attributes.
Change package license to
BSD-3-Clause
.