Merge branch 'main' into next

# Conflicts:
#	package.json
#	scripts/release/yarn.lock
#	src/language-css/parser-postcss.js
#	src/language-css/printer-postcss.js
#	src/language-js/print/jsx.js
#	src/language-json/printer-estree-json.js
#	website/yarn.lock
#	yarn.lock
This commit is contained in:
fisker Cheung committed 2023-01-04 14:25:53 +08:00
commit f65768d00a
22 files changed
+726 -29

No files matched your search

+9 -2
View File
@@ -87,7 +87,10 @@ function genericPrint(path, options, print) {
return [node.raw, hardline];
case "css-root": {
const nodes = printNodeSequence(path, options, print);
const after = node.raws.after.trim();
let after = node.raws.after.trim();
if (after.startsWith(";")) {
after = after.slice(1).trim();
}
return [
node.frontMatter ? [print("frontMatter"), hardline] : "",
@@ -144,7 +147,11 @@ function genericPrint(path, options, print) {
return [
node.raws.before.replaceAll(/[\s;]/g, ""),
insideICSSRuleNode(path) ? node.prop : maybeToLowerCase(node.prop),
// Less variable
(parentNode.type === "css-atrule" && parentNode.variable) ||
insideICSSRuleNode(path)
? node.prop
: maybeToLowerCase(node.prop),
trimmedBetween.startsWith("//") ? " " : "",
trimmedBetween,
node.extend || isValueAllSpace ? "" : " ",