Framework updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-03-04 23:20:19 +00:00
parent a89daf3d43
commit 3ed8517b2a
891 changed files with 11126 additions and 9600 deletions

View File

@@ -7,7 +7,11 @@ import {
} from './_collections.js';
import { detachNodeFromParent } from '../lib/xast.js';
import { visitSkip } from '../lib/util/visit.js';
import { collectStylesheet, computeStyle } from '../lib/style.js';
import {
collectStylesheet,
computeStyle,
includesAttrSelector,
} from '../lib/style.js';
/**
* @typedef RemoveUnknownsAndDefaultsParams
@@ -192,7 +196,12 @@ export const fn = (root, params) => {
attributesDefaults.get(name) === value
) {
// keep defaults if parent has own or inherited style
if (computedParentStyle?.[name] == null) {
if (
computedParentStyle?.[name] == null &&
!stylesheet.rules.some((rule) =>
includesAttrSelector(rule.selector, name),
)
) {
delete node.attributes[name];
}
}