parcel-bundler / parcel-bundler/lightningcss
Support transforming oklab/oklch functions with variables in alpha value
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
For example:
.text-red-200 {
--tw-text-opacity: 1;
color: oklch(92.19% 0.04 20 / var(--tw-text-opacity));
}
can be transpiled to something like this: (similar to how postcss-oklab-function does)
.text-red-200 {
--tw-text-opacity: 1;
color: rgba(255, 219, 218, var(--tw-text-opacity));
}
@supports (color: color(display-p3 0 0 0)) and (top: var(--f)) {
.text-red-200 {
color: color(display-p3 0.9775 0.86513 0.8587 / var(--tw-text-opacity));
}
}
@supports (color: oklch(0% 0 0)) and (top: var(--f)) {
.text-red-200 {
color: oklch(92.19% 0.04 20 / var(--tw-text-opacity));
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the requested transformation with the linked postcss-oklab-function behavior and reproduce the CSS example in lightningcss. Done means oklab/oklch colors with a variable alpha value produce the requested fallback and conditional color() and oklch rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- compilers, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100