Comments (6)
Alright... looking at your code i realize you want me to do grid-template-rows: 50px 0 0 0 1fr
, but I never knew this was possible.
Anyway, i still think my solution may be considered valid. And a little explanation about the zeroes here, would be quite interessting. ;)
As i said before, very nice job here.
from gridgarden.
You didn't solve the challenge correctly: 4 * 10px = 40px
but the challenge requires 50px
of space above the carrots. I solved it with
grid-template-rows: repeat(4, calc(50px / 4)) 1fr;
which worked just fine.
from gridgarden.
@Dean-Coakley As you can see, this is not the right answer. But I can explain, of course, what I thought I was doing:
The exercise ask "to water all but the top 50 pixels of your garden". But you also see in the code that the water will only fill the fifth row: grid-row: 5 / 6;
this translates to grid-row: grid-column-start / grid-column-end
> more on MDN.
So, I have to water the fifth row, and i also have to let 50px without water.
In my solution the first row == 50px
, the second, third and fourth row are 0px
(or just 0
) which means the rows exist, but they are 0 pixel height, and lastly, the fifth will take all the available space to fill with water, so == 1fr
.
Or, in a more visual way:
Row 1 = 50px
Row 2 = 0
Row 3 = 0
Row 4 = 0
Row 5 = 1fr
But, as you also can see, this is a little hacky. What i wanted to do was what @jgierer12 pointed out. And, I assume you understand what he said.
I hope this clarify my hacky-solution. :)
from gridgarden.
my mistake! :) you're totally right... thanks for pointing it out!
from gridgarden.
@fspin Can you explain grid-template-rows: 50px 0 0 0 1fr
for me please?
from gridgarden.
I did the same as @fspin and wondered why it did not work: after all, it complied with the problem statement (all but top 50px were watered) and it was never explained that zero-tall rows were valid in general or allowed in the challenges.
Ideally the player should be able to figure out the solution without searching in GitHub issues.
from gridgarden.
Related Issues (20)
- Level 20: auto alignment HOT 1
- Adding Arabic translation in progress HOT 1
- Level 8 span keyword not works HOT 2
- Add Finnish translation HOT 1
- Vietnamese review recommended HOT 1
- any random value for grid-column-end fills row HOT 1
- Feat request: Store progress in localStorage or indexedDB HOT 1
- Support multiple possible answers HOT 2
- Level 24 Won't Accept 50px repeat(3, 1fr) 50px HOT 1
- level 14 Question is incomprehensible HOT 1
- Level 24 breaks on some screen sizes HOT 1
- add a bunny
- N/A
- About node_modules folder HOT 2
- .
- Grid Garden Level 26 HOT 2
- Level 8 completes without writing any values
- Azerbaijan language HOT 3
- add grid guide lines
- Misleading wording in level 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gridgarden.