UX: introduce min-height for responsive ads (#170)

This commit is contained in:
Kris 2023-04-25 16:19:48 -04:00 committed by GitHub
parent d3005f26af
commit 58205cc9ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -2,7 +2,11 @@
<div class="google-adsense-label"><h2>{{i18n
"adplugin.advertisement_label"
}}</h2></div>
<div class="google-adsense-content" style={{adWrapperStyle}}>
<div
class="google-adsense-content"
id={{if isResponsive "google-adsense__responsive"}}
style={{adWrapperStyle}}
>
<ins
class="adsbygoogle"
style={{adInsStyle}}

View File

@ -18,6 +18,12 @@
width: 100%;
}
#google-adsense__responsive {
// Google strips styles added to parent wrapper classes, so we use this ID
// this sets a minimum height to reduce cumulative layout shift
min-height: 200px;
}
.google-adsense .google-adsense-label {
width: 728px;
max-width: 100%;