Comments (7)
I've been thinking of how to disable inline mode in a more elegant way in upcoming version 2 of project and would love to hear your feedback since you are facing related issue.
Current idea:
<span class="iconify" />
- icon with inline mode<span class="iconify-icon" />
- icon without inline mode
With that implementation data-inline
attribute becomes irrelevant, though still available. I think it would make syntax cleaner. What do you think?
from iconify.
In version 2 icons will have class names that match prefixes, such as iconify--ic
.
You can also add custom classes to placeholder, for example <span class="iconify time-icon"></span>
, so instead of targeting icon by name, you can target icon by class name .time-icon {}
.
Inline method should behave the same everywhere. All it does is adds vertical-align
to style. It does depend on an icon, for example, icons imported from icon fonts such as FontAwesome 4 have weird vertical alignment to match behaviour of font. This will also be cleaned up in version 2.
from iconify.
I can add my own classes? I think I tried that and my classes disappeared. I’ll try again.
As for the cleanup maybe classes like:
iconify-inline
Or you want inline to be the default with extra text for non inline?
from iconify.
You should be able to add your own classes. If not, its a bug that I'll need to fix. Adding classes definitely works in version 2 that is currently in development.
Using iconify-inline
makes sense, however there is a problem with backwards compatibility. If iconify
class would default to non inline icon, it would require version 1 users to change syntax. So I'm thinking of keeping iconify
class as default for inline icon and adding different class that would default to non inline.
from iconify.
Tested custom classes - they do work correctly. So you can add custom classes to placeholders and use those classes to target specific icons in css.
from iconify.
Version 2.0.0-beta.1 has been published.
It has all changes mentioned above.
from iconify.
nice. Thanks
from iconify.
Related Issues (20)
- Workerd SSR issues HOT 1
- Hey I found an Issue !! HOT 2
- iconify/vue 使用addCollection加载图标集 还会向远程服务器发起请求吗 我想就将图标集打包到项目中
- Release of icons with android library HOT 8
- @iconify/tailwindcss redundant code HOT 16
- 在uniapp中怎么使用unocss+iconify实现图标展示啊? HOT 1
- 在uniapp中显示不出来图标 HOT 1
- @iconify/tailwind can't use underline HOT 3
- Opacity on icons HOT 1
- Feat: Type definition for all icon names HOT 1
- Icon toggles visibility when scrolled in/out of viewport - observer="false" does not work? HOT 7
- `@iconify-icon/react` prop `observe` didn't work HOT 2
- finding the "real corner" of an svg HOT 2
- Prefers reduced motion with transitions HOT 6
- I can't tell why is this happening HOT 9
- Npm install broken for 1.0.0 HOT 1
- Allows adding additional `attributes` when using `getIconCSS` HOT 5
- [BUG] Class extends value undefined is not a constructor or null HOT 2
- Plugin generates a lot of repeated CSS code HOT 2
- Unexpected element: <text> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iconify.