-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44aee1a
commit 5efb22f
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Setup Gatsby with Sass | ||
|
||
Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. In Gatsby, Sass code can be translated to well-formatted, standard CSS using a plugin. | ||
|
||
--- | ||
|
||
Install necessary NPM packages | ||
|
||
<NPMPackage name="node-sass" /> | ||
<NPMPackage name="gatsby-plugin-sass" /> | ||
|
||
--- | ||
|
||
Install the Emotion plugin in gatsby-config.js | ||
|
||
<GatsbyPlugin name="gatsby-plugin-sass" /> | ||
|
||
--- | ||
|
||
Sweet, now it's ready to go. | ||
|
||
Let's also write out an example stylesheet and page you can use to play | ||
with Sass. | ||
|
||
<File | ||
path="src/styles.scss" | ||
content="https://gist.githubusercontent.com/marcysutton/19f2efe390e9485968c8fef37795d8ea/raw/2de533ef017bb42b16825670b923a0cd912cc808/styles.scss" | ||
/> | ||
|
||
<File | ||
content="https://gist.githuusercontent.com/marcysutton/19f2efe390e9485968c8fef37795d8ea/raw/2de533ef017bb42b16825670b923a0cd912cc808/example-page.js" | ||
path="src/pages/example-page.js" | ||
/> | ||
|
||
--- | ||
|
||
Read more about Sass on the official Sass docs site: | ||
|
||
https://sass-lang.com/documentationb |
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