Coder Social home page Coder Social logo

SVG sprite generation about wprig HOT 11 CLOSED

wprig avatar wprig commented on May 5, 2024 2
SVG sprite generation

from wprig.

Comments (11)

mor10 avatar mor10 commented on May 5, 2024 2

I vote no to svg4everybody. We want to keep this as clean as possible.

from wprig.

mor10 avatar mor10 commented on May 5, 2024 1

Punting this to v2.1 to ensure we get all existing build processes settled before we start adding new features.

from wprig.

ataylorme avatar ataylorme commented on May 5, 2024 1

We have a feature freeze on v2.0 and are focusing on bug fixes. Since this is a new feature and not a bug fix, I think it should stay milestoned for a future release.

That being said, after the current bugs in v2.0 are fixed and we release a beta of v2.0 we can probably start work on v2.1

from wprig.

mor10 avatar mor10 commented on May 5, 2024

This is somewhat related to #35. Let's see if we can add it in when we look at rewiring the Gulp process.

from wprig.

lumpysimon avatar lumpysimon commented on May 5, 2024

Ah yes, this is exactly the sort of thing that a more modular approach to the gulpfile would benefit. I'll keep an eye on #35 and have a go at a pull request for this once I see how the code for that ticket is looking.

from wprig.

ataylorme avatar ataylorme commented on May 5, 2024

@lumpysimon the gulp improvements are in on the v1.1 branch so feel free to make a PR against that branch.

Basically, you need to add a new file to the gulp directory, perhaps gulp/svgSprite.js, with the logic for the task. Then update gulpfile.babel.js and gulp/watch.js to import the new logic and run it as part of the main task and when SVG files change.

Let me know if you have any questions.

from wprig.

lumpysimon avatar lumpysimon commented on May 5, 2024

Thanks! I'll have a go at that soon

from wprig.

ev3rywh3re avatar ev3rywh3re commented on May 5, 2024

I have been concentrating on SVG sprite generation at work. Ideally a decent gulp plugin could handle the heavy lifting but I’m still an npm/gulp newbee.

I know it’s all about final production, so what’s the best sprite implementation with good browser support? ViewBox seems the most compatible across usage methods. It’s such a complex beast I am curious how we could provide a good accessible best practice solution.

My last stop so far while I’ve been hunting for gulp plugins was: https://css-tricks.com/svg-fragment-identifiers-work/

I really love the ideas of ‘symbol‘, but it doesn’t seem to work well for loading a remote SVG for things like list-style-image. It still seems that ViewBox has better support. There has to be a nice documentable method here.

If have any success I will try to share here if I can.

from wprig.

ev3rywh3re avatar ev3rywh3re commented on May 5, 2024

One more! Should SVG4Everybody be considered for backwards compatibility or is that a decision to be made by us when we use wp-rig? https://github.com/jonathantneal/svg4everybody

There are so many ideas about how to make things compatible, I wasn't sure if it should even be brought up or if modern current standards and practices are the wp-rig focus.

from wprig.

benoitchantre avatar benoitchantre commented on May 5, 2024

Punting this to v2.1 to ensure we get all existing build processes

@mor10, @ataylorme : is it something we could consider for v2.0 (SVG sprite generation) or is it tool late?

from wprig.

mor10 avatar mor10 commented on May 5, 2024

Closing in favor of #548

from wprig.

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.