prettier
prettier copied to clipboard
Regnize `<ratio>` CSS value
Prettier 3.0.2 Playground link
--parser css
Input:
div {
aspect-ratio: 16 / 9;
aspect-ratio: 16/ 9;
aspect-ratio: 16 /9;
}
Output:
div {
aspect-ratio: 16 / 9;
aspect-ratio: 16/ 9;
aspect-ratio: 16 /9;
}
Expected behavior:
They should format the same, properly
div {
aspect-ratio: 16 / 9;
aspect-ratio: 16 / 9;
aspect-ratio: 16 / 9;
}
Just from my experience - most of developer prefer no spaces in ratio
@alexander-akait
Personally, I use space around /.
I did a search
- With space
- Without space
~It seems the space version is more popular?~ Update: No space version has more results.