Remove font icon SVG asset#2157
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested labels
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
css/font_icons.css (1)
Line range hint
1-24: Consider documenting font usage and exploring modern alternatives.Since font icons aren't extensively used in the project, consider:
- Documenting the current font icon usage for future maintenance
- Evaluating modern alternatives like SVG icons or icon fonts with better browser support (e.g., woff2) for future updates
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
fonts/s11-fp.svgis excluded by!**/*.svg,!**/*.svg
📒 Files selected for processing (1)
css/font_icons.css(1 hunks)
🔇 Additional comments (1)
css/font_icons.css (1)
3-3: LGTM! Removal of SVG font source is safe.
The change to use only WOFF format is appropriate as:
- WOFF has excellent browser support
- SVG fonts are deprecated in modern browsers
Let's verify browser compatibility:
✅ Verification successful
Removal of SVG font source is safe and verified
The verification confirms:
- No other SVG font format references exist in the codebase
- Only two @font-face declarations are present:
- 's11-fp' using WOFF format
- 'Inter' using TTF format
- No browser compatibility issues or vendor prefixes are required
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for font-face usage across the codebase to ensure no SVG-specific dependencies
# Search for any SVG font references that might need updating
rg -g '*.{css,scss,less}' "format\('svg'\)"
# Search for browser compatibility comments or vendor prefixes related to fonts
rg -g '*.{css,scss,less}' "@font-face.*\{" -A 5
Length of output: 597
It looks like modern browsers all support the woff format, so we should be safe to drop the SVG.
This file is 230KB so the file size improvement is pretty significant.
Tested in Firefox, Chrome, Safari, and Opera.
The font icons aren't used in many places anymore, any that's continuing to shrink, so any possible issues would have a minimal impact.