https://github.com/friendsofshopware/css-api
CSS API using Cloudflare Workers
https://github.com/friendsofshopware/css-api
Last synced: 5 months ago
JSON representation
CSS API using Cloudflare Workers
- Host: GitHub
- URL: https://github.com/friendsofshopware/css-api
- Owner: FriendsOfShopware
- License: mit
- Created: 2022-10-16T22:17:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T08:03:58.000Z (over 1 year ago)
- Last Synced: 2025-06-03T22:19:05.359Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 902 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSS API
This API exposes [lightningcss](https://github.com/parcel-bundler/lightningcss) as an API running with AWS Lambda.
API URL: https://27uhytumuulrysydgmak3tlsgu0giwff.lambda-url.eu-central-1.on.aws
## Requesting
Request JSON:
The only required parameter is `stylesheet`
```json
{
"stylesheet": "CSS",
// Minify the CSS (default true)
"minify": true,
// CSS Target. Multiply version with 65536
"targets": {
"android": 0,
"chrome": 0,
"edge": 0,
"firefox": 0,
"ie": 0,
"ios_saf": 0,
"opera": 0,
"safari": 0,
"samsung": 0
},
// Or targets as browserlist format
"browserlist": "chrome: >= 100\nfirefox: >= 100"
// Support for https://www.w3.org/TR/mediaqueries-5/
"custom_media_queries": true,
// Enable CSS nesting support
"css_nesting": true
}
```
Output JSON:
```json
{
"compiled": "....."
}
```