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

font-face with multiple srcs #54

Closed
crowjonah opened this issue Mar 25, 2013 · 0 comments
Closed

font-face with multiple srcs #54

crowjonah opened this issue Mar 25, 2013 · 0 comments

Comments

@crowjonah
Copy link

I know that font-face rule declarations have calmed down a bit in the last year or two, but I just ran into an issue parsing some generated font-face styles that I thought might crop up for other people as well:

@font-face {
    font-family: 'MyFont';
    src: url('myfont.eot');
    src: url('myfont.eot?#iefix') format('embedded-opentype'),
         url('myfont.woff') format('woff'),
         url('myfont.ttf') format('truetype'),
         url('myfont.svg#MyFont') format('svg');
    font-weight: normal;
    font-style: normal;
}

Here are the results of using the online parser. You'll notice that the first src gets overridden by the second. I recognize that this is logical and likely even desirable behavior, but it's giving me some trouble in IE when I use the rule.toString and/or rule.cssText without that first src included.

It's simple enough for me to work around this by declaring my font-face rule differently, but when thrown into the wild, I'd like to be able to accomodate all kinds of wonky font-face declarations.

UPDATE: I apologize for not making the connection earlier, but this seems no different than #16. I'll check out #53

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

No branches or pull requests

1 participant