Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

last 2 major versions
not dead
Chrome >= 120
# Floors set to the first versions with native CSS `light-dark()` (and nesting),
# so Lightning CSS no longer lowers them to the brittle custom-property polyfill
# that broke `data-bs-theme` dark mode.
Chrome >= 123
Edge >= 123
Firefox >= 121
iOS >= 15.6
Safari >= 15.6
not Explorer <= 11
iOS >= 17.5
Safari >= 17.5
not kaios <= 2.5 # fix floating label issues in Firefox (see https://github.com/postcss/autoprefixer/issues/1533)
8 changes: 6 additions & 2 deletions build/css-minify.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import fs from 'node:fs'
import path from 'node:path'
import { transform, browserslistToTargets } from 'lightningcss'
import { transform, browserslistToTargets, Features } from 'lightningcss'

const distDir = path.join(process.cwd(), 'dist/css')

Expand Down Expand Up @@ -48,7 +48,11 @@ for (const file of cssFiles) {
minify: true,
sourceMap: true,
inputSourceMap: inputMap ? JSON.stringify(inputMap) : undefined,
targets
targets,
// Never lower `light-dark()`: its custom-property polyfill breaks our
// `data-bs-theme` dark mode. We bumped browser support to versions with
// native support to fix this, but this guards against a regression.
exclude: Features.LightDark
})

// Write minified CSS with source map reference
Expand Down