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

Merged
kate522 merged 1 commits from worktree/icon-picker into main 2026-09-06 05:35:05 +00:00
6 changed files with 27 additions and 1 deletions
+5
View File
@@ -533,3 +533,8 @@
transition-duration: .01ms !important;
}
}
/* zibll-legacy "fa fab / fa far" double-prefix beats FA5's own single-class
declarations in the cascade — re-assert the brand family/regular weight. */
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
.fa.far{font-weight:400}
+5
View File
@@ -193,3 +193,8 @@
flex: 1 1 160px;
min-width: 0;
}
/* zibll-legacy "fa fab / fa far" double-prefix beats FA5's own single-class
declarations in the cascade — re-assert the brand family/regular weight. */
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
.fa.far{font-weight:400}
+6
View File
@@ -14217,3 +14217,9 @@ body.error404 {
/*--------------OVER---over---------OVER---over---------OVER---over---------OVER---over-----------*/
/*--------------FA5 family-prefix compatibility---------FA5 family-prefix compatibility-------------*/
/* zibll-legacy "fa fab / fa far" double-prefix values beat FA5's own single-class
declarations in the cascade, blanking brand icons and bolding regular ones. */
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
.fa.far{font-weight:400}
+1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -114,7 +114,6 @@ aksrt_svgs['yidongyun'] = '<path d="M1020.16 266.88c-44.16 11.52-88.32 21.12-133
aksrt_svgs['translate'] = '<path d="M938.666667 981.333333c-17.066667 0-29.866667-8.533333-38.4-25.6l-59.733334-119.466666h-277.333333l-59.733333 119.466666c-8.533333 21.333333-34.133333 29.866667-55.466667 17.066667-25.6-8.533333-34.133333-34.133333-21.333333-51.2l72.533333-140.8 145.066667-290.133333c12.8-21.333333 34.133333-38.4 59.733333-38.4s46.933333 12.8 59.733333 38.4l145.066667 290.133333 72.533333 140.8c8.533333 21.333333 0 46.933333-17.066666 55.466667-12.8 4.266667-17.066667 4.266667-25.6 4.266666z m-332.8-226.133333h192l-98.133334-192-93.866666 192zM85.333333 844.8c-17.066667 0-29.866667-8.533333-38.4-25.6-8.533333-21.333333 0-46.933333 21.333334-55.466667 93.866667-46.933333 179.2-110.933333 247.466666-187.733333-46.933333-64-85.333333-128-110.933333-192-8.533333-21.333333 4.266667-46.933333 25.6-55.466667 21.333333-8.533333 46.933333 4.266667 55.466667 25.6 21.333333 51.2 46.933333 102.4 81.066666 149.333334 59.733333-85.333333 102.4-179.2 128-281.6H85.333333c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666667h243.2V85.333333c0-25.6 17.066667-42.666667 42.666667-42.666666s42.666667 17.066667 42.666667 42.666666v51.2h238.933333c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666667h-68.266667c-25.6 128-85.333333 247.466667-162.133333 349.866666l25.6 25.6c17.066667 17.066667 17.066667 42.666667 0 59.733334-17.066667 17.066667-42.666667 17.066667-59.733333 0l-17.066667-17.066667c-72.533333 81.066667-162.133333 149.333333-264.533333 200.533333-8.533333 0-17.066667 4.266667-21.333334 4.266667z"></path>';
aksrt_svgs['google-color'] = '<path d="M214.101333 512c0-32.512 5.546667-63.701333 15.36-92.928L57.173333 290.218667A491.861333 491.861333 0 0 0 4.693333 512c0 79.701333 18.858667 154.88 52.394667 221.610667l172.202667-129.066667A290.56 290.56 0 0 1 214.101333 512" fill="#FBBC05"></path><path d="M516.693333 216.192c72.106667 0 137.258667 25.002667 188.458667 65.962667L854.101333 136.533333C763.349333 59.178667 646.997333 11.392 516.693333 11.392c-202.325333 0-376.234667 113.28-459.52 278.826667l172.373334 128.853333c39.68-118.016 152.832-202.88 287.146666-202.88" fill="#EA4335"></path><path d="M516.693333 807.808c-134.357333 0-247.509333-84.864-287.232-202.88l-172.288 128.853333c83.242667 165.546667 257.152 278.826667 459.52 278.826667 124.842667 0 244.053333-43.392 333.568-124.757333l-163.584-123.818667c-46.122667 28.458667-104.234667 43.776-170.026666 43.776" fill="#34A853"></path><path d="M1005.397333 512c0-29.568-4.693333-61.44-11.648-91.008H516.650667V614.4h274.602666c-13.696 65.962667-51.072 116.650667-104.533333 149.632l163.541333 123.818667c93.994667-85.418667 155.136-212.650667 155.136-375.850667" fill="#4285F4"></path>';
aksrt_svgs['apple'] = '<path d="M905.758118 784.564706c-14.757647 34.093176-32.225882 65.475765-52.464942 94.32847-27.587765 39.333647-50.176 66.56-67.584 81.679059-26.985412 24.816941-55.898353 37.526588-86.859294 38.249412-22.226824 0-49.031529-6.324706-80.233411-19.154823-31.304282-12.769882-60.072659-19.094588-86.377412-19.094589-27.587765 0-57.175341 6.324706-88.822965 19.094589-31.695812 12.830118-57.229553 19.516235-76.751812 20.178823-29.689976 1.264941-59.283576-11.806118-88.822964-39.273412-18.853647-16.444235-42.435765-44.634353-70.686118-84.570353-30.3104-42.646588-55.229741-92.099765-74.752-148.48-20.907671-60.897882-31.388612-119.868235-31.388612-176.959247 0-65.397459 14.1312-121.801788 42.435765-169.068423 22.244894-37.966306 51.838494-67.915294 88.877176-89.901177s77.059012-33.189647 120.157365-33.906447c23.582118 0 54.506918 7.294494 92.937035 21.630494 38.321694 14.384188 62.927812 21.678682 73.715953 21.678683 8.065506 0 35.400282-8.529318 81.739294-25.533741 43.821176-15.7696 80.805647-22.299106 111.104-19.727059 82.100706 6.625882 143.781647 38.990306 184.801883 97.29807-73.426824 44.489788-109.748706 106.8032-109.025883 186.741459 0.662588 62.265224 23.250824 114.079624 67.644236 155.22033 20.118588 19.094588 42.586353 33.852235 67.584 44.333176-5.421176 15.721412-11.143529 30.780235-17.227294 45.236706zM717.462588 43.610353c0 48.802635-17.829647 94.370635-53.36847 136.547388-42.887529 50.139859-94.762165 79.113035-151.015906 74.541177a151.925459 151.925459 0 0 1-1.132424-18.492236c0-46.851012 20.395671-96.990871 56.615153-137.987011 18.082635-20.757082 41.080471-38.014494 68.969412-51.784283 27.828706-13.564988 54.151529-21.064282 78.908235-22.347294 0.722824 6.523482 1.024 13.046965 1.024 19.516235z"></path>';
aksrt_svgs['qqww'] = '';
function show_svg() {
jQuery('[data-svg]').each(function () {
@@ -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`);