Skip to content

Commit

Permalink
fix line breaks in html demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rrcobb committed May 10, 2021
1 parent 921c752 commit abd614d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion T002-HTML-syntax/p001-Intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,21 @@ shows a number next to each list item.

Last, the element that makes the web different from other kinds of documents: the link.

<!-- prettier-ignore-start -->
<!-- (otherwise, prettier will try to make the <a> example below fit on one line) -->

<HtmlDemo>

```html
<a href="https://www.nngroup.com/articles/hypertext-history/">The History of HyperText </a>
<a href="https://www.nngroup.com/articles/hypertext-history/">
The History of HyperText
</a>
```
</HtmlDemo>
<!-- prettier-ignore-end -->
The `a` stands for "anchor", which is a weird word for a link! Even weirder is `href`, the attribute
that tells the browser where to go when you click. It stands for "Hypertext reference". It's a
_reference_ - a pointer - to some other HyperText.
Expand Down
6 changes: 5 additions & 1 deletion demo.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@
max-height: 230px;
/*
these !important declarations
are to override inline styles in the code highlighter
override inline styles in the code highlighter
they are scoped to this css module, at least
*/
margin-top: 0 !important;
margin-bottom: 0 !important;
white-space: pre-wrap !important;
}

.code code {
word-break: break-all !important;
}

/* language labels */
div:global(.language-js),
div:global(.language-html),
Expand Down

0 comments on commit abd614d

Please sign in to comment.