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

Polish before publishing #3

Merged
merged 6 commits into from
Apr 4, 2020
Merged

Conversation

pehota
Copy link
Owner

@pehota pehota commented Apr 1, 2020

Use Svg.Attribute instead of Html.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.

@pehota pehota force-pushed the chore/polish-before-publishing branch from 9f8d2d2 to 162ee7d Compare April 3, 2020 08:28
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
@pehota pehota force-pushed the chore/polish-before-publishing branch 2 times, most recently from 570589c to c019cdf Compare April 3, 2020 13:32
@pehota pehota requested a review from layflags April 3, 2020 13:49
@pehota pehota force-pushed the chore/polish-before-publishing branch from c019cdf to 2f96f72 Compare April 3, 2020 14:58
README.md Outdated
module MyModule exposing (customHtml)

import Html exposing (Html)
import Svg.Attribute exposing (class)

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

🙄

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed.

@pehota pehota force-pushed the chore/polish-before-publishing branch from abbdd8f to f806239 Compare April 3, 2020 18:55
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.

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.

Copy link
Owner Author

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" :: `

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

Changed

@pehota pehota force-pushed the chore/polish-before-publishing branch from f74ea63 to 279c071 Compare April 3, 2020 19:32
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.

Choose a reason for hiding this comment

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

typo widht

Copy link
Owner Author

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.

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.

@pehota pehota force-pushed the chore/polish-before-publishing branch from 279c071 to 1536866 Compare April 4, 2020 09:13
@pehota pehota force-pushed the chore/polish-before-publishing branch from 1536866 to a883256 Compare April 4, 2020 10:56
@pehota pehota merged commit 3dc3461 into master Apr 4, 2020
@pehota pehota deleted the chore/polish-before-publishing branch April 4, 2020 10:57
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