SingleFile CLI 2.15.5
Changes
- single-file-core is updated to 1.6.10, see https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.10. It carries 28 commits, most of them in the cascade calculation behind
--remove-unused-styles, and for the CLI it means the following - Archives written with
--compress-contentare smaller. A stylesheet is stored once per content, so several<link>elements resolving to the same CSS share one file whatever URL each came from, and an@importchain is merged from the leaves up; over 24 real pages that is 736 stylesheet files down to 263, and 3.2 MB less CSS for the browser to parse when the archive is opened. The images SingleFile generates itself are stored as files instead of being inlined as data URIs: the snapshot it takes of a video frame for a poster, the icon beside a blocked video, and the bitmap of a<canvas> - An archive unzipped and opened from disk no longer loses stylesheets whose
<link>carriescrossorigin, which a browser refuses to fetch as a siblingfile://resource. On a capture of a GitHub page that was all 29 of its 29 links - Rules that used to disappear from the saved page are kept: a nested selector such as
& + &written under a selector list, a vendor-prefixed value like-webkit-linear-gradient(red, blue), a selector escaped or capitalised in a way the comparison did not recognise, and a rule whose protection was miscalculated inside:not(),:has()or:nth-child(... of ...) - Rules that used to win when they should not no longer do: a standalone
@starting-styleblock left elements in their before-transition state, a sublayer outranked its parent layer's own declarations, two anonymous@layer {}blocks were treated as one, several shapes ofrevert-layerrolled back to the wrong declaration, and@scoperoots were resolved from the wrong element - An
@importinlined into the page keeps the cascade layer and thesupports()condition it was written under, instead of applying unconditionally and ahead of the layers it was meant to sit inside - An iframe saved as
srcdockeeps an emptysrc, so a page stylingiframe:not([src]) { display: none }no longer hides a frame the live page showed - Re-capturing a page SingleFile had already saved no longer changes which elements the structural pseudo-classes match
--remove-unused-stylesis faster, which is most visible on the pages where it was slowest
Co-authored by Claude (Claude Code)