Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

鉁╝mp-consent: consent-ui Allow Passing Initial styles on ready #21522

Merged
merged 6 commits into from Mar 28, 2019

Conversation

torch2424
Copy link
Contributor

closes #21324

This allows for setting an initial height between 10vh and 60vh on iframe ready. As well as optionally removing the border radius and box shadow on the consent iframe container 馃槃

Example

initialHeightAmpConsent

@torch2424 torch2424 requested a review from zhouyx March 21, 2019 18:23
@torch2424 torch2424 changed the title amp-consent: consent-ui Allow Passing Initial styles on ready 鉁╝mp-consent: consent-ui Allow Passing Initial styles on ready Mar 21, 2019
Copy link
Contributor

@zhouyx zhouyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with two minor comments.

);
}
} else {
dev().error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user().error instead.

if (dataHeight >= 10 && dataHeight <= 60) {
this.initialHeight_ = `${dataHeight}vh`;
} else {
dev().error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user().error

@torch2424 torch2424 merged commit 4757c49 into ampproject:master Mar 28, 2019
@torch2424 torch2424 deleted the consent-ui-initial-styles branch March 28, 2019 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

amp-consent: consent-ui - Allow passing Styling Settings on 'ready'
3 participants