Skip to content

feat(framework): ship @ui5/webcomponents-base/dist/FontFace.css#13018

Open
ilhan007 wants to merge 4 commits intomainfrom
feat-ship-font-css
Open

feat(framework): ship @ui5/webcomponents-base/dist/FontFace.css#13018
ilhan007 wants to merge 4 commits intomainfrom
feat-ship-font-css

Conversation

@ilhan007
Copy link
Contributor

@ilhan007 ilhan007 commented Feb 4, 2026

Related to: #12898

Summary

Ships a standalone FontFace.css file in@ui5/webcomponents-base/dist/ that allows consumers to load UI5 fonts via CSS.

Motivation:

  • Avoid cross-origin issues with CDN-based font loading

What's included:

  • dist/FontFace.css - Contains @font-face declarations with npm
    package paths (resolved by bundlers)
  • src/generated/css/FontFace.css.ts - Existing file with CDN
    URLs (used by default JS-based loading)

Usage:

Disable default font loading and load fonts manually.

  • Import it in your application entry point (css or js):
// In your main.ts 
import "@ui5/webcomponents-base/dist/FontFace.css";

or

/* In your main.css */
@import "@ui5/webcomponents-base/dist/FontFace.css";
  • Disable default Font Loading
// In your main.ts 
  import { setDefaultFontLoading } from
  "@ui5/webcomponents-base/dist/config/Fonts.js";
  setDefaultFontLoading(false);

@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Feb 4, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 4, 2026 11:26 Inactive
@ilhan007 ilhan007 changed the title feat(framework): ship @ui5/webcomponents/dist/FontFace.css feat(base): ship @ui5/webcomponents/dist/FontFace.css Feb 4, 2026
@ilhan007 ilhan007 changed the title feat(base): ship @ui5/webcomponents/dist/FontFace.css feat(base): ship @ui5/webcomponents-base/dist/FontFace.css Feb 4, 2026
@ilhan007 ilhan007 changed the title feat(base): ship @ui5/webcomponents-base/dist/FontFace.css feat(framework): ship @ui5/webcomponents-base/dist/FontFace.css Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants