Comments (3)
👍 Sounds like a plan! Let me know if you run in to any problems if you do decide to try out Navita!
One important USP that Navita has is that it does not require you to use the same transpilation steps that your framework uses. This project does have an swc-plugin, but you don't have to use swc to use it. Navita will take care of that.
I plan on replacing swc with oxc and ezno at some point for more speed and even better static code extraction.
from navita.
Hi!
Thank you for your kind words @paulm17! I've missed your issue completely - sorry!
Running @navita/css
without an adapter is currently not supported, and would be the same as issue #2.
Eventually I could see myself building support for a runtime adapter. I can definitely see the use case for it.
If you need an adapter we don't support today, I'm willing to add it.
To answer your questions:
-
This would be possible, but it's important to note that Navita does not have a runtime, so anything you declare in your app would essentially be "static" styling. You can still use dynamic styling, and there are a few different approaches of this in the vite example directory.
-
The way it works is per file basis, we run a transformation to find any known identifiers. "style" from "@navita/css" for example (this list is extensible btw, so you can hook into the engine if you want). When it finds an identifier, it evaluates the expressions in it, and saves it to a store. Then, on an adapter basis, only styles that are actually used in your project is generated. The tests in packages/core will give you some more information I think. But yes, it would work over file boundaries.
I use Navita in a few very large projects, mainly in Next.js-projects. And it has first class support for Next.js.
Apart from panda-css, Facebook has now released Stylex, which has been an inspiration for this project. But it doesn't have very good Next.js support yet (facebook/stylex#309), but it might be more suited for what you want to do, since they do have a runtime support :)
from navita.
@Zn4rK Thanks for the reply! Appreciate it.
Good to hear about 1 and 2.
Re: an adapater. I think it's better to hold off for now. Whilst StyleX due to design decisions isn't a great fit for my needs. Griffel https://github.com/microsoft/griffel with RSC support should be fine.
If not. Then perhaps I'll take another look at @Navita and go from there.
I'll close this issue now.
from navita.
Related Issues (15)
- Introduce a runtime API
- How does dynamic styles work? HOT 2
- Always clear cache for MagicString
- Run `transformContentProperty` on keyframes.
- CSS variables in `style` gets converted to snake-case.
- Better grouping for identical value pseudo rules
- Make sure `normalizeCSSVarsValue` runs for more cases HOT 2
- CSS specificity for certain rules HOT 1
- [Next.js] Edge Runtime not behaving correctly
- Fix esm exports in next-plugin
- Update next-plugin documentation to use esm HOT 1
- Clean up Engine's caching
- webpack-plugin: run loaders on everything that looks like urls
- Fix types for engine.getItems HOT 1
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 navita.