Skip to content

🖍 [Story performance] Remove standalone classes#36127

Merged
mszylkowski merged 18 commits intoampproject:mainfrom
mszylkowski:remove_runtimeclasses
Oct 8, 2021
Merged

🖍 [Story performance] Remove standalone classes#36127
mszylkowski merged 18 commits intoampproject:mainfrom
mszylkowski:remove_runtimeclasses

Conversation

@mszylkowski
Copy link
Copy Markdown
Contributor

@mszylkowski mszylkowski commented Sep 21, 2021

Replaces i-amphtml-story-standalone selectors with :root.

Closes #36049

@mszylkowski mszylkowski self-assigned this Sep 21, 2021
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Sep 21, 2021

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/amp-story.css
extensions/amp-story/1.0/amp-story.js
extensions/amp-story/1.0/test/test-amp-story.js

@newmuis
Copy link
Copy Markdown
Contributor

newmuis commented Sep 21, 2021

FYI the changes in this PR will drop specificity, which could cause breaking changes

@mszylkowski
Copy link
Copy Markdown
Contributor Author

Good point. The only thing that changes specificity for stories are the not !important styles which just seem to be the font-size for now, but font-sizes seem to be defined in 3 different places. I'm cleaning that up to just have that in one place (in this PR) but I could keep the specificity at the current value if we think it's useful.

The other properties changing specificity is not breaking anything, since they are all !important and keep the specificity in the right order

@mszylkowski mszylkowski merged commit 610583b into ampproject:main Oct 8, 2021
@mszylkowski mszylkowski deleted the remove_runtimeclasses branch October 8, 2021 18:55
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.

[Story performance] Make CSS not rely on runtime classes

4 participants