Skip to content

build(codicons): inline font via postcss-url, drop vendored css#780

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inline-codicon-font
May 22, 2026
Merged

build(codicons): inline font via postcss-url, drop vendored css#780
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inline-codicon-font

Conversation

@lukecotter
Copy link
Copy Markdown
Contributor

📝 PR Overview

Replace the 2000-line vendored codicon.css copy with a direct import of @vscode/codicons/dist/codicon.css, and use postcss-url to inline the codicon.ttf font as a base64 data URI inside the bundled CSS. This removes a manual copy step and keeps the codicon assets in sync with the upstream package.

🛠️ Changes made

  • Import @vscode/codicons/dist/codicon.css directly in components and delete the vendored log-viewer/src/styles/codicon.css
  • Add postcss-url plugin (url: 'inline', base64) to rolldown.config.ts and rollup.config.mjs so the @font-face url for codicon.ttf is inlined into the bundled CSS
  • Simplify LogView.ts webview HTML substitution to bundle.js only; ${extensionRoot} is no longer needed now that the font is inlined
  • Reformat log-viewer/index.html (prettier) and drop the now-dead @font-face block

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

No visual change — codicons render identically; this is a build/packaging change.

🔗 Related Issues

n/a

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🙅 not needed

Anything else we need to know? [optional]

Manual smoke: open a log in the webview and confirm codicons (toolbar, nav, find widget, tabs) render with no missing-glyph boxes and no separate codicon.ttf request in the network panel.

…red css

- import `@vscode/codicons/dist/codicon.css` directly in components and drop the 2000-line
vendored copy in log-viewer/src/styles/codicon.css
- add postcss-url plugin (url: 'inline', base64) to rolldown/rollup configs so the codicon.ttf
@font-face url is bundled into the css, removing the separate copy step for codicon.ttf
- simplify LogView.ts webview html substitution to bundle.js only; ${extensionRoot} is no
longer referenced now that the font is inlined
- reformat log-viewer/index.html (prettier) and drop the now-dead @font-face block
@lcottercertinia lcottercertinia merged commit 68e70ac into certinia:main May 22, 2026
5 checks passed
@lukecotter lukecotter deleted the feat-inline-codicon-font branch May 22, 2026 13:29
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