Skip to content

fix(issue#4343) add color operands #4344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

puckowski
Copy link
Contributor

What:

Add missing color operand support to resolve issue #4343.

Currently the following Less:

background: oklch(from #0000FF calc(l + 0.1) c h);

results in the following error:

Error: Could not parse call arguments or missing ')'

because color components are not being detected as valid operands for an Operation. This PR resolves that issue and also adds tests for oklch, rgb, and hsl.

Why:

Using color components as an operand is valid and should be supported.

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 23, 2025
@matthew-dean
Copy link
Member

This looks good. I wonder a bit if Less should actually calculate the final value, since the color is static in this case (not from a var(), but I think actually it's fine how it is.

@puckowski puckowski closed this May 31, 2025
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 31, 2025
* Update files for Revlease/v4.4.0
@puckowski puckowski reopened this Jun 1, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 1, 2025
@puckowski puckowski mentioned this pull request Jun 1, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants