html
<style type='text/sass'>
@for $j from 1 through 5 {
.text-#{$j} { font-size: 10px * $j; }
}
</style>
<p class="text-1">Hello</p>
<p class="text-2">Hello</p>
<p class="text-3">Hello</p>
<p class="text-4">Hello</p>
<p class="text-5">Hello</p>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
.
Challenge: Use @for to Create a Sass Loop
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
Hi, My browser is Chrome.
Google Chrome
Version 79.0.3945.88 (official version) (64-bit)
I sure. Because other problems can be passed。
camperextraordinaire:
$('.text-1').css('font-size')
$('.text-1').css('font-size') .
Console prints to 12px, That is why it failed.
What should I do to make the console print out 10px
I try to do it, thanks, brother
It is crazy. You’re right. I set it up. I haven’t encountered such problems before. You helped me a lot.
Thank you for taking the time to answer me. Have a nice day
This is really a good idea。Can help more people in the future
Just set it up. Then refresh the page. You can pass this question.
Hi @camperextraordinaire ,
My Google Chrome browser is set to 100% zoom and my font-size is set to 10px, but I still can’t get the challenge to pass to mark as completed.
Below is a screenshot of me following the instructions you gave Troylrvo, but it didn’t work for me. I even tried to switch to Mozilla FireFox after Chrome didn’t work.
The solution on the Hint page is not working: freeCodeCamp Challenge Guide: Use @for to Create a Sass Loop
I don’t know what to do at this point.
ILM
July 5, 2020, 6:40pm
19
please create a topic for your question using the Get Help->Ask for help button so that your code is included (instead of a screenshot)
The solution code in the hints is wrong, you can’t just copy and paste it.
The type
needs to be scss
not sass
.
type='text/scss'
The starting font size should be 15px not 10px.
Edit: I updated the solution code.
1 Like
Thank you @lasjorg ! It finally works and the submission went through to the next challenge.
@ILM I used the code in this thread and in the link I sent. I’m good now. Lasorg helped me!