Created
September 6, 2013 18:14
-
-
Save magnusdahlstrand/6467705 to your computer and use it in GitHub Desktop.
Example of how r.js can break css src url declarations by removing quotemarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r.js -o cssIn=flat.css out=flat_result.css | |
r.js -o cssIn=import.css out=import_result.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* same content as import.css, except for its import statement, and this comment */ | |
@font-face { | |
font-family: 'Font Name'; | |
src: url('Font-Name.eot'); | |
src: url('Font-Name.eot?#iefix') format('embedded-opentype'), | |
url('Font-Name.woff') format('woff'), | |
url('Font-Name.ttf') format('truetype'), | |
url('Font-Name.svg#Font Name') format('svg'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'Font Name'; | |
src: url('Font-Name.eot'); | |
src: url('Font-Name.eot?#iefix') format('embedded-opentype'), | |
url('Font-Name.woff') format('woff'), | |
url('Font-Name.ttf') format('truetype'), | |
url('Font-Name.svg#Font Name') format('svg'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url('flat.css'); | |
@font-face { | |
font-family: 'Font Name'; | |
src: url('Font-Name.eot'); | |
src: url('Font-Name.eot?#iefix') format('embedded-opentype'), | |
url('Font-Name.woff') format('woff'), | |
url('Font-Name.ttf') format('truetype'), | |
url('Font-Name.svg#Font Name') format('svg'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'Font Name'; | |
src: url(Font-Name.eot); | |
src: url(Font-Name.eot?#iefix) format('embedded-opentype'), | |
url(Font-Name.woff) format('woff'), | |
url(Font-Name.ttf) format('truetype'), | |
url(Font-Name.svg#Font Name) format('svg'); | |
} | |
@font-face { | |
font-family: 'Font Name'; | |
src: url('Font-Name.eot'); | |
src: url('Font-Name.eot?#iefix') format('embedded-opentype'), | |
url('Font-Name.woff') format('woff'), | |
url('Font-Name.ttf') format('truetype'), | |
url('Font-Name.svg#Font Name') format('svg'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue here is that r.js removes the quote marks surrounding the path for the imported file, but not paths in the "top level" file.