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:
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user