Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Last active August 14, 2023 13:36
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehedger/8556178 to your computer and use it in GitHub Desktop.
Save lukehedger/8556178 to your computer and use it in GitHub Desktop.
Stylus + Google Web Fonts
/* Here's the compiled CSS */
@import url("http://fonts.googleapis.com/css?family=Droid+Sans");
body {
font-family: Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 25px;
font-weight: 300;
color: #444;
}
// to import a Google Web Font you need to escape any '+' characters in the URL
// also be careful not to encapsulate the URL in "quotes" as Stylus will parse the \ literally
@import url(http://fonts.googleapis.com/css?family=Droid\+Sans)
@import "typography" // ok to use web font in css files imported after
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment