Comments (5)
My intuition says that browserlist is too complex and I'd like to go with feature detection only without that dependency. Not sure if that is possible, but to just list the things we want without the granular details might result to simplest outcome.
from nue.
I'm going to go ahead and add Lightning as a hard dependency and depreciate any other option (Stylus, and my own proprietary pre-processor). On the dev branch soon.
from nue.
Sounds good!
I have started thinking that Nue should support Lightning CSS natively, so it should be part of the dependencies. I think it's the best way to write CSS today. And having the ability to customize the supported features in the configuration would make sense, provided there are sane defaults. I think light-dark is a good default.
Is there a way to make a solid configuration system without adding "browserslist" as a hard dependency?
from nue.
I'm not quite sure, how to do that. Also, my approach wasn't feature based, but browser variant/query specific...
For example, if I have this browserslist
query:
>= 0.25%, last 2 versions, Firefox ESR, not dead
it creates this array containing all versions and browsers, that should be supported:
[
"and_chr 121", "and_ff 122", "and_qq 13.1", "and_uc 15.5", "android 121", "chrome 122", "chrome 121",
"chrome 120", "chrome 119", "chrome 118", "chrome 116", "chrome 109", "edge 121", "edge 120",
"edge 119", "edge 87", "firefox 123", "firefox 122", "firefox 121", "firefox 115", "ios_saf 17.3",
"ios_saf 17.2", "ios_saf 17.1", "ios_saf 17.0", "ios_saf 16.6-16.7", "ios_saf 16.3", "ios_saf 16.2",
"ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6-15.8", "ios_saf 12.2-12.5", "kaios 3.0-3.1",
"kaios 2.5", "op_mini all", "op_mob 73", "opera 106", "opera 105", "safari 17.3", "safari 17.2",
"safari 17.1", "safari 16.6", "safari 15.6", "samsung 23", "samsung 22"
]
and lightningcss
' browserslistToTargets
converts it into a different variant, which seems to be used internally 🤷 (I think to determine which feature is available for what browser versions (e.g. here))
{
and_chr: 7929856,
and_ff: 7995392,
android: 7929856,
chrome: 7143424,
edge: 5701632,
firefox: 7536640,
ios_saf: 786944,
op_mob: 4784128,
opera: 6881280,
safari: 984576,
samsung: 1441792,
}
In conclusion, I'm not quite sure how to do it, but I'll try looking into it, when I find the time.
We could also allow changing include
, to enable / disable features.
PS: Have you seen this discussion: #211, primarily this comments: #211 (comment), #211 (comment)
from nue.
It would probably be best, to just pass a lightning css config object and merge the two.
This could also allow browserslist target support.
Just not completely sure, if that works properly with the yaml file, as one might need js imports from lightning css / other modules.
Maybe similar to the POC marked config?
from nue.
Related Issues (20)
- create error
- Update CLI help message to represent current options HOT 1
- Custom JSX/TSX components HOT 2
- Syntax error HOT 1
- Pending when creating projects with bun under Windows HOT 12
- The path of the route is expected to support regular expressions HOT 1
- component at layout.html compile error HOT 3
- When '{}' or',' in html , How to escape? HOT 1
- It can not start the server with nuekit 0.5.3, but works with nue 0.4.3 HOT 6
- auto generate manifest.json file
- a bug in the nuecli root HOT 5
- unmounted() Why is it not executed?
- Reactive values are not updated? why? HOT 3
- Page router doesn't mount components. Refresh needed to properly mount. HOT 2
- "draw_sections: true" results in nested sections HOT 5
- When iterating collections: can we render the markdown content of an item? HOT 5
- three-tiered directory structure layout HOT 1
- Add default`text` property to default `data` object available to page layouts.
- SPA demo not working when deploy on subpath of domain
- Nuemark: How to add svg inside a button 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 nue.