Skip to content

Linked stylesheets don't preserve correct order #604

@schlessera

Description

@schlessera

According to the code and comments, the order between linked stylesheets and the amp-custom style should be preserved, which makes sense, as you'd want to keep CSS ordering intact.

However, the expected output in the spec files does not match this order.

For this input:

https://github.com/ampproject/amp-toolbox/blob/v2.0.0-alpha.6/packages/optimizer/spec/transformers/valid/ReorderHeadTransformer/preserves_amp_custom_style_order/input.html#L7-L9

I would expect the output to have the exact same ordering of the two fonts and the <style amp-custom> tag.

However, the expected_output.html file shows a different order:

https://github.com/ampproject/amp-toolbox/blob/v2.0.0-alpha.6/packages/optimizer/spec/transformers/valid/ReorderHeadTransformer/preserves_amp_custom_style_order/expected_output.html#L7-L8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions