]> Sergey Matveev's repositories - public-inbox.git/commit
Duplicate base css definitions in stylesheets
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>
Mon, 16 Aug 2021 14:50:15 +0000 (10:50 -0400)
committerEric Wong <e@80x24.org>
Mon, 16 Aug 2021 22:13:03 +0000 (22:13 +0000)
commit86df4acd140d61ab2f82e8c17e3118865f867c9a
tree5542473f5e17c8f1cfdb32d2ecb1f867c65dc07a
parent943be29048b2aa652b53929243bdda3d5464f980
Duplicate base css definitions in stylesheets

All pages carry the following inlined css declaration:

    <style>pre{white-space:pre-wrap}*{font-size:100%;font-family:monospace}</style>

However, site security policies may deliberately prohibit execution of
inline content such as scripts and stylesheets as an extra layer of
protection against XSS vulnerabilities. For example, with the following
HTTP headers returned by the server, the inline styles above will be
ignored:

    Content-Security-Policy: default-src 'self'

This causes public-inbox content to be rendered poorly on mobile devices
due to the default <pre> behaviour. Duplicating this declaration into
the contrib stylesheets makes sure that these styles are applied even
with the strictest security policies in place.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
contrib/css/216dark.css
contrib/css/216light.css