We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
style
postcss-html
1 parent 7db7174 commit 707f2d9Copy full SHA for 707f2d9
rules/properties-order/tests/flat.js
@@ -566,6 +566,15 @@ testRule({
566
</html>
567
`,
568
},
569
+ {
570
+ description: 'ignore top-level declarations in style tag',
571
+ code: `
572
+ <style>
573
+ color: tomato;
574
+ top: 0;
575
+ </style>
576
+ `,
577
+ },
578
],
579
580
reject: [
utils/getContainingNode.js
@@ -9,7 +9,7 @@ export function getContainingNode(node) {
9
}
10
11
// postcss-html `style` attributes: declarations are children of Root node
12
- if (node.parent?.document?.nodes?.some((item) => item.type === 'root')) {
+ if (node.parent?.source.inline === true) {
13
return node.parent;
14
15
0 commit comments