mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
ba3e528e4b
* 🐛 fix(user-panel): make the popover padding override order-independent `classNames.content` maps to the base-ui viewport, whose padding is set with `padding-block` / `padding-inline` longhands. The shorthand `padding: 0` only won because dev-mode module order inserted it last; production chunking flips that and the 12px padding comes back. Claude-Session: https://claude.ai/code/session_0136deq4gr2Pbe1cEYJHi1v8 * 🐛 fix(vite): preserve precompiled style composition order
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
import { styleManager } from 'antd-style';
|
|
|
|
const cache = styleManager.cache;
|
|
const prefixLength = cache.key.length + 1;
|
|
|
|
export const insertPrecompiledStyle = (className, rules, registered) => {
|
|
const name = className.slice(prefixLength);
|
|
if (cache.inserted[name] === undefined) {
|
|
for (const rule of rules) cache.sheet.insert(rule);
|
|
cache.inserted[name] = true;
|
|
}
|
|
cache.registered[className] = registered;
|
|
return className;
|
|
};
|