Closed
Description
I am an author of RSS Guard app.
Here is comparison of two screenshots:
with litehtml 0.9
with litehtml latest master branch
You see there is a clear difference in margins/paddings in almost all HTML elements (bottom right part of the app GUI on the screenshots). All other "container" code and everything is exactly the same.
Here is the sample HTML loaded into the viewer. You can see that almost all CSS rules use em
as an unit and to me it seems that latest master branch litehtml does not take display em
units properly. In fact I believe that they are somehow ignored entirely. When I replaced em
units with px
units of "same" size, the rendered output suddenly starts looking as expected.
<!DOCTYPE html>
<html lang="en">
<head>
<title>workaround #1770 for rssguard, unified qdomdocument usages </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
img {
max-width: 98%;
}
p {
margin-top: 0.4em;
margin-bottom: 0.4em;
}
.article {
background-color: transparent;
color: #333;
line-height: 1.1;
padding: 0em;
}
.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
color: #222;
margin-top: 0em;
margin-bottom: 0.2em;
}
.article-body a {
color: #50a5c2;
text-decoration: none;
}
.article-body a:hover {
color: #89c2d6;
text-decoration: underline;
}
.article-urls-strip {
margin-top: 0.5em;
margin-bottom: 0.5em;
line-height: 2.2;
}
.article-url {
text-decoration: none;
padding: 0.1em 0.2em;
border-radius: 2px;
border: 1px solid red;
background-color: red;
color: white;
}
.article-url:hover {
background-color: #ff4d4d;
color: white;
}
.article-enclosure-url {
text-decoration: none;
text-transform: uppercase;
padding: 0.1em 0.2em;
border-radius: 2px;
border: 1px solid #3c8aa4;
background-color: #3c8aa4;
color: white;
}
.article-enclosure-url:hover {
background-color: #66afc7;
color: white;
}
</style>
</head>
<body>
<div class="article" dir="ltr" id="153277">
<section class="article-header">
<h1>workaround #1770 for rssguard, unified qdomdocument usages </h1>
<div>martinrotter • 20.6.2025 7.56</div>
<div class="article-urls-strip"><a class="article-url" href="https://github.com/martinrotter/rssguard/commit/7cf3f0ee6136de80fb7c8a96aec6303291b1f171">URL</a> <a class="article-enclosure-url" href="https://avatars.githubusercontent.com/u/1255302?s=30&v=4">image/jpg</a></div>
<div><a href="https://avatars.githubusercontent.com/u/1255302?s=30&v=4">
<img alt="image/jpg"
src="https://avatars.githubusercontent.com/u/1255302?s=30&v=4"
style="max-height: 90px;">
</a></div>
</section>
<div class="article-body">
<pre style='white-space:pre-wrap;width:81ex'>workaround #1770 for rssguard, unified qdomdocument usages</pre>
</div>
</div>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels