Giter VIP home page Giter VIP logo

Comments (4)

leeoniya avatar leeoniya commented on May 14, 2024 1

hey @clarfon

one thing that i'd like to retain for dropcss is its straightforward nature: if it is not literally in the html string, then it's getting chopped. as you mentioned, shouldDrop easily solves this case. the overwhelming majority of html out there does not rely on implicit tag insertion, and the tiny byte savings are never worth it.

in addition to implicit body, there is also implicit tbody [1], which is actually the much more common case. nevertheless i'd like to keep the magic minimal as long as a userland solution is simple and obvious (or documented).

[1] https://codepen.io/anon/pen/ZgzEdv

from dropcss.

clarfonthey avatar clarfonthey commented on May 14, 2024

Note: as a workaround, you can modify the shouldDrop option to include a whitelist of rules. This is a bit of extra work unless you're already using a whitelist, though.

from dropcss.

clarfonthey avatar clarfonthey commented on May 14, 2024

That is very fair; I don't think it'd be reasonable to ask for this change unless someone came out there with the code or a compelling use case.

Feel free to close as wontfix if you think this would never happen.

from dropcss.

leeoniya avatar leeoniya commented on May 14, 2024

i'm going to leave everything explicit. i've added a note about this to the intro. thanks!

from dropcss.

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.