Example to use icons with dataset attributes
holtwick opened this issue · 0 comments
holtwick commented
Maybe this is an interesting example as well for the README:
.f7-icons, [data-icon]:before {
font-family: 'Framework7 Icons';
font-weight: normal;
font-style: normal;
/* font-size: 28px; */
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
font-feature-settings: "liga";
text-align: center;
color: transparent;
}
[data-icon]:before {
content: attr(data-icon);
color: inherit;
}
In HTML:
<i data-icon="house"></i>