Skip to content

Support for font weight, style and duotone #587

@screaming-snake-case

Description

@screaming-snake-case

It would be great if the package could get support for multiple style options of the same icon.
Just like they do with font awesome.

A proper way to handle this would be using query params in the filenames and directories.

My suggestions would be:
my-icon-dir?weight=300/*
Would result in every icon in the my-icon-dir to use the font weight of 300. (if param not profited use the default 400).
my-first-icon.svg?weight=300
Would result in the icon my-first-icon to use a font weight of 300. (if param not profited use the default 400).

my-icon-dir?style=italic/*
Would result in every icon in the my-icon-dir to use the font style of italic. (if param not provided use the default normal).
my-first-icon.svg?style=italic
Would result in the icon my-first-icon to use the font style of italic. (if param not provided use the default normal).

my-icon-dir?duotone=after/*
Would result in every icon in the my-icon-dir to use the after pseudo element. (if param not provided use the default before).
my-first-icon.svg?duotone=after
Would result in the icon my-first-icon to use the after pseudo element. (if param not provided use the default before).

the after pseudo element should be positioned absolute and have a opacity of .5 so the end user of the icons has a functional default styling for duotone icons.

of course the documentation that is generated should be updated to support this as well.

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