Skip to content

Commit

Permalink
Intro to Grid: Appease linter (#28176)
Browse files Browse the repository at this point in the history
Addressing style issues only
  • Loading branch information
asdacosta authored Aug 18, 2024
1 parent 8316b30 commit f8c6a31
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions intermediate_html_css/grid/introduction_to_grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ The Flex lessons covered positioning items along the [two flex axes (main and cr
You’ll remember you can line up a nice row of flex items like this:

<p class="codepen" data-height="300" data-theme-id="dark" data-default-tab="css,result" data-slug-hash="XWeJbRy" data-editable="true" data-user="TheOdinProjectExamples" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">

<span>See the Pen <a href="https://codepen.io/TheOdinProjectExamples/pen/XWeJbRy">
Single Row | CSS Flexbox</a> by TheOdinProject (<a href="https://codepen.io/TheOdinProjectExamples">@TheOdinProjectExamples</a>)
on <a href="https://codepen.io">CodePen</a>.</span>

</p>

<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

Or a column like this:

<p class="codepen" data-height="300" data-theme-id="dark" data-default-tab="css,result" data-slug-hash="MWEYwoX" data-editable="true" data-user="TheOdinProjectExamples" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">

<span>See the Pen <a href="https://codepen.io/TheOdinProjectExamples/pen/MWEYwoX">
Single Column | CSS Flexbox</a> by TheOdinProject (<a href="https://codepen.io/TheOdinProjectExamples">@TheOdinProjectExamples</a>)
on <a href="https://codepen.io">CodePen</a>.</span>

</p>

<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

For one-dimensional layouts, Flex offers a convenient tool without having to rely on floats or CSS hacks to align your items properly.
Expand All @@ -48,10 +54,13 @@ We know that was a frustrating one, but it's part of the point. While Flexbox al
But setting up a two-dimensional layout of cards would be much easier using CSS Grid:

<p class="codepen" data-height="300" data-theme-id="dark" data-default-tab="css,result" data-slug-hash="KKXwpZR" data-editable="true" data-user="TheOdinProjectExamples" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">

<span>See the Pen <a href="https://codepen.io/TheOdinProjectExamples/pen/KKXwpZR">
2D Layout | CSS Grid</a> by TheOdinProject (<a href="https://codepen.io/TheOdinProjectExamples">@TheOdinProjectExamples</a>)
on <a href="https://codepen.io">CodePen</a>.</span>

</p>

<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

### What is grid?
Expand All @@ -68,15 +77,15 @@ While some people thought CSS Grid was here to replace Flexbox, you will learn b

### Knowledge check

This section contains questions for you to check your understanding of this lesson. If you’re having trouble answering the questions below on your own, review the material above to find the answer.
The following questions are an opportunity to reflect on key topics in this lesson. If you can't answer a question, click on it to review the material, but keep in mind you are not expected to memorize or master this knowledge.

- [How can you use Flex to make a two-dimensional layout?](#a-look-back-at-flex)
- [Why was CSS Grid introduced?](#what-is-grid)
- [Which CSS layout module would you use to easily make equal sized items in a container?](#what-is-grid)

### Additional resources

This section contains helpful links to other content. It isnt required, so consider it supplemental.
This section contains helpful links to related content. It isn't required, so consider it supplemental.

- Watch [Flexbox vs. CSS Grid — Which is Better?](https://www.youtube.com/watch?v=hs3piaN4b5I) for a visual representation of the use cases for Flexbox vs CSS Grid
- Read CSS Tricks' quick take on the [differences between flex and grid](https://css-tricks.com/quick-whats-the-difference-between-flexbox-and-grid/).
Expand Down

0 comments on commit f8c6a31

Please sign in to comment.