mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix iframe styling to be theme dependent
This commit is contained in:
13
gray-theme/unauthenticated/iframe-styles.css
Normal file
13
gray-theme/unauthenticated/iframe-styles.css
Normal file
@@ -0,0 +1,13 @@
|
||||
body:not([style]) {
|
||||
font: 14px/1.231 arial, helvetica, clean, sans-serif;
|
||||
}
|
||||
|
||||
p:not([style]) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
blockquote:not([style]) {
|
||||
margin: 0px 0px 0px 0.8ex;
|
||||
border-left: 1px solid #ccc;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
@@ -2847,18 +2847,12 @@ sub iframe_body
|
||||
my ($body) = @_;
|
||||
|
||||
# Mail iframe inner styles
|
||||
my $iframe_styles =
|
||||
'<style>
|
||||
html,body { overflow-y: hidden; }
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
blockquote:not([style]) {
|
||||
margin: 0px 0px 0px 0.8ex;
|
||||
border-left: 1px solid #ccc;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
</style>';
|
||||
my $iframe_styles = <<EOF;
|
||||
<style>
|
||||
html, body { overflow-y: hidden; }
|
||||
@{[&read_file_contents("$root_directory/$current_theme/unauthenticated/iframe-styles.css")]}
|
||||
</style>
|
||||
EOF
|
||||
# Add inner styles to the email body
|
||||
if ($body =~ /<\/body>/) {
|
||||
$body =~ s/<\/body>/$iframe_styles<\/body>/;
|
||||
|
||||
Reference in New Issue
Block a user