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] - Front End Libraries - Sass - Apply a Style Until a Condition is Met with @while

See original GitHub issue

Describe your problem and - if possible - how to reproduce it

Challenge passes for all .text classes except text-1 , while the font-size is correctly changed for text-1 in the HTML page. Here is my solution code:

  $x: 1;
  @while $x < 11 {
    .text-#{$x} { font-size: #{5*$x}px;}
    $x: $x + 1;
  }

Add a Link to the page with the problem

https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while

Tell us about your browser and operating system

  • Browser Name: Chrome
  • Browser Version: 66.0.3359.181 (Official Build) (64-bit)
  • Operating System: Windows 10

If possible, add a screenshot here

screenshot 27

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:27 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
dCreminscommented, Jun 6, 2018

Having the same problem. Even tried setting .text-1 manually after the loop to no luck. screenshot 2018-06-06 09 49 31

1reaction
chenjacky131commented, Jul 19, 2018

try run test multiple times or try in another browser. that works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apply a Style Until a Condition is Met with @while - Sass
In this front end libraries certification tutorial we look as SASS where we apply a style until a condition is met with @while....
Read more >
Sass - Apply a Style Until a Condition is Met with @while
[BETA] - Front End Libraries - Sass - Apply a Style Until a Condition is Met with @while · Describe your problem and...
Read more >
Apply a Style Until a Condition is Met with @while sass
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 . Link ...
Read more >
Docs • Svelte
Svelte's <script> blocks are run only when the component is created, so assignments within a ... To apply styles to a selector globally,...
Read more >
Sass: @if and @else
The @if rule is written @if <expression> { ... } , and it controls whether or not its block gets evaluated (including emitting...
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