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

Add AmpStoryCssOptimizer transformer #460

Merged
merged 6 commits into from
Jan 7, 2022

Conversation

ediamin
Copy link
Collaborator

@ediamin ediamin commented Dec 29, 2021

This PR adds a new transformer called AmpStoryCssOptimizer to optimize the html document if AMP Story present.

This transformer will:

  • append link[rel=stylesheet] to amp-story-1.0.css.
  • modify the amp-custom css to use --amp-story-${vh/vw/vmin/vmax}.
  • append inline <script> for the dvh polyfill.
  • SSR data-story-supports-landscape.
  • SSR aspect-ratio into style.

Closes #445

tests/Optimizer/SpecTest.php Outdated Show resolved Hide resolved
@ediamin ediamin marked this pull request as ready for review January 5, 2022 04:44
README.md Outdated Show resolved Hide resolved
src/Dom/Element.php Outdated Show resolved Hide resolved
src/Dom/Element.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/AmpStoryCssOptimizer.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/AmpStoryCssOptimizer.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/AmpStoryCssOptimizer.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/AmpStoryCssOptimizer.php Outdated Show resolved Hide resolved
ediamin and others added 2 commits January 7, 2022 21:55
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
@schlessera schlessera added this to the 0.9.3 milestone Jan 7, 2022
@schlessera schlessera merged commit be395b7 into main Jan 7, 2022
@schlessera schlessera deleted the add/445-amp-story-css-optimizer-transformer branch January 7, 2022 17:03
@schlessera schlessera modified the milestones: 0.9.3, 0.9.4 Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add AmpStoryCssOptimizer transformer
2 participants