Skip to content

Add crossorigin integrity attributes to external cdn link for css #5001

@yufengle

Description

@yufengle

What problem does this feature solve?

recent "Chrome secure-by-default model for cookies" seems to require crossorign attribute to be added in the following scenario:

<style scoped> @import "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"; </style>


currently, the above code generates <link href=https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css rel=stylesheet> in index.html

desired output would be <link href=https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css crossorigin=anonymous rel=stylesheet> when extra args are provided for @import

There may be some workaround other than manually edit index.html, if so, please advise. Thanks!

similar but different request #2025 #2025

What does the proposed API look like?

not sure, maybe something like
@import("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", "crossorigin=anonymous");

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs team reproWe acknowledged your report and will soon try to reproduce it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions