Skip to content

[Story layout] Remove runtime grid-layer classes by changing selectors to attribute selectors #35709

@mszylkowski

Description

@mszylkowski

Description

On the runtime there are multiple classes that get added according to the amp-story-grid-layer[template] attribute, but they don't provide any extra specificity or enforces styling (since they use !important anyways).

We want to use the template attribute as the CSS selector again, so that we can prestyle the story document using those selectors directly (before amp-story.js loads), instead of duplicating the styles and having more rules to deal with (making it harder to maintain). This means we can also remove all the classes logic, meaning the stories without the prestyle CSS will also render properly a bit faster.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions