Skip to content

Google Fonts using <link> is inlined but without display: swap #2

@Grawl

Description

@Grawl

Input:

link(
rel='stylesheet'
inline
href='https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap&subset=cyrillic'
)

Output:

<style>@font-face{font-family:'Roboto Slab';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v10/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rm.ttf) format('truetype')}</style>

demo using Parcel and parcel-plugin-inline-source

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions