From 52fc62d45462e846d7ad7f6599381af3e5f23773 Mon Sep 17 00:00:00 2001
From: Drew Powers <1369770+drwpow@users.noreply.github.com>
Date: Wed, 16 Jun 2021 13:53:09 -0600
Subject: [PATCH] Fix syntax errors in styling docs (#471)
---
docs/styling.md | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/docs/styling.md b/docs/styling.md
index 86ce2e840..1b3850e8d 100644
--- a/docs/styling.md
+++ b/docs/styling.md
@@ -160,8 +160,10 @@ Read on if you’re looking for some strong opinions 🙂. We’ll describe the
You don’t need an explanation on component-based design. You already know that reusing components is a good idea. And it’s this idea that got people used to concepts like [Styled Components][styled-components] and [Styled JSX][styled-jsx]. But rather than burden your users with slow load times of CSS-in-JS, Astro has something better: **built-in scoped styles.**
-```html
-
+```jsx
+---
+// src/components/Button.astro -->
+---
-
+
```
_Note: all the examples here use `lang="scss"` which is a great convenience for nesting, and sharing [colors and variables][sass-use], but it’s entirely optional and you may use normal CSS if you wish._
@@ -182,18 +186,20 @@ That `.btn` class is scoped within that component, and won’t leak out. It mean
By contrast, Astro does allow global styles via the `:global()` escape hatch, however, this should be avoided if possible. To illustrate this: say you used your button in a `` component, and you wanted to style it differently there. You might be tempted to have something like:
```jsx
-
---
+// src/components/Nav.astro
import Button from './Button.astro';
---
-
+
```
This is undesirable because now `