Skip to content
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

I don't understand how end 22 level. #13

Closed
stee1house opened this issue Apr 5, 2017 · 6 comments
Closed

I don't understand how end 22 level. #13

stee1house opened this issue Apr 5, 2017 · 6 comments

Comments

@stee1house
Copy link

I use "grid-template-rows: 10px 10px 10px 10px 1fr;" this css rule, but this is wrong, I don't understand why.

@knpwrs
Copy link

knpwrs commented Apr 5, 2017

WARNING! SPOILERS!

Your solution does 40px. Also, instead of 1fr you'll want 100fr, as in "100% of the remaining space" for the fifth column.

This also works:

grid-template-rows: repeat(4, 12.5px) 100fr;

@thomaspark this level wasn't very clear to me either. My solution was actually inspired by @stee1house's solution.

@RichDonnellan
Copy link

RichDonnellan commented Apr 5, 2017

@knpwrs 100fr works, but isn't necessary. 1fr takes up any remaining space available after fixed-size and auto-sized tracks are calculated.

@stee1house
Copy link
Author

@knpwrs thanks for fast response, I' have already done this level - it is my solution "grid-template-rows: 50px 0 0 0 1fr;"
@thomaspark thanks for the great game!

@RichDonnellan
Copy link

RichDonnellan commented Apr 5, 2017

@stee1house Nice solution! I didn't think to use 0 as a value. Optimal answer IMO:

grid-template-rows: 50px repeat(3, 0) 1fr;

@HDv2b
Copy link

HDv2b commented Apr 6, 2017

Not so elaborate, I just made the first 4 rows fill 50px..

grid-template-rows: 10px 10px 10px 20px 1fr;

@thomaspark
Copy link
Owner

Thanks for the comments all. Multiple ways to solve this level, all valid!

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

No branches or pull requests

5 participants