Prevent the addition of space in type() with + (#19516)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
1 parent
3d063b57b1
commit
a4e6f7a026
5 files changed
+114
No files matched your search
@@ -0,0 +1,58 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`type.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
div {
|
||||
border-radius: attr(br type(<length>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>#));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage> | <number> | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage>+ | <number>+ | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
aspect-ratio: attr(data-ar type(*));
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
border-radius: attr(br type(<length>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>#));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage> | <number> | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage>+ | <number>+ | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
aspect-ratio: attr(data-ar type(*));
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1 @@
|
||||
runFormatTest(import.meta, ["css"]);
|
||||
@@ -0,0 +1,23 @@
|
||||
div {
|
||||
border-radius: attr(br type(<length>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>+));
|
||||
}
|
||||
|
||||
div {
|
||||
background: attr(bg type(<color>#));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage> | <number> | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
margin: attr(data-margin type(<percentage>+ | <number>+ | auto));
|
||||
}
|
||||
|
||||
div {
|
||||
aspect-ratio: attr(data-ar type(*));
|
||||
}
|
||||
Reference in new issue
Block a user