Skip to content

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

* Add missing color operand support to resolve issue less#4343.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 18, 2025
@puckowski
Copy link
Contributor Author

Prior comments from #4344 :

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.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 12, 2025
@matthew-dean matthew-dean merged commit f086c79 into less:master Jul 12, 2025
14 checks passed
@puckowski puckowski mentioned this pull request Jul 12, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants