MarcinOrlowski / html-clock-plasmoid

Configurable and lightweight clock widget for KDE. Stylable with QT supported subset of HTML markup, supporting variety of usable placeholders to design clock widget as you like.
67 stars 6 forks source link

Large style blocks do not seem to work correctly. #91

Closed zelch closed 7 months ago

zelch commented 7 months ago

What's wrong? With the HTML below, I expect to get a red hour, a green minute, and a blue second.

And yet, I'm getting a white minute.

If I join things into a single large style block, even fewer styles are correctly applied, where the date is completely unstyled.

I would definitely believe that I'm doing something wrong here, but I'm at a loss as to what exactly.

Steps to reproduce the behavior:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style>
.clock {
    font-size: 95px;
}
</style><style>

.clock-hour {
    color: #ff006e;
}
</style><style>
.clock-separator {
    color: #79808d;
}
</style><style>
.clock-minute: {
    color: #00ff00;
}
</style><style>
.clock-second {
    color: #0000ff;
}
</style><style>
.clock-ampm {
    color: white;
}
</style><style>
.date {
    font-size: 35px;
    color: #ff0000;
}
</style><style>
.date-day-name {
}
</style><style>
.date-separator {
}
</style><style>
.date-month {
}
</style><style>
.date-day-number {
}
</style><style>
.date-year {
}
</style>
<body>
    <center>
    <span class="clock">
        <span class="clock-hour">{k}</span><span class="clock-separator">:</span><span class="clock-minute">{ii}</span><span class="clock-separator">:</span><span class="clock-second">{ss}</span> <span class="clock-ampm">{AA}</span>
        <br />
    </span>
    <span class="date"><span class="date-day-name">{DDD}</span><span class="date-separator">,</span> <span class="date-month">{MMM}</span> <span class="date-day-number">{dd}</span><span class="date-separator">,</span> <span class="date-year">{yyyy}</span>
    </span>
    </center>
</body>
</html>
  1. image

Expected behavior A clear and concise description of what you expected to happen instead of currently observed behaviour.

The style should apply correctly, in the case of the screenshot, the minute should be green.

Runtime environment

Notes Any additional information that may be helpful diagnosing the problem.

zelch commented 7 months ago

Never mind, I had a typo in the clock-minute CSS, blargh.