sov icon indicating copy to clipboard operation
sov copied to clipboard

CSS comments including a semicolon cause sov to become invisible

Open trinitronx opened this issue 4 months ago • 0 comments

Discovered while trying to add a GPLv3 license text in a multi-line CSS comment in the ~/.config/sov/html/main.css config file. It just so happens to have a ; in it, which triggered the bug. However, it is also reproducible with a minimal test case: Simply adding a one-line comment to the top of the original main.css (e.g // foo;)

// foo;
#main {
    border-radius: 10px;
    background-color: #00000044;
}

#base {
    margin: 10px;
}

.fullscale {
    height: 100%;
    width: 100%;
}

.colflex {
    display: flex;
    flex-direction: column;
}

.rowflex {
    display: flex;
    flex-direction: row;
}

.workspace {
    margin: 10px;
    border-radius: 8px;
    background-color: #000000FF;
    border-width: 1px;
    border-color: #555555FF;
}

.window {
    width: 100px;
    height: 80px;
    background-color: #222222FF;
    border-radius: 8px;
    border-width: 1px;
    border-color: #BCBCBCFF;
}

.window_active {
    width: 100px;
    height: 80px;
    background-color: #444444FF;
    border-radius: 8px;
    border-width: 1px;
    border-color: #BCBCBCFF;
}

.title {
    width: 100%;
    height: 21px;
    margin-top: 4px;
    margin-left: 4px;
    margin-right: 4px;
    margin-bottom: 2px;
    color: #FFFFFFFF;
    font-size: 16px;
    font-family: "Terminus:style=Bold:size=16";
}

.content {
    width: 100%;
    height: 100%;
    margin-left: 4px;
    margin-right: 4px;
    color: #999999FF;
    vertical-align: top;
    font-size: 14px;
    font-family: "Terminus:style=Bold:size=14";
    word-wrap: break-word;
    line-height: 12px;
}

.number {
    width: 20px;
    height: 20px;
    right: -14px;
    top: -9px;
    color: #FFFFFFFF;
    font-size: 18px;
    font-family: "Terminus:style=Bold:size=18";
}

It also triggers when ; character is found within multi-line comments. Reproduced with same as above, except with this at the top instead:

/* foo;
*/

trinitronx avatar Sep 07 '25 18:09 trinitronx