Giter VIP home page Giter VIP logo

Comments (6)

RichDonnellan avatar RichDonnellan commented on May 22, 2024 7

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

from gridgarden.

knpwrs avatar knpwrs commented on May 22, 2024 1

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.

from gridgarden.

stee1house avatar stee1house commented on May 22, 2024 1

@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!

from gridgarden.

RichDonnellan avatar RichDonnellan commented on May 22, 2024

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

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

from gridgarden.

HDv2b avatar HDv2b commented on May 22, 2024

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

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

from gridgarden.

thomaspark avatar thomaspark commented on May 22, 2024

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

from gridgarden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.