Repository navigation
fix(styling): drop @charset from the published CSS - #3430
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
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Size Change: -2.11 kB (-0.2%) Total Size: 1.07 MB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3430 +/- ##
==========================================
+ Coverage 90.38% 90.41% +0.03%
==========================================
Files 633 633
Lines 20512 20512
Branches 6451 6451
==========================================
+ Hits 18539 18546 +7
+ Misses 1973 1966 -7 β View full report in Codecov by Harness. π New features to boost your workflow:
|
## [15.0.1](v15.0.0...v15.0.1) (2026-11-11) ### Bug Fixes * **AIComponents:** add AIConversationController for agent conversations ([#3428](#3428)) ([b6793a2](b6793a2)), closes [GetStream/stream-chat-react-native#3974](GetStream/stream-chat-react-native#3974) * **AIMessageComposer:** add Actions, StopButton and an inline layout ([#3424](#3424)) ([b65bfa6](b65bfa6)), closes [GetStream/getstream.io#1034](https://github.com/GetStream/getstream.io/issues/1034) * **styling:** drop [@charset](https://github.com/charset) from the published CSS ([#3430](#3430)) ([be9a3aa](be9a3aa)), closes [#3423](#3423) * **VirtualizedMessageList:** clear a jump's highlight once the message was viewed ([#3420](#3420)) ([d2c1796](d2c1796))
|
π This PR is included in version 15.0.1 π 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.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.
Summary by CodeRabbit