Reproduction: https://github.com/sapphi-red-repros/lightningcss-filename-containing-nul-character (run npm i && npm start)
In this reproduction resolver.read is called with foo instead of foo\0bar.css which is the filename and what I expect.
Additional context
In Vite (and Rollup), module id can contain any characters and some times starts with \0 (which is a convention for virtual modules: modules that does not exist on file system). While Vite can escape \0 to something else and unescape it back when needed, it would be nice if Vite can just pass in ids containing \0 to the filename option.