question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Beta - Test Case Broken - Sass: Use @for to Create a Sass Loop

See original GitHub issue

Challenge Name

http://beta.freecodecamp.com/en/challenges/sass/use-for-to-create-a-sass-loop?

Issue Description

The test case for this challenge is broken.

SASS does not appear to be working for the in browser editor, as hitting submit doesn’t properly show the SASS changes.

Using an editor like codepen that has sass configured will show that the code does what is instructed.

FCC says it fails these tests, but the code is correct, FCC is wrong. Your .text-1 class should have a font-size of 10px. Your .text-2 class should have a font-size of 20px. Your .text-3 class should have a font-size of 30px. Your .text-4 class should have a font-size of 40px. Your .text-5 class should have a font-size of 50px.

Browser Information

  • Browser Name, Version: Chrome
  • Operating System: Windows 10
  • Mobile, Desktop, or Tablet: Desktop

Your Code


<style>
  @for $j from 1 to 6{
    .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>

Screenshot

fcc

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:31 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shtscompanycommented, Dec 6, 2018

This is working 100%`

<style type='text/sass'>
  
  @for $j from 1 to 6 {
    .text-#{$j} { font-size: 10px*$j; }
  }
.text-1{
  font-size: 10px;
}
.text-2 {
  font-size: 20px;
}
.text-3{
  font-size: 30px;
}
.text-4{
  font-size: 40px;
}
.text-5{
  font-size: 50px;
}
  
</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>`
1reaction
nurulilmaancommented, Aug 9, 2018

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use @for to Create a Sass Loop - Sass - Free Code Camp
In this front end libraries certification tutorial we look as SASS where we use @for to create a Sass loop. This video constitutes...
Read more >
Use @for to Create a Sass Loop- Answer Correct but no test ...
I need you to open the browser console (Ctrl+Shft+J) and use the Inspector tool to select the preview pane. Once selected, go the...
Read more >
Sass loop @mixin and @include - css - Stack Overflow
I have tested your code in https://www.sassmeister.com/ and just added @include generatePadding(3); at the end of it. It's result is:
Read more >
Customize Styling | Mendix Documentation
... of apps and create re-usable styling. For progressive and web apps, SASS (SCSS) is used and for native mobile apps JavaScript is...
Read more >
gulp-sass - npm
Gulp plugin for sass. Latest version: 5.1.0, last published: a year ago. Start using gulp-sass in your project by running `npm i gulp-sass`....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found