Git Product home page Git Product logo

Comments (2)

kentcdodds avatar kentcdodds commented on May 24, 2024 2

Hi @kkarkos,
Not a Khan member or anything, but a big fan of aphrodite. Here's my take on it:

In a real application you can't get away from global styles. Whether it be reset CSS or a third party grid system, you're likely going to need/have actual CSS files that you include on your page. This is not a bad practice IMO. The cool thing about aphrodite is that you can reeeeeally easily mix it with your existing architecture and use it where it makes sense. Aphrodite solves the component CSS problem, but it doesn't try to address the existing global problem (like for reset css).

If you're interested, you could implement your own CSS grid using aphrodite and that'd be pretty cool, but as you can see here aphrodite works great with bootstrap :-)

adda8936-237a-11e6-8eaf-f5d4a13bc88f

As for third party components that require you to include their CSS, there's not much you can do to get around that. And truthfully, that's an implementation detail of their library that you should (hopefully) not have to care about. You might encourage them to look at the merits of aphrodite if their library is big enough to warrant a dependency on aphrodite though. Using aphrodite in a library makes it incredibly extensible.

I hope that my perspective is helpful!

from aphrodite.

xymostech avatar xymostech commented on May 24, 2024 1

@kkarkos I don't think there's anything wrong with having an external stylesheet and using aphrodite for styling individual elements! We do that all over the place at KA, and it works well. I think that stylesheets are especially useful for adding overall structure, since it's hard to add more global styles with aphrodite (for now: See e.g. #30)

As far as "is this against the inline css methodology?" goes, I don't think there's any clear inline style methodology, so do whatever works for you! I'm going to close this since this isn't a bug with aphrodite, but feel free to continue the conversation if you'd like :)

from aphrodite.

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.