commit be420ca
Kelson Vibber
·
2024-05-09 04:27:58 +0000 UTC
parent c5ae10a
Set avatars and custom emoji as square (fixes display in Dillo) The minimalist web browser Dillo has recently started up development again. Its CSS implementation only applies the explicitly stated width and height of an image, so avatars were displaying at 2.5 em high, and the full original width. https://dillo-browser.github.io/
M
html.c
+1,
-1
1@@ -55,7 +55,7 @@ xs_str *replace_shortnames(xs_str *s, xs_list *tag, int ems)
2 tag_list = xs_dup(tag);
3 }
4
5- xs *style = xs_fmt("height: %dem; vertical-align: middle;", ems);
6+ xs *style = xs_fmt("height: %dem; width: %dem; vertical-align: middle;", ems, ems);
7
8 xs_list *p = tag_list;
9 char *v;
M
utils.c
+1,
-1
1@@ -49,7 +49,7 @@ static const char *default_css =
2 ".snac-top-user { text-align: center; padding-bottom: 2em }\n"
3 ".snac-top-user-name { font-size: 200% }\n"
4 ".snac-top-user-id { font-size: 150% }\n"
5- ".snac-avatar { float: left; height: 2.5em; padding: 0.25em }\n"
6+ ".snac-avatar { float: left; height: 2.5em; width: 2.5em; padding: 0.25em }\n"
7 ".snac-author { font-size: 90%; text-decoration: none }\n"
8 ".snac-author-tag { font-size: 80% }\n"
9 ".snac-pubdate { color: #a0a0a0; font-size: 90% }\n"