Skip to content

It's not clear to me that "Content-Type metadata" is a defined concept #54

Closed

Description

@bzbarsky

The link goes to the HTML spec, which refers to mimesniff, which does not define the concept.

I've been trying to find where the behavior of normal @import and stylesheet loading is defined to reject cross-site non-text/css, but haven't found it yet. https://drafts.csswg.org/cssom/#fetch-a-css-style-sheet is a thing, but also uses "Content-Type metadata".

Most simply, what should happen for @import from a constructed stylesheet if the server does not send a Content-Type header?

This probably doesn't need to block this spec progressing, because of the mess the rest of stylesheet loading is, but it might be good to explicitly say the behavior needs to match https://drafts.csswg.org/cssom/#fetch-a-css-style-sheet and whatever HTML uses to load sheets, assuming this last is defined.

@domenic, @annevk

Activity

  1. domenic commented on Oct 23, 2018

    @domenic
    Contributor

    /cc @zcorpan who might be looking into this underspecified (posibly interop) problem as well.

    HTML in theory uses https://html.spec.whatwg.org/multipage/semantics.html#obtaining-a-resource-from-a-link-element but there's also whatwg/html#968 to use "fetch a CSS style sheet"... so I'm not even sure which of these we should match... but saying that our intent is to match one or both of them seems like a good idea :)

  2. annevk commented on Oct 26, 2018

    @annevk

    Note that I wrote tests in web-platform-tests/wpt#13144 for this, so at least testing-wise it's clear what we want, though we might want to be stricter for constructed style sheets and require an actual text/css match?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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