Implement CSS grid in exercise files#1
Open
b3rgundy wants to merge 1 commit into
Open
Conversation
RobbinHabermehl
suggested changes
Feb 2, 2023
| "nav content sidebar" | ||
| "nav footer footer"; | ||
| grid-template-columns: minmax(64px, 1fr) 3fr minmax(64px, 1fr); | ||
| grid-template-rows: 120px 1fr 80px; |
There was a problem hiding this comment.
Suggested change
| grid-template-rows: 120px 1fr 80px; | |
| grid-template-rows: min-content 1fr min-content; |
| "header header header" | ||
| "nav content sidebar" | ||
| "nav footer footer"; | ||
| grid-template-columns: minmax(64px, 1fr) 3fr minmax(64px, 1fr); |
There was a problem hiding this comment.
With what purpose did you introduce the minmax?
| } | ||
|
|
||
| nav { | ||
| grid-area: nav; |
There was a problem hiding this comment.
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 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; |
There was a problem hiding this comment.
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.
| padding: 20px; | ||
| display: grid; | ||
| gap: 32px; | ||
| grid-template-columns: repeat(4, minmax(160px, 1fr)); |
There was a problem hiding this comment.
Can you explain the usage of minmax here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge this branch into main