-
Notifications
You must be signed in to change notification settings - Fork 75
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
Error "Array to String conversion" when handling pseudo + attribute selector #606
Comments
Please provide an actual reproducing case. The code snippet you gave does not trigger any error when I run it. |
Reproducing case: :where(.uk-transition-fade),
:where([class*='uk-transition-scale']),
:where([class*='uk-transition-slide']) {
--uk-position-translate-x: 0;
--uk-position-translate-y: 0;
}
.a {
color: blue;
}
.b {
@extend .a;
} |
I tried to debug it, but our handling of selectors in 1.x is a huge mess and I did not manage to fix the issue. |
Hi, How can I get the SCSS which is resulting this error? Or how can I solve this? |
Updating from which version to which one ? |
@stof I upgrade it from 1.10.2 to 1.11.0. |
The problem may be are the child arrays and maybe this is the solution: add this function to scssphp/src/Compiler.php
and in function matchExtends use this new function instead of array_diff
|
I can confirm the error with scssphp v1.11.1 when trying to combine picoCss. The problematic line of code is the highlighted one: a:is([aria-current], :hover, :active, :focus),
The solution from @baggyownz works! |
@MDevster Please provide a reproducer of the issue. Taking only the code snippet you gave in your comment compiles without triggering the bug, so it is not a reproducer. |
Hi, I'm facing the same problem. Here is a reproducer: %heading {
margin-top: 0;
}
h1 {
@extend %heading;
}
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
} When I execute pcss from the command line with the given snippet, l get the warning:
Here are the values of
|
Had the same problem while using SASS placeholder selectors in my Typo3 v11.5.36 installation. Using the solution of @baggyownz worked: #606 (comment) Would be nice to get an official bugfix down the line. |
…o String conversion" warning when compiling UIKit
I tried to compile the latest uikit version but it fails hard with an error.
Problem is this type of selector:
To be more precise it's this at
transition.scss
:https://github.com/uikit/uikit/blob/87801983205aa9bb81a122c4e0f1b96b5117c169/src/scss/components/transition.scss#L51-L56
The error happens at
array_diff
which compares two incompatible nested array structures I guess:scssphp/src/Compiler.php
Lines 773 to 780 in c54b0a3
Debug:
The text was updated successfully, but these errors were encountered: