feat(lightpanda): load linked stylesheets by default
Merged
CD
7d ago+27+27+01234567890123456789-10-10-01234567890123456789
What and why
lightpanda()loads linked stylesheets by default:loadResourcesdefaults to['stylesheet']instead of[]- Without them, Lightpanda computes styles from inline styles and
<style>blocks only: every rule from a linked.cssfile is missing - That changes what a test reads:
toBeVisibleandtoBeHidden, actions that wait for a visible node, the agent's screen tree, andgetComputedStylein the page or inevaluate - Lightpanda's own
mcpandagentmodes load stylesheets by default for the same reason (lightpanda-io/browser#3922) - A
loadResourceslist still replaces the default, as--load-resourcesdoes in Lightpanda;[]fetches none
Issue
None.
Verified
Ran it locally: yes
-
Playwright over CDP on Lightpanda 1.0.4, a link in a menu that a linked stylesheet hides with
.menu { display: none }:displayisVisible()click no stylesheets (today's default) blocktruegoes through --load-resources stylesheetnonefalsewaits for the link to be visible -
pnpm --filter @e2e-dev/lightpanda test:Tests 10 passed (10) -
test:lightpandainapps/testbed, twice each way on Lightpanda 1.0.4: the same 66 pass and 11 fail with and without stylesheets, about 46 s per run either way
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.