I'm using [email protected] (with the latest postcss-merge-longhand fixes), and I'm getting invalid border CSS.
Original:
border-bottom:聽none;
border-left:聽4px solid聽transparent;
border-right:聽4px solid聽transparent;
border-top:聽4px solid聽#000;
After processing:
border-color:聽#000聽transparent currentColor;
border-style:聽solid solid none;
border-width:聽4px 4px none;
The "none" in "border-width" is invalid and Chrome ignores the entire definition (and shows an error).
When I'm manually changing the "none" to 0 it works.
* When disabling mergeLonghand it works - but I don't want to do it.
Hi, thanks for reporting. Luckily, this issue is already fixed in master but we've yet to roll it out. This is what 4.0.6 will do to your snippet once released:
border: 4px solid transparent;
border-top-color: #000;
border-bottom: none;
Great, thanks!
If you update cssnano to 4.1.0, you should see that it has been fixed.
@andyjansson - I've updated to cssnano to 4.1.0, but I still got the same problem:
border-width: 4px 4px none;
Then you haven't upgraded the sub-dependencies.
Here's the output from the playground, which is running the latest version:
border:4px solid transparent;border-bottom:none;border-top-color:#000
I'd suggest you'd check your package.json and lockfile. Additionally, clear your cache. postcss-merge-longhand has been updated to 4.0.5.
You're right, postcss-merge-longhand wasn't updated...
It's working now. Thanks!