-
-
Notifications
You must be signed in to change notification settings - Fork 986
Labels
status: blockedis blocked by another issue or pris blocked by another issue or prupstreamrelates to an upstream packagerelates to an upstream package
Description
What minimal example or steps are needed to reproduce the bug?
[data-cursor] {
cursor: attr(data-cursor type(<custom-ident>), default);
}
[data-anchor] {
anchor-name: attr(data-anchor type(<custom-ident>));
}
[data-landmark] {
view-transition-name: attr(data-landmark type(<custom-ident>));
}What minimal configuration is needed to reproduce the bug?
{
"rules": {
"declaration-property-value-no-unknown": true
}
}How did you run Stylelint?
Which Stylelint-related dependencies are you using?
{
"stylelint": "16.24.0"
}What did you expect to happen?
No problems to be reported.
What actually happened?
The following problems were reported:
example.css
2:10-57 error Cannot parse property value "attr(data-cursor type(<custom-ident>), default)" for property "cursor" (declaration-property-value-no-unknown)
6:15-53 error Cannot parse property value "attr(data-anchor type(<custom-ident>))" for property "anchor-name" (declaration-property-value-no-unknown)
10:24-64 error Cannot parse property value "attr(data-landmark type(<custom-ident>))" for property "view-transition-name" (declaration-property-value-no-unknown)
Additional Info
For content property, it only supports the fallback value and the unit, but does not support the type. For example:
::after {
/* The following rules are valid. */
content: attr(data-content, "fallback");
content: attr(data-content raw-string);
/* The following rules will report errors. */
content: attr(data-content type(<string>));
content: attr(data-content type(*));
}Do you have a proposal to fix the bug?
Update syntax in CSSTree.
Sorry, I don't know how to extend the syntax myself using the languageOptions configuration property to support new syntax of attr() of every properties. Can you help me?
Metadata
Metadata
Assignees
Labels
status: blockedis blocked by another issue or pris blocked by another issue or prupstreamrelates to an upstream packagerelates to an upstream package