Skip to content

[css-mixins-1] Defining how results referring to a function should be handled #12304

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
Que-tin opened this issue Jun 8, 2025 · 2 comments

Comments

@Que-tin
Copy link

Que-tin commented Jun 8, 2025

How should results should be handled that return a custom-indent that might be a reference to another function?

First of how to properly type and return a dashed-function.

@function --x1() returns <number> {
  result: 2;
}

/* Is <custom-ident> or <dashed-function> the right data type? */
@function --x2() returns <custom-ident> {
  result: ident("x1");
}

/* What would I need to do to return a reference to a function without ident? */
@function --x3() returns <dashed-function> {
  result: --x1;
}

@function --x4() returns <dashed-function> {
  result: var(--x1);
}

And then how to use it

.x {
 /* Will this be possible? */
 --y: --x2()();

 /* Or do I need to do this? */
 --y: --x2();
 --z: --y();
}
@Que-tin Que-tin changed the title Defining how custom-indent results referring to a function should be handled [css-mixins-1] Defining how custom-indent results referring to a function should be handled Jun 8, 2025
@Que-tin
Copy link
Author

Que-tin commented Jun 8, 2025

@andruud Is that the proper way to explain the thing?

P.s. can't set labels, so label needs to be added.

@Que-tin Que-tin changed the title [css-mixins-1] Defining how custom-indent results referring to a function should be handled [css-mixins-1] Defining how results referring to a function should be handled Jun 8, 2025
@andruud
Copy link
Member

andruud commented Jun 10, 2025

We probably need a new arbitrary substitution function (call() ?) that takes a dashed-ident and invokes a function from that. This would be useful for the ident() function as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants