sunjw / jstoolnpp

A JavaScript (JSON) tool for Notepad++ (formerly JSMinNpp) and Visual Studio Code.
GNU General Public License v2.0
284 stars 24 forks source link

Names with hyphens are separated #148

Closed PhilJollans closed 9 months ago

PhilJollans commented 9 months ago

I have installed the JSTool plugin in notepad++, version 1.2312.0.0.
I have used the function JSFormat on a CSS file, specifically on a file from the package tippyjs.

In the formatted result, all names containing a hyphen were formatted with spaces around the hyphen.
Here is a part of the formatted output:

.tippy - box[data - theme~ = light - border]{
    background - color: #fff;
    background - clip: padding - box;
    border: 1px solid rgba(0, 8, 16, .15);
    color: #333;
    box - shadow: 0 4px 14px - 2px rgba(0, 8, 16, .08)
}
.tippy - box[data - theme~ = light - border] > .tippy - backdrop {
    background - color: #fff
}
.tippy - box[data - theme~ = light - border] > .tippy - arrow: after, .tippy - box[data - theme~ = light - border] > .tippy - svg - arrow: after {
    content: "";
    position: absolute;
    z - index: -1
}
.tippy - box[data - theme~ = light - border] > .tippy - arrow: after {
    border - color: transparent;
    border - style: solid
}
.tippy - box[data - theme~ = light - border][data - placement ^= top] > .tippy - arrow: before {
    border - top - color: #fff
}
.tippy - box[data - theme~ = light - border][data - placement ^= top] > .tippy - arrow: after {
    border - top - color: rgba(0, 8, 16, .2);
    border - width: 7px 7px 0;
    top: 17px;
    left: 1px
}

This is clearly not correct CSS.

Phil

sunjw commented 9 months ago

It is a JS formatter, not a CSS formatter.

PhilJollans commented 9 months ago

Thanks