mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix(flags): render flag emoji on Windows globally via a scoped flag font
Windows ships no glyphs for regional-indicator flag emoji, so flags fell back to country letters everywhere react-twemoji wasn't manually wrapped. Bundle the Twemoji country-flags woff2 locally (no runtime CDN — matters for our audience) and add it as an @font-face scoped with unicode-range to flag codepoints only, then put it first in every Tailwind font stack (sans/display/mono). The browser now uses it solely for flag characters, so every flag renders correctly app-wide with zero markup changes and no effect on any other text.
This commit is contained in:
@@ -2,6 +2,18 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* Flag emoji polyfill — Windows has no glyphs for regional-indicator flags, so
|
||||
they fall back to country letters. This locally-bundled Twemoji flag font is
|
||||
scoped via unicode-range to ONLY flag codepoints, so adding it to the front
|
||||
of the font stacks fixes every flag everywhere without touching any markup
|
||||
and without affecting any other text. Root fix, not a per-component wrap. */
|
||||
@font-face {
|
||||
font-family: 'Twemoji Country Flags';
|
||||
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F;
|
||||
src: url('/fonts/TwemojiCountryFlags.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
/* Animated gradient border — @property enables CSS-only angle animation */
|
||||
@property --border-angle {
|
||||
syntax: '<angle>';
|
||||
|
||||
Reference in New Issue
Block a user