Skip to content

CSS {% stylesheet %} pattern #70

@francishagecode

Description

@francishagecode

Is there a reason specifically this was chosen as the default?

For example, on image: https://github.com/Shopify/skeleton-theme/blob/main/snippets/image.liquid

{% stylesheet %}
  .image {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
  }

  .image > img {
    width: 100%;
    height: auto;
  }
{% endstylesheet %}

In my mind, it would make sense to rather have a single css file (we already begin with https://github.com/Shopify/skeleton-theme/blob/main/assets/critical.css)

This would reduce repeated styles if the image snippet is rendered multiple times per page.

Thanks!

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