Try adding flags to make chrome's rendering consistent

This commit is contained in:
David Baker 2026-02-03 17:44:28 +00:00
parent 510365c96b
commit 3ac2f87e08

View File

@ -89,6 +89,20 @@ export default defineConfig({
enabled: true,
headless: true,
provider: playwright({ contextOptions: { reducedMotion: "reduce" } }),
providerOptions: {
launch: {
args: [
'--disable-gpu', // Disables GPU hardware acceleration. If software renderer is not in place, then the GPU process won't launch.
'--disable-gpu-rasterization', // Disable GPU rasterization, i.e. rasterize on the CPU only. Overrides the kEnableGpuRasterization flag.
'--disable-gpu-compositing', // Prevent the compositor from using its GPU implementation.
'--disable-font-subpixel-positioning', // Force disables font subpixel positioning. This affects the character glyph sharpness, kerning, hinting and layout.
'--disable-software-rasterizer', // Disables the use of a 3D software rasterizer. (Necessary to make --disable-gpu work)
'--ppapi-subpixel-rendering-setting=0', // The enum value of FontRenderParams::subpixel_rendering to be passed to Ppapi processes.
'--force-device-scale-factor=1', // Overrides the device scale factor for the browser UI and the contents.
'--force-color-profile=srgb', // Force all monitors to be treated as though they have the specified color profile.
],
}
},
instances: [{ browser: "chromium" }],
},
setupFiles: [".storybook/vitest.setup.ts"],