Fix support of CSS nesting (Non-transparent backgrounds on some sites were not saved correctly)
Describe the bug Non-transparent backgrounds on some sites were not saved correctly. The screenshot shows the top bar and semi-transparent backgrounds missing, despite enabling hidden elements and scripts in the configuration.
To Reproduce Steps to reproduce the behavior:
- Go to 'http://symphonysounds.net/ssreq3/'
- Try enabling and disabling the retention of hidden elements and scripts.
- Save them.
- Check the result.
Screenshots
The top is the original website, and the bottom is the saved page (as seen in the URL bar).
Environment
- OS: Windows 10 24H2
- Browser: Firefox
- Version: 134.0.2 (64 bits)
Thank you for the detailed report. I confirm I was able to reproduce the issue. This is due to a technical limitation when trying to optimize the stylesheets. I should be able to fix it though. Meanwhile, you can circumvent the issue by disabling the option "Stylesheets > remove unused styles".
Thank you for the detailed report. I confirm I was able to reproduce the issue. This is due to a technical limitation when trying to optimize the stylesheets. I should be able to fix it though. Meanwhile, you can circumvent the issue by disabling the option "Stylesheets > remove unused styles".
Thanks for your reply. I unchecked that option, but the issue remains:
- Some white backgrounds are missing. (See the screenshot: the top shows the original page, the bottom shows the saved page.)
- Before saving, I unchecked "Block Scripts" in Options -> Network. Opening the saved page makes Firefox use over 20GB of memory, crashing Windows 11.
Screenshots:
@tglsf Thank you for the feedback. I confirm the issue. I did not notice the missing white background. For the record, this bug is related to this feature which is quite recent: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors/Selectors_and_combinators#creating_complex_selectors_with_css_nesting
For the record, this issue is related to https://github.com/csstree/csstree/issues/268.
It can be reproduced by running the code below which returns body{> section #release {... instead of body{> section#release {... (cf. space between section and #release).
csstree.generate(csstree.parse(`
body {
> section#release {
.release-box { }
}
}
`));
This issue is fixed. The fix will be available in the next version of SingleFile.