fix(icons): render brand icons under the fa fab double prefix and drop an empty sprite key

FA5's own single-class declarations lose the cascade to the later
.fa,.far,.fas family rule, so zibll-legacy values like "fa fab fa-weixin"
rendered with the Free font and came up blank — visible in the picker's
brand tab (500px…zhihu) and on every brand icon in the SPA and frontend
social links. Re-assert .fa.fab (and .fa.far weight) in the three
stylesheets that load FA5. Also remove the empty aksrt_svgs['qqww']
sprite entry, which surfaced as a blank built-in SVG item.
This commit is contained in:
2026-09-06 13:31:24 +08:00
parent 5e2cc7b56a
commit 7ab5f29f87
6 changed files with 27 additions and 1 deletions
@@ -90,6 +90,16 @@ test('FA5 loads under a single canonical handle everywhere', () => {
}
});
test('brand icons render despite the zibll-legacy fa-fab double prefix', () => {
const rule = /\.fa\.fab\{font-family:"Font Awesome 5 Brands";font-weight:400\}/;
for (const file of ['assets/css/main.css', 'assets/css/admin-icon-picker.css', 'assets/admin/src/style.css']) {
assert.match(read(file), rule, `${file} re-asserts the brand family`);
}
assert.match(read('assets/css/main.min.css'), rule, 'minified main css carries the fix');
// Empty sprite entries surface as blank picker items — none may ship.
assert.doesNotMatch(read('assets/js/runtime/svg-icon.js'), /aksrt_svgs\['[a-zA-Z0-9_]+'\]\s*=\s*'';/);
});
test('icon assets are consolidated and dead icon assets are gone', () => {
for (const file of ['assets/icons/upload-add.svg', 'assets/icons/default-favicon.svg', 'assets/icons/default-logo.svg', 'assets/icons/playing.svg', 'assets/icons/user-certification.svg']) {
assert.ok(fs.existsSync(path.join(root, file)), `${file} exists`);