Repository navigation
fix(styling): drop @charset from the published CSS (v14) - #3431
Conversation
Sass prepends `@charset "UTF-8"` to any stylesheet with a non-ASCII character. Imported into a cascade layer, it ends up nested inside `@layer`, where it is an unknown at-rule that minifiers such as Lightning CSS warn about on every build. Build with `--no-charset` (and `charset: false` in the watch script), and keep the AI UI glyphs as CSS escapes so ai-components.css decodes right under any encoding. Closes #3423
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Size Change: -47 B (0%) Total Size: 1.33 MB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-v14 #3431 +/- ##
===============================================
+ Coverage 86.84% 87.45% +0.60%
===============================================
Files 526 592 +66
Lines 16699 20506 +3807
Branches 5251 6477 +1226
===============================================
+ Hits 14503 17934 +3431
- Misses 2196 2572 +376 β View full report in Codecov by Harness. π New features to boost your workflow:
|
## [14.17.0](v14.16.1...v14.17.0) (2026-11-11) ### Bug Fixes * **AIComponents:** add AIConversationController for agent conversations (v14) ([#3429](#3429)) ([1b67c7b](1b67c7b)), closes [#3428](#3428) [GetStream/stream-chat-react-native#3974](GetStream/stream-chat-react-native#3974) * **styling:** drop [@charset](https://github.com/charset) from the published CSS (v14) ([#3431](#3431)) ([6d0cf05](6d0cf05)), closes [#3423](#3423) ### Features * **AIMessageComposer:** add Actions, StopButton and an inline layout (v14) ([#3425](#3425)) ([cbc9f80](cbc9f80)), closes [#3424](#3424) [#3424](#3424) [#3424](#3424) [GetStream/getstream.io#1034](https://github.com/GetStream/getstream.io/issues/1034)
|
π This PR is included in version 14.17.0 π The release is available on: Your semantic-release bot π¦π |
Ticket: https://linear.app/stream/issue/REACT-1550
Closes #3423
Goal
Sass prepends
@charset "UTF-8";to any stylesheet whose output holds a non-ASCII character, which today isindex.css(curly quotes and an en dash in generated token comments) andai-components.css(the β and Γ glyphs of the A2UI and OpenUI badges). Apps that import the CSS into a cascade layer (@import 'stream-chat-react/dist/css/index.css' layer(stream);) end up with@charsetnested inside@layer, where it is an unknown at-rule, so Lightning CSS (Next.js 16 / Turbopack) prints a warning on every build. The rule is dropped either way; this removes the noise.Backport of the master fix to the v14 line, which the reporter is on (14.14.1). Same three changes.
Implementation details
build-stylingruns Sass with--no-charset, andscripts/watch-styling.mjspassescharset: falsesoyarn start:cssemits the same output._ai-ui-icons.scssare written withstring.unquote('"\\2713"')/string.unquote('"\\00d7"'). Sass would otherwise turn the'\2713'escape back into the literal character, so without@charsetthe glyphs would render right only when the file is decoded as UTF-8. The output is nowcontent: "\2713"/content: "\00d7", which is encoding-independent. The remaining non-ASCII characters inindex.cssare inside comments and do not affect rendering.@charset, andai-components.csscarries the escapes instead of the raw glyphs. Bundlers already hoist or strip@charset, so apps that do not use layers see no change.UI Changes
None. The badge glyphs render the same.