Skip to content

Commit

Permalink
Minor: Capitalization: learn (Grid -> grid, Flexbox -> flexbox) (#34303)
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle authored Jun 21, 2024
1 parent fb409b8 commit d6a792e
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ You'll notice a number of clickable tabs at the top of the CSS Viewer:
- _Layout_: In Firefox, this area includes two sections:

- _Box Model_: represents visually the current element's box model, so you can see at a glance what padding, border and margin is applied to it, and how big its content is.
- _Grid_: If the page you are inspecting uses CSS Grid, this section allows you to view the grid details.
- _Grid_: If the page you are inspecting uses CSS grid, this section allows you to view the grid details.

- _Fonts_: In Firefox, the _Fonts_ tab shows the fonts applied to the current element.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/learn/css/building_blocks/organizing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,6 @@ This is the final part of our building blocks module, and as you can see there a

To learn more about layout in CSS, see the [CSS Layout](/en-US/docs/Learn/CSS/CSS_layout) module.

You should also now have the skills to explore the rest of the [MDN CSS](/en-US/docs/Web/CSS) material. You can look up properties and values, explore our [CSS Cookbook](/en-US/docs/Web/CSS/Layout_cookbook) for patterns to use, or continue reading in some of the specific guides, such as our [Guide to CSS Grid Layout](/en-US/docs/Web/CSS/CSS_grid_layout).
You should also now have the skills to explore the rest of the [MDN CSS](/en-US/docs/Web/CSS) material. You can look up properties and values, explore our [CSS Cookbook](/en-US/docs/Web/CSS/Layout_cookbook) for patterns to use, or continue reading in some of the specific guides, such as our [Guide to CSS grid layout](/en-US/docs/Web/CSS/CSS_grid_layout).

{{PreviousMenuNext("Learn/CSS/Building_blocks/Debugging_CSS", "Learn/CSS/Building_blocks/Fundamental_CSS_comprehension", "Learn/CSS/Building_blocks")}}
12 changes: 6 additions & 6 deletions files/en-us/learn/css/css_layout/flexbox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ page-type: learn-module-chapter
<tr>
<th scope="row">Objective:</th>
<td>
To learn how to use the Flexbox layout system to create web layouts.
To learn how to use the flexbox layout system to create web layouts.
</td>
</tr>
</tbody>
</table>

## Why Flexbox?
## Why flexbox?

CSS flexible box layout enables you to:

Expand All @@ -43,7 +43,7 @@ Flexbox features may be the perfect solution for your one dimensional layout nee

In this article, you'll work through a series of exercises to help you understand how flexbox works. To get started, you should make a local copy of the first starter file — [flexbox0.html](https://github.com/mdn/learning-area/blob/main/css/css-layout/flexbox/flexbox0.html) from our GitHub repo. Load it in a modern browser (like Firefox or Chrome) and have a look at the code in your code editor. You can also [see it live here](https://mdn.github.io/learning-area/css/css-layout/flexbox/flexbox0.html).

![Image showing the starting point of Flexbox tutorial](bih741v.png)
![Image showing the starting point of flexbox tutorial](bih741v.png)

You'll see that we have a {{htmlelement("header")}} element with a top level heading inside it and a {{htmlelement("section")}} element containing three {{htmlelement("article")}}s. We're going to use these to create a fairly standard three column layout.

Expand Down Expand Up @@ -346,7 +346,7 @@ You've reached the end of this article, but can you remember the most important

## Summary

That concludes our tour of the basics of Flexbox. We hope you had fun and will have a good play around with it as you proceed further with your learning. Next, we'll have a look at another important aspect of CSS layouts: [CSS Grids](/en-US/docs/Learn/CSS/CSS_layout/Grids).
That concludes our tour of the basics of flexbox. We hope you had fun and will have a good play around with it as you proceed further with your learning. Next, we'll have a look at another important aspect of CSS layouts: [CSS grids](/en-US/docs/Learn/CSS/CSS_layout/Grids).

## See also

Expand All @@ -355,7 +355,7 @@ That concludes our tour of the basics of Flexbox. We hope you had fun and will h
- [Ordering flex items](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Ordering_flex_items)
- [Controlling ratios of flex items along the main axis](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Controlling_ratios_of_flex_items_along_the_main_axis)
- [CSS flexible box layout](/en-US/docs/Web/CSS/CSS_flexible_box_layout) module
- [CSS-Tricks Guide to Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) — an article explaining everything about Flexbox in a visually appealing way
- [Flexbox Froggy](https://flexboxfroggy.com/) — an educational game to learn and better understand the basics of Flexbox
- [CSS-Tricks guide to flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) — an article explaining everything about flexbox in a visually appealing way
- [Flexbox Froggy](https://flexboxfroggy.com/) — an educational game to learn and better understand the basics of flexbox

{{PreviousMenuNext("Learn/CSS/CSS_layout/Normal_Flow", "Learn/CSS/CSS_layout/Grids", "Learn/CSS/CSS_layout")}}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you have worked through this module then you will have already covered the ba
<tr>
<th scope="row">Objective:</th>
<td>
To test comprehension of CSS layout methods using Flexbox, Grid, Floating and Positioning.
To test comprehension of CSS layout methods using flexbox, grid, floating and positioning.
</td>
</tr>
</tbody>
Expand Down
14 changes: 7 additions & 7 deletions files/en-us/learn/css/css_layout/grids/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ page-type: learn-module-chapter
<th scope="row">Objective:</th>
<td>
To understand the fundamental concepts of grid layout as well as how to
implement it with CSS Grid.
implement it with CSS grid.
</td>
</tr>
</tbody>
Expand All @@ -41,8 +41,8 @@ A grid will typically have **columns**, **rows**, and then gaps between each row

## Creating your grid in CSS

Having decided on the grid that your design needs, you can use CSS Grid Layout to create it. We'll look at the basic features of Grid Layout first and then explore how to create a simple grid system for your project.
The following video provides a nice visual explanation of using CSS Grid:
Having decided on the grid that your design needs, you can use CSS grid layout to create it. We'll look at the basic features of grid layout first and then explore how to create a simple grid system for your project.
The following video provides a nice visual explanation of using CSS grid:

{{EmbedYouTube("KOvGeFUHAC0")}}

Expand All @@ -58,7 +58,7 @@ Similar to how you define flexbox, you define a grid layout by setting the value
}
```

Unlike Flexbox, the items will not immediately look any different. Declaring `display: grid` gives you a one column grid, so your items will continue to display one below the other as they do in normal flow.
Unlike flexbox, the items will not immediately look any different. Declaring `display: grid` gives you a one column grid, so your items will continue to display one below the other as they do in normal flow.

To see something that looks more grid-like, we'll need to add some columns to the grid. Let's add three 200-pixel columns. You can use any length unit or percentage to create these column tracks.

Expand Down Expand Up @@ -865,9 +865,9 @@ aside {
</div>
```

{{ EmbedLiveSample('Grid frameworks in CSS Grid', '100%', 600) }}
{{ EmbedLiveSample('Grid frameworks in CSS grid', '100%', 600) }}

If you use the [Firefox Grid Inspector](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_grid_layouts/index.html) to overlay the grid lines on your design, you can see how our 12-column grid works.
If you use the [Firefox grid inspector](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_grid_layouts/index.html) to overlay the grid lines on your design, you can see how our 12-column grid works.

![A 12 column grid overlaid on our design.](learn-grids-inspector.png)

Expand All @@ -877,7 +877,7 @@ You've reached the end of this article, but can you remember the most important

## Summary

In this overview, we've toured the main features of CSS Grid Layout. You should be able to start using it in your designs. To dig further into the specification, read our guides on Grid Layout, which can be found below.
In this overview, we've toured the main features of CSS grid layout. You should be able to start using it in your designs. To dig further into the specification, read our guides on grid layout, which can be found below.

## See also

Expand Down
8 changes: 4 additions & 4 deletions files/en-us/learn/css/css_layout/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ These articles will provide instruction on the fundamental layout tools and tech
- [Flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
- : [Flexbox](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Typical_use_cases_of_flexbox) is a one-dimensional layout method for laying out items in rows or columns. Items flex to fill additional space and shrink to fit into smaller spaces. This article explains all the fundamentals. After studying this guide you can [test your flexbox skills](/en-US/docs/Learn/CSS/CSS_layout/Flexbox_skills) to check your understanding before moving on.
- [Grids](/en-US/docs/Learn/CSS/CSS_layout/Grids)
- : CSS Grid Layout is a two-dimensional layout system for the web. It lets you lay content out in rows and columns, and has many features that make building complex layouts straightforward. This article will give you all you need to know to get started with page layout, then [test your grid skills](/en-US/docs/Learn/CSS/CSS_layout/Grid_skills) before moving on.
- : CSS grid layout is a two-dimensional layout system for the web. It lets you lay content out in rows and columns, and has many features that make building complex layouts straightforward. This article will give you all you need to know to get started with page layout, then [test your grid skills](/en-US/docs/Learn/CSS/CSS_layout/Grid_skills) before moving on.
- [Floats](/en-US/docs/Learn/CSS/CSS_layout/Floats)
- : Originally for floating images inside blocks of text, the {{cssxref("float")}} property became one of the most commonly used tools for creating multiple column layouts on webpages. With the advent of Flexbox and Grid it has now returned to its original purpose, as this article explains.
- : Originally for floating images inside blocks of text, the {{cssxref("float")}} property became one of the most commonly used tools for creating multiple column layouts on webpages. With the advent of flexbox and grid it has now returned to its original purpose, as this article explains.
- [Positioning](/en-US/docs/Learn/CSS/CSS_layout/Positioning)
- : Positioning allows you to take elements out of the normal document layout flow and make them behave differently, for example, by sitting on top of one another, or by always remaining in the same place inside the browser viewport. This article explains the different {{cssxref("position")}} values and how to use them.
- [Multiple-column layout](/en-US/docs/Learn/CSS/CSS_layout/Multiple-column_Layout)
Expand All @@ -41,9 +41,9 @@ These articles will provide instruction on the fundamental layout tools and tech
- [Beginner's guide to media queries](/en-US/docs/Learn/CSS/CSS_layout/Media_queries)
- : The **CSS Media Query** gives you a way to apply CSS only when the browser and device environment matches a rule that you specify, for example, "viewport is wider than 480 pixels". Media queries are a key part of responsive web design because they allow you to create different layouts depending on the size of the viewport. They can also be used to detect other features of the environment your site is running on, for example, whether the user is using a touchscreen rather than a mouse. In this lesson, you will first learn about the syntax used in media queries, and then you will use them in an interactive example showing how a simple design might be made responsive.
- [Legacy layout methods](/en-US/docs/Learn/CSS/CSS_layout/Legacy_Layout_Methods)
- : Grid systems are a very common feature used in CSS layouts. Prior to **CSS Grid Layout**, they tended to be implemented using floats or other layout features. You'd first imagine your layout as a set number of columns (e.g., 4, 6, or 12), and then you'd fit your content columns inside these imaginary columns. In this article, we'll explore how these older methods work so that you understand how they were used if you work on an older project.
- : Grid systems are a very common feature used in CSS layouts. Prior to **CSS grid layout**, they tended to be implemented using floats or other layout features. You'd first imagine your layout as a set number of columns (e.g., 4, 6, or 12), and then you'd fit your content columns inside these imaginary columns. In this article, we'll explore how these older methods work so that you understand how they were used if you work on an older project.
- [Supporting older browsers](/en-US/docs/Learn/CSS/CSS_layout/Supporting_Older_Browsers)
- : In this module, we recommend using Flexbox and Grid as the main layout methods for your designs. However, there are bound to be visitors to a site you develop in the future who use older browsers, or browsers which do not support the methods you have used. This will always be the case on the web — as new features are developed, different browsers will prioritize different features. This article explains how to use modern web techniques without excluding users of older technology.
- : In this module, we recommend using flexbox and grid as the main layout methods for your designs. However, there are bound to be visitors to a site you develop in the future who use older browsers, or browsers which do not support the methods you have used. This will always be the case on the web — as new features are developed, different browsers will prioritize different features. This article explains how to use modern web techniques without excluding users of older technology.

## Assessments

Expand Down
10 changes: 5 additions & 5 deletions files/en-us/learn/css/css_layout/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For many of the elements on your page, the normal flow will create exactly the l

The methods that can change how elements are laid out in CSS are:

- **The {{cssxref("display")}} property** — Standard values such as `block`, `inline` or `inline-block` can change how elements behave in normal flow, for example, by making a block-level element behave like an inline-level element (see [Types of CSS boxes](/en-US/docs/Learn/CSS/Building_blocks/The_box_model#block_and_inline_boxes) for more information). We also have entire layout methods that are enabled via specific `display` values, for example, [CSS Grid](/en-US/docs/Learn/CSS/CSS_layout/Grids) and [Flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox), which alter how child elements are laid out inside their parents.
- **The {{cssxref("display")}} property** — Standard values such as `block`, `inline` or `inline-block` can change how elements behave in normal flow, for example, by making a block-level element behave like an inline-level element (see [Types of CSS boxes](/en-US/docs/Learn/CSS/Building_blocks/The_box_model#block_and_inline_boxes) for more information). We also have entire layout methods that are enabled via specific `display` values, for example, [CSS grid](/en-US/docs/Learn/CSS/CSS_layout/Grids) and [Flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox), which alter how child elements are laid out inside their parents.
- **Floats** — Applying a {{cssxref("float")}} value such as `left` can cause block-level elements to wrap along one side of an element, like the way images sometimes have text floating around them in magazine layouts.
- **The {{cssxref("position")}} property** — Allows you to precisely control the placement of boxes inside other boxes. `static` positioning is the default in normal flow, but you can cause elements to be laid out differently using other values, for example, as fixed to the top of the browser viewport.
- **Table layout** — Features designed for styling parts of an HTML table can be used on non-table elements using `display: table` and associated properties.
Expand Down Expand Up @@ -161,15 +161,15 @@ As a simple example, we can add the {{cssxref("flex")}} property to all of our c

{{ EmbedLiveSample('Setting_the_flex_property', '300', '200') }}

> **Note:** This has been a very short introduction to what is possible in Flexbox. To find out more, see our [Flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox) article.
> **Note:** This has been a very short introduction to what is possible in flexbox. To find out more, see our [Flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox) article.
## Grid Layout

While flexbox is designed for one-dimensional layout, Grid Layout is designed for two dimensions — lining things up in rows and columns.

### Setting display: grid

Similar to flexbox, we enable Grid Layout with its specific display value — `display: grid`. The below example uses similar markup to the flex example, with a container and some child elements. In addition to using `display: grid`, we also define some row and column _tracks_ for the parent using the {{cssxref("grid-template-rows")}} and {{cssxref("grid-template-columns")}} properties respectively. We've defined three columns, each of `1fr`, as well as two rows of `100px`. We don't need to put any rules on the child elements; they're automatically placed into the cells our grid's created.
Similar to flexbox, we enable grid layout with its specific display value — `display: grid`. The below example uses similar markup to the flex example, with a container and some child elements. In addition to using `display: grid`, we also define some row and column _tracks_ for the parent using the {{cssxref("grid-template-rows")}} and {{cssxref("grid-template-columns")}} properties respectively. We've defined three columns, each of `1fr`, as well as two rows of `100px`. We don't need to put any rules on the child elements; they're automatically placed into the cells our grid's created.

```css hidden
* {
Expand Down Expand Up @@ -255,7 +255,7 @@ Once you have a grid, you can explicitly place your items on it, rather than rel

{{ EmbedLiveSample('Placing_items_on_the_grid', '300', '330') }}

> **Note:** These two examples reveal just a small sample of the power of Grid layout. To learn more, see our [Grid Layout](/en-US/docs/Learn/CSS/CSS_layout/Grids) article.
> **Note:** These two examples reveal just a small sample of the power of grid layout. To learn more, see our [Grid Layout](/en-US/docs/Learn/CSS/CSS_layout/Grids) article.
The rest of this guide covers other layout methods that are less important for the main layout of your page, but still help to achieve specific tasks. By understanding the nature of each layout task you will soon find that when you look at a particular component of your design, the type of layout most suitable for it will often be clear.

Expand Down Expand Up @@ -321,7 +321,7 @@ p {

{{ EmbedLiveSample('Floats', '100%', 600) }}

> **Note:** Floats are fully explained in our lesson on the [float and clear](/en-US/docs/Learn/CSS/CSS_layout/Floats) properties. Prior to techniques such as Flexbox and Grid Layout, floats were used as a method of creating column layouts. You may still come across these methods on the web; we will cover these in the lesson on [legacy layout methods](/en-US/docs/Learn/CSS/CSS_layout/Legacy_Layout_Methods).
> **Note:** Floats are fully explained in our lesson on the [float and clear](/en-US/docs/Learn/CSS/CSS_layout/Floats) properties. Prior to techniques such as flexbox and grid layout, floats were used as a method of creating column layouts. You may still come across these methods on the web; we will cover these in the lesson on [legacy layout methods](/en-US/docs/Learn/CSS/CSS_layout/Legacy_Layout_Methods).
## Positioning techniques

Expand Down
Loading

0 comments on commit d6a792e

Please sign in to comment.