Skip to content

Commit ca812ce

Browse files
author
lo kesh
committed
Added support for Google Material design icons
1 parent e248e41 commit ca812ce

File tree

7 files changed

+37
-4
lines changed

7 files changed

+37
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add `pretty.min.css` in your html
2121

2222
From CDN,
2323
```html
24-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pretty-checkbox/2.2.0/pretty.min.css"/>
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pretty-checkbox/2.2.1/pretty.min.css"/>
2525
```
2626
or from the source,
2727
```html
@@ -70,7 +70,7 @@ Refer the [Documentation](https://lokesh-coder.github.io/pretty-checkbox/) for o
7070

7171
### Custom font library
7272

73-
This library supports wide variety of font icon libraries. Currently tested with `FontAwesome` , `Bootstrap Glyphicon` , `Material Design icons (mdi)` , `Material Design icons (zmdi)` , `Typicons` , `Ionicons`.
73+
This library supports wide variety of font icon libraries. Currently tested with `FontAwesome` , `Bootstrap Glyphicon` , `Google Material Design icons(material.io)`, `Material Design icons (mdi)` , `Material Design icons (zmdi)` , `Typicons` , `Ionicons`.
7474

7575
### What else
7676

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pretty-checkbox",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Scalable css3 pretty checkbox and radio buttons with custom font icon library",
55
"main": "src/pretty.min.css",
66
"dependencies": {},

src/pretty.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.pretty > input + label > i.g-mdi:before,
2+
.pretty > input + label + label > i.g-mdi:before {
3+
content: attr(data-icon);
4+
display: inline-block;
5+
font: normal normal normal 24px/1 "Material Icons";
6+
font-size: inherit;
7+
text-rendering: auto;
8+
line-height: inherit;
9+
-webkit-font-smoothing: antialiased;
10+
-moz-osx-font-smoothing: grayscale;
11+
-webkit-transform: translate(0, 0);
12+
transform: translate(0, 0);
13+
}
14+
115
@media print {
216
.pretty > input:not(:checked) + label i:before {
317
-webkit-print-color-adjust: exact;

src/pretty.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/support/_extend.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.#{$pretty--class-name} {
2+
& > input + label>i.#{$pretty--gmdi-class-name}:before,
3+
& > input + label+label > i.#{$pretty--gmdi-class-name}:before{
4+
content:attr(#{$pretty--gmdi-attr});
5+
display: inline-block;
6+
font: normal normal normal 24px/1 $pretty--gmdi-name;
7+
font-size: inherit;
8+
text-rendering: auto;
9+
line-height: inherit;
10+
-webkit-font-smoothing: antialiased;
11+
-moz-osx-font-smoothing: grayscale;
12+
transform: translate(0, 0);
13+
}
14+
}

src/scss/support/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import 'variables';
22
@import 'mixins';
3+
@import 'extend';
34
@import 'animations';
45
@import 'print';

src/scss/support/_variables.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ $pretty--color-border: #b9b9b9 !default;
1111
$pretty--color-radio: #b9b9b9 !default;
1212
$pretty--color-bg: #fff !default;
1313

14+
$pretty--gmdi-class-name:'g-mdi';
15+
$pretty--gmdi-name:'Material Icons';
16+
$pretty--gmdi-attr:'data-icon';
17+
1418
$outline-colors: (primary o-primary $pretty--color-primary, success o-success $pretty--color-success, info o-info $pretty--color-info, warning o-warning $pretty--color-warning, danger o-danger $pretty--color-danger);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy