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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent tree shaking any CSS selectors based on the descendants of amp-script elements #3034

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Aug 14, 2019

Similarly to amp-list and amp-live-list, the contents of amp-script are arbitrary and we cannot know ahead of time what selectors from the CSS rules will be relevant in the life of the page. Therefore, and selectors that references an amp-script must exclude any descendants of amp-script from consideration for tree shaking.

@westonruter westonruter added this to the v1.2.1 milestone Aug 14, 2019
@westonruter westonruter requested a review from amedina August 14, 2019 18:22
@googlebot googlebot added the cla: yes Signed the Google CLA label Aug 14, 2019
@westonruter westonruter changed the title Include amp-script among dynamic_element_selectors in tree shaking Prevent tree shaking any CSS selectors based on the descendants of amp-script elements Aug 14, 2019
Copy link
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

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

Ship it please.

@westonruter westonruter merged commit 0303912 into develop Aug 14, 2019
@westonruter westonruter deleted the add/amp-script-tree-solidification branch August 14, 2019 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Signed the Google CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants