Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CSS backdrop-filter property disappear in Next.js 15.3.0/15.3.1 dev mode with Turbopack #78302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RoversX opened this issue Apr 18, 2025 · 5 comments
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. CSS Related to CSS. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Comments

@RoversX
Copy link

RoversX commented Apr 18, 2025

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/sweet-lumiere-s7v6jh

To Reproduce

npm run dev

and use chromium core

The backdrop-filter issue specifically occurs in Next.js 15.3.0 and later versions when using Turbopack (next dev --turbo). The problem arises when the CSS properties are ordered with the -webkit-backdrop-filter prefix first, followed by the standard backdrop-filter, like this: -webkit-backdrop-filter: blur(Xpx); backdrop-filter: blur(Xpx);. In this specific ordering under Turbopack, the standard backdrop-filter: blur(Xpx); declaration effectively disappears or is ignored during processing, preventing the blur effect from rendering in non-WebKit browsers. Reversing this order or running without Turbopack resolves the issue.

The current solution is to roll back to nextjs 15.2.5

Current vs. Expected behavior

Current behavior:

When running a Next.js 15.3.0+ project in development mode with Turbopack (next dev --turbo), and CSS is written with the -webkit-backdrop-filter property declared before the standard backdrop-filter property, the standard backdrop-filter rule is seemingly ignored or removed during processing. This results in the blur effect not being applied in browsers that rely on the standard property (like Firefox and modern Chrome/Edge), even though the -webkit- prefixed version might still be present in the processed CSS. The visual effect is that the element has its semi-transparent background, but the content behind it is not blurred.

Expected behavior:

Regardless of whether Turbopack is used or the order in which -webkit-backdrop-filter and backdrop-filter are declared in the source CSS, the Next.js development server should process the CSS correctly, ensuring that both the prefixed and standard properties are output if needed for the target browsers. The visual expectation is that the backdrop-filter: blur() effect should render correctly in all supporting browsers, blurring the content behind the element, consistent with the behavior in production builds or when next dev without Turbopack is used, or with previous Next.js versions (like 15.2.5.2.ehavior in production builds or when next dev without Turbopack is used, or with previous Next.js versions (like 15.2.x) even when using Turbopack.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 23.11.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.8.1
Relevant Packages:
  next: 15.3.1 // Latest available version is detected (15.3.1).
  eslint-config-next: 15.1.0
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app, Turbopack, CSS

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Image
@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. CSS Related to CSS. Turbopack Related to Turbopack with Next.js. labels Apr 18, 2025
@RoversX
Copy link
Author

RoversX commented Apr 18, 2025

Seems similar to this parcel-bundler/lightningcss#850

@mjulstein
Copy link
Contributor

mjulstein commented Apr 22, 2025

I am experiencing inconsistencies with CSS modules and what would come out of webpack.

One of the recent bugs I have come over, and I think this has to be experienced on a local computer, is that if I edit CSS inside a CSS module after the initial content has been SSR'ed the rendered output does not change until I hard-reload the page. (Making it very cumbersome to see live updates of CSS changes).
Other times the CSS module may not be used at all during SSR, maybe there is a limit to how much CSS can be processed?
The latter I worked around somehow by making the CSS module part of a layout file.
I believe it worked fine before 15.3.0. (15.3.1 did not fix anything for me)

@timneutkens
Copy link
Member

Had a look into this and it's indeed a LightningCSS issue.
Here's what I found so far:

@timneutkens timneutkens added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Apr 30, 2025
@RoversX
Copy link
Author

RoversX commented Apr 30, 2025

Had a look into this and it's indeed a LightningCSS issue. Here's what I found so far:

Yeah, I guess we either have to wait for a fix or go back to the old version first until it is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. CSS Related to CSS. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

4 participants
@timneutkens @mjulstein @RoversX and others