Skip to content

Implement CSS grid in exercise files#1

Open
b3rgundy wants to merge 1 commit into
mainfrom
feature/grids-exercise
Open

Implement CSS grid in exercise files#1
b3rgundy wants to merge 1 commit into
mainfrom
feature/grids-exercise

Conversation

@b3rgundy

@b3rgundy b3rgundy commented Feb 2, 2023

Copy link
Copy Markdown
Owner

Merge this branch into main

@b3rgundy b3rgundy self-assigned this Feb 2, 2023
Comment thread Exercise 1/styles.css
"nav content sidebar"
"nav footer footer";
grid-template-columns: minmax(64px, 1fr) 3fr minmax(64px, 1fr);
grid-template-rows: 120px 1fr 80px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
grid-template-rows: 120px 1fr 80px;
grid-template-rows: min-content 1fr min-content;

Comment thread Exercise 1/styles.css
"header header header"
"nav content sidebar"
"nav footer footer";
grid-template-columns: minmax(64px, 1fr) 3fr minmax(64px, 1fr);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With what purpose did you introduce the minmax?

Comment thread Exercise 1/styles.css
}

nav {
grid-area: nav;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I wouldn't abbreviate this. While this might be a clear abbreviation, you'll and up using abbreviations that aren't clear to everyone.

Comment thread Exercise 3/styles.css
Comment on lines +27 to +42
grid-column: 2 / -2;
}
.box-3 {
background-color: #71816d;
grid-row: 2 / -2;
grid-column: 1 / span 1;
}
.box-4 {
background-color: #342a21;
grid-row: 3 / span 1;
grid-column: 2 / -2;
}
.box-5 {
background-color: #da667b;
grid-row: 2 / -2;
grid-column: -1 / -2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try using span instead of these negative values. Using -1 is fine for getting the last element when the number of items is unknown, but otherwise it gets quite unclear.

Comment thread Exercise 2/styles.css
padding: 20px;
display: grid;
gap: 32px;
grid-template-columns: repeat(4, minmax(160px, 1fr));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the usage of minmax here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants