healthicons 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/healthicons/transform.rb +1 -1
- data/lib/healthicons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af460db6c5e3ecb406d4632c9d7ce55eb6ad83399d0d62035c22f0b544231d9a
|
4
|
+
data.tar.gz: cbfd301200c0881f31d2f47cdb454daba6330ff7abc2dd84bd4c9a3a8e2311e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f97d4f65d51018d46b96242f228b2ac4ea65e400bac833f7d9e62ce29e560acb917ac5f04d15c95245a2d133f4d4a77c72908117055295f978cebdfe196e9c5f
|
7
|
+
data.tar.gz: ec7d186a612c6d15067873de0f74cef4e3ca70b275869aa35bcee168df10d34881f4c796a5cc30421abf59b0421ea495156e370b4aa8fc3379d83a85b4a33d1b
|
data/README.md
CHANGED
@@ -58,7 +58,7 @@ Any additional attributes you want to modify or add to the icons `<svg>` element
|
|
58
58
|
### Adding color
|
59
59
|
|
60
60
|
I'm sure you won't want to stick with with using gray/black as the icons default color.
|
61
|
-
|
61
|
+
You'll want to add `stroke='currentColor'` to the icons SVG, this allows you to set `color` in CSS to apply a color to the icons primary stroke.
|
62
62
|
|
63
63
|
The easiest two methods to add color to the icon can be done with the following methods:
|
64
64
|
|
@@ -66,7 +66,7 @@ The easiest two methods to add color to the icon can be done with the following
|
|
66
66
|
|
67
67
|
Add inline CSS to the icon
|
68
68
|
|
69
|
-
`<%= healthicon('body/dna', style: 'color: red') %>`
|
69
|
+
`<%= healthicon('body/dna', stroke: 'currentColor', style: 'color: red') %>`
|
70
70
|
|
71
71
|
|
72
72
|
**Second Method:**
|
@@ -77,7 +77,7 @@ Create a class in your stylesheets and add the class to the icon.
|
|
77
77
|
.red { color: red; }
|
78
78
|
```
|
79
79
|
|
80
|
-
`<%= healthicon('body/dna', class: 'red' ) %>`
|
80
|
+
`<%= healthicon('body/dna', stroke: 'currentColor', class: 'red' ) %>`
|
81
81
|
|
82
82
|
## Development
|
83
83
|
|
@@ -94,7 +94,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
94
94
|
The icons associated from the original package in this gem are licenses under the [CC0 License](https://healthicons.org/about#license)
|
95
95
|
|
96
96
|
[license-shield]: https://img.shields.io/github/license/tarellel/healthicons.svg?style=flat-square
|
97
|
-
[license-url]: https://github.com/tarellel/healthicons/blob/main/LICENSE
|
97
|
+
[license-url]: https://github.com/tarellel/healthicons/blob/main/LICENSE.txt
|
98
98
|
[rubygems-downloads]: https://ruby-gem-downloads-badge.herokuapp.com/healthicons?type=total
|
99
99
|
[rubygems-link]: https://rubygems.org/gems/healthicons
|
100
100
|
[rubygems-version]: https://badge.fury.io/rb/healthicons.svg
|
@@ -4,7 +4,7 @@ require 'nokogiri'
|
|
4
4
|
|
5
5
|
module Healthicons
|
6
6
|
class Transform
|
7
|
-
DEFAULT_OPTIONS = { 'aria-hidden' => true,
|
7
|
+
DEFAULT_OPTIONS = { 'aria-hidden' => true, focusable: false, role: 'img', size: 24 }.freeze
|
8
8
|
HEIGHT_AND_WIDTH = %i[height width].freeze
|
9
9
|
KEYS_TO_REMOVE = %i[height width viewbox xmlns].freeze
|
10
10
|
|
data/lib/healthicons/version.rb
CHANGED