Skip to content

Properties in @font-face declaration are removed (font-display, mso-generic-font-family, mso-font-alt) #541

@maryia-kabash

Description

@maryia-kabash

Hello,
I have a question on how to allow specific properties for @​font-face declaration (font-face is added to AllowedAtRules).

font-display, mso-generic-font-family, mso-font-alt are removed (adding them to AllowedCssProperties does not help because they are descriptors, not exactly CSS properties).

Maybe I am missing something with Sanitizer set up? Thanks!

Example input:

@​font-face {
    font-family: "FontName";
    src: url("https://path-to-file.woff") format("woff");
    font-display: swap;
    mso-generic-font-family: swiss;
    mso-font-alt: 'Calibri';
}

Output:

@​font-face {
    font-family: "FontName";
    src: url("https://path-to-file.woff") format("woff");
}

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