Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 449dfad

Browse files
web-padawanvaadin-bot
authored andcommittedOct 18, 2024·
fix: handle backslash in font-icons when generating CSS (#266)
1 parent ef2a1fe commit 449dfad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎scripts/css-generator.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ function shimThemableMixin(moduleId: string) {
164164
return shimModule(themableMixin, {
165165
...themableMixinModule,
166166
css(strings: readonly string[], ...values: ReadonlyArray<CSSResult | number>) {
167-
return new CSSResult(moduleId, strings, values);
167+
const result: readonly string[] = moduleId.endsWith('font-icons.js')
168+
? strings.map((string) => string.replace(/'\\\\([a-z0-9]+)'/g, "'\\$1'"))
169+
: strings;
170+
return new CSSResult(moduleId, result, values);
168171
},
169172
registerStyles() {},
170173
unsafeCSS,

0 commit comments

Comments
 (0)