Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq committed Dec 28, 2020
1 parent dc3ef63 commit a35fa20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions extensions/amp-ad/0.1/amp-ad-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {getExperimentBranch} from '../../../src/experiments';

import {getAdContainer} from '../../../src/ad-helper';
import {listen} from '../../../src/event-helper';
import {setStyle} from '../../../src/style';
import {setStyle, setStyles} from '../../../src/style';

const STICKY_AD_MAX_SIZE_LIMIT = 0.2;
const STICKY_AD_MAX_HEIGHT_LIMIT = 0.5;
Expand Down Expand Up @@ -371,8 +371,10 @@ export class AmpAdUIHandler {
* @param {number} newWidth
*/
setSize_(element, newHeight, newWidth) {
setStyle(element, 'height', newHeight, 'px');
setStyle(element, 'width', newWidth, 'px');
setStyles(element, {
'height': `${newHeight}px`,
'width': `${newWidth}px`
});
}

/**
Expand Down
5 changes: 0 additions & 5 deletions extensions/amp-ad/0.1/amp-ad.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ amp-ad[sticky] {
align-items: center;
}

amp-ad[amp-story] iframe {
width: 100%;
height: 100%;
}

amp-ad[type='adsense'],
amp-ad[type='doubleclick'] {
direction: ltr;
Expand Down
5 changes: 5 additions & 0 deletions extensions/amp-story-auto-ads/0.1/amp-story-auto-ads.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
* limitations under the License.
*/

amp-ad[amp-story] iframe {
width: 100%;
height: 100%;
}

.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-loading][ad] {
/* Move below viewport so that ad preloads */
transform: scale(1) translateX(-100%) translateY(200%) !important;
Expand Down

0 comments on commit a35fa20

Please sign in to comment.