Git Product home page Git Product logo

Comments (7)

cyberalien avatar cyberalien commented on May 30, 2024 1

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.

cyberalien avatar cyberalien commented on May 30, 2024

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.

saltnpixels avatar saltnpixels commented on May 30, 2024

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.

cyberalien avatar cyberalien commented on May 30, 2024

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.

cyberalien avatar cyberalien commented on May 30, 2024

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.

cyberalien avatar cyberalien commented on May 30, 2024

Version 2.0.0-beta.1 has been published.

It has all changes mentioned above.

from iconify.

saltnpixels avatar saltnpixels commented on May 30, 2024

nice. Thanks

from iconify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.