From 88938aeaf2ef7b64389706977c8e4edbf4968618 Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Thu, 24 Sep 2026 17:20:57 +0300 Subject: [PATCH] fix: keep pseudo-element rules that can't be inlined Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 4 ++-- lib/inline.js | 5 ++++- test/juice.test.js | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3f0481e..d69357e 100644 --- a/README.md +++ b/README.md @@ -157,9 +157,9 @@ Note that `codeBlocks` is a dictionary which can contain many different code blo #### juice.ignoredPseudos Type: Array\ -Default: `['hover', 'active', 'focus', 'visited', 'link']` +Default: `['hover', 'active', 'focus', 'visited', 'link', 'first-letter', 'first-line', 'marker', 'selection', 'placeholder']` -Array of ignored pseudo-selectors such as 'hover' and 'active'. +Array of ignored pseudo-selectors such as 'hover' and 'active'. Rules that use them can't be inlined, so they're kept in a `

abc

`; + + it.each([ + 'h3::first-letter { color: red; }', + 'h3:first-letter { color: red; }', + 'h3::first-line { color: red; }', + 'h3:first-line { color: red; }', + 'h3::marker { color: red; }', + 'h3::selection { color: red; }', + 'h3::placeholder { color: red; }', + ])('keeps %s in a

abc

'); + }); +});