Comments (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 :-)
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.
@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)
- Typescript typings don't include flushToStyleTag
- Cant get height of Aphrodite element HOT 1
- Add paddingHorizontal, paddingVertical, etc
- Doing a descendant style with aphrodite
- Make object types explicitly inexact to support projects using flow's exact_by_default option
- Support array for css definition
- Garbage collection/stale styles
- About the type definition issue on StyleDeclarationMap HOT 2
- Option to only use insertRule in certain environments
- Update and expose flow? HOT 2
- Stylesheet.create does not support strict TypeScript type checking or intellisense HOT 3
- Is Aphrodite still actively maintained HOT 6
- How to load ESM from a CDN? (development without build) HOT 1
- how can i do this compatible?
- Replacing componentWillReceiveProps react lifecycle method with componentDidUpdate HOT 1
- how to prevent aphrodite from adding !important? HOT 2
- Handling multiple selectors
- how to target classname in aphrodite HOT 2
- How do I make the static code of css exist in the rendered style?
- Aphrodite support for CSP
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 aphrodite.