Skip to content

Conversation

@Gaubee
Copy link

@Gaubee Gaubee commented Apr 21, 2025

getPlaceholder now supports "strict mode" (return string[]), whereas it originally return string ("loose mode").
This better supports CSSminify.
The following CSS-Template-Literals syntax patterns are supported:

1. selector
${selector} {
}

2. key
selector {
  ${key}: value;
}

3. rule
[selector {}]
${rule}
[selector {}]

4. number-literal
selector{
  key: ${param}px;
}

5. value
selector {
  key: ${value};
  key: ${value}
}

6. param
selector{
  key: fun(${param}[, ${param}]);
}

eg:

css`:host{
  ${"width"}: ${10}px;
}`;
css`:host{
  ${"width"}: calc(${10}px + ${"var(--data)"});
}`;

Gaubee added 2 commits April 21, 2025 17:11
getPlaceholder now supports "strict mode" (return `string[]`), whereas it originally returne `string` ("loose mode").
This better supports CSSminify.
The following Template literals syntax patterns are supported:
```
1. selector
${selector} {
}

2. key
selector {
	 ${key}: value;
}

3. rule
[selector {}]
${rule}
[selector {}]

4. number-literal
selector{
  key: ${param}px;
}

5. value
selector {
	 key: ${value};
	 key: ${value}
}

6. param
selector{
  key: fun(${param}[, ${param}]);
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant