style embedded images

This commit is contained in:
Thibault Duplessis 2017-08-24 10:45:19 -05:00
parent 54b9349edf
commit 322035535f
2 changed files with 6 additions and 1 deletions

View file

@ -121,7 +121,7 @@ object String {
private def urlToImgUnsafe(url: String): Option[String] =
imgUrlPattern.matcher(url).matches option
s"""<img src="$url" width="100%" style="max-width:100%" />"""
s"""<img class="embed" src="$url" width="100%" style="max-width:100%" />"""
private def urlOrImgUnsafe(url: String) = urlToImgUnsafe(url) getOrElse url

View file

@ -1901,6 +1901,11 @@ iframe.video {
border: none;
margin: 1em 0;
}
img.embed {
max-height: 600px;
background: rgba(127, 127, 127, 0.05);
box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
body ::-webkit-scrollbar,
body ::-webkit-scrollbar-corner {
width: 8px;