Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

CssClassNameConverter should also accept "fa-" prefixed class names #43

Open
drewnoakes opened this issue Mar 6, 2017 · 0 comments
Open

Comments

@drewnoakes
Copy link
Contributor

drewnoakes commented Mar 6, 2017

For example, from http://fontawesome.io/icon/wpforms/:

image

The string used on the site is fa-wpforms, but CssClassNameConverter expects wpforms.

I worked around this with code such as:

var faConverter = new CssClassNameConverter();

var converter = LambdaConverter.Create<string>(s =>
{
    if (s.StartsWith("fa-"))
        s = s.Substring(3);
    return faConverter.Convert(s, typeof(FontAwesomeIcon), null, null);
});

But it would be better if the library did this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant