-
Notifications
You must be signed in to change notification settings - Fork 1
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
[11 Nightly] :nth-last-child(1) Only evaluated once at runtime #22
Comments
@Mrcubix can you test AvaloniaUI/Avalonia#13770 ? should be in latest nightly |
Will do tomorrow |
Still broken in the reproducible repo, even more broken than it used to be. All last or used to be last elements now keep their nth-last-child class even after a new one is added, and that, is for a simple case. |
That's actually good news. It means it has now a logic we can follow and we know where in code to digg. 🙂 |
+1 |
Discussed in AvaloniaUI/Avalonia#12147
Originally posted by Mrcubix July 11, 2023
For some reasons, the selector
:nth-last-child(1)
seems to only be evaluated properly at first, any additions done after the Window is shown will result in an incorrect behavior.in this exemple, the last element is supposed to have a margin of 0, so that the scrollbar doesn't show up until another element is added.
the same behavior can be obtained using this repo: https://github.com/Mrcubix/Avalonia-Last-Nth-Child-Selector-Issue
Note that the orginal discussion was written in an earlier version, but the issue is still valid to this day
about the same styling works for
ItemsControl
, however,ItemsControl
suffer from a worse issue explained here #12137The text was updated successfully, but these errors were encountered: