Skip to content

Improve Flexbox marking guide #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions learn/tasks/flexbox/marking.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ li {
}
```

### Additional question

The student should add an additional selector that targets the first element and sets `flex: 2;` (or `flex: 2 0 0;` or `flex-grow: 2`):

```
li:first-child {
flex: 2;
}
```

## Flex Layout Three

Here we use Flexbox to center an item horizontally and vertically. The aim of this task is to demonstrate the student has an understanding of how to use the alignment properties to achieve this.
Expand All @@ -54,3 +64,14 @@ On the parent they should use:
## Flex Layout Four

This example demonstrates understanding of the `flex-wrap` property to wrap flex lines. In addition, to ensure that they end up with something that looks like the example they need to set `flex: auto` on the child (or `flex: 1 1 auto;`).

```
ul {
display: flex;
flex-wrap: wrap;
}

li {
flex: auto;
}
```