Bug report: container vs container2 class

Tell us what’s happening:
I know I should type “auto-fit” in “container2” class, but I found that typing this in “container” class can passed the test, too…

Your code so far


<style>
.item1{background:LightSkyBlue;}
.item2{background:LightSalmon;}
.item3{background:PaleTurquoise;}
.item4{background:LightPink;}
.item5{background:PaleGreen;}

.container {
  font-size: 40px;
  min-height: 100px;
  width: 100%;
  background: LightGray;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  grid-template-rows: 1fr 1fr 1fr;
  grid-gap: 10px;
}

.container2 {
  font-size: 40px;
  min-height: 100px;
  width: 100%;
  background: Silver;
  display: grid;
  /* change the code below this line */

  grid-template-columns: repeat(3, minmax(60px, 1fr));

  /* change the code above this line */
  grid-template-rows: 1fr 1fr 1fr;
  grid-gap: 10px;
}
</style>

<div class="container">
<div class="item1">1</div>
<div class="item2">2</div>
<div class="item3">3</div>
<div class="item4">4</div>
<div class="item5">5</div>
</div>
<div class="container2">
<div class="item1">1</div>
<div class="item2">2</div>
<div class="item3">3</div>
<div class="item4">4</div>
<div class="item5">5</div>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0.

Challenge: Create Flexible Layouts Using auto-fit

Link to the challenge:

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

2 Likes

@smile1120 Thanks for reporting this. I went ahead an created this pull request to fix this bug, so you do not need to create an issue now.

2 Likes

@RandellDawson Actually, I’m totally new to GitHub, so I was searching for tutorials about pull request. And when I was going do this, I found your post. So, thanks for your help anyway.