aboutsummaryrefslogtreecommitdiffstats
path: root/src/sass/plugins/ads.scss
diff options
context:
space:
mode:
authorArthur Hulsman <a.hulsman@orangegames.com>2018-03-07 15:43:48 +0100
committerArthur Hulsman <a.hulsman@orangegames.com>2018-03-07 15:43:48 +0100
commit819f7d1080ef2748fa1c123ad0f54d075c654ab9 (patch)
tree2871f9f93f00fc08b2af5871655961db739ac011 /src/sass/plugins/ads.scss
parent409b588458fd598a88d56f3922da83ff82d80f5f (diff)
downloadplyr-819f7d1080ef2748fa1c123ad0f54d075c654ab9.tar.lz
plyr-819f7d1080ef2748fa1c123ad0f54d075c654ab9.tar.xz
plyr-819f7d1080ef2748fa1c123ad0f54d075c654ab9.zip
Resizing the ad container while having it on display none will return offset width and height of 0, which will cause ads not to play when ad sizes are set within the clients DSP. Also making sure that the inner containers of the ad container are full size. The container is now hidden/ displayed using z-index.
Diffstat (limited to 'src/sass/plugins/ads.scss')
-rw-r--r--src/sass/plugins/ads.scss14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sass/plugins/ads.scss b/src/sass/plugins/ads.scss
index 21a28e02..98620508 100644
--- a/src/sass/plugins/ads.scss
+++ b/src/sass/plugins/ads.scss
@@ -9,7 +9,19 @@
position: absolute;
right: 0;
top: 0;
- z-index: 3; // Above the controls
+ z-index: -1; // Hide it.
+
+ // Make sure the inner container is big enough for the ad creative.
+ > div {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ iframe {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ }
+ }
&::after {
background: rgba($plyr-color-gunmetal, 0.8);