Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to customize the profile #143

Open
WesCossick opened this issue Dec 16, 2022 · 0 comments
Open

Ability to customize the profile #143

WesCossick opened this issue Dec 16, 2022 · 0 comments

Comments

@WesCossick
Copy link
Member

WesCossick commented Dec 16, 2022

Right now, the profile is hardcoded as css3, but the W3C CSS Validator supports many options. An incomplete list of valid values is documented here, but there are more available in the dropdown (e.g., css3svg):

<select id="profile_uri" name="profile">
        <option value="none">No special profile</option>
        <option value="css1">CSS level 1</option>
        <option value="css2">CSS level 2</option>
        <option value="css21">CSS level 2.1</option>
        <option value="css3">CSS level 3</option>
        <option value="css3svg">CSS Level 3 + SVG</option>
        <option value="svg">SVG</option>
        <option value="svgbasic">SVG Basic</option>
        <option value="svgtiny">SVG tiny</option>  
        <option value="mobile">Mobile</option>
        <option value="atsc-tv">ATSC TV profile</option>
        <option value="tv">TV profile</option>
</select>

It would be handy if we allowed users to customize this profile via the options for validateText() and validateURL(), similar to the medium setting. Effectively, this would look like:

const result = await cssValidator.validateURL(cssSourceURL, {
    profile: 'css2',
});

Here's where the profile is hardcoded now:

The default value, if none is specified, should remain css3.

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

No branches or pull requests

1 participant