Learn Typography by building a Nutrition Label:Step 22
See original GitHub issueDescribe the Issue
In this ,we have to add span tag in between p tags and if we give spacing between text present in p tags only then the test cases is accepted. This case will work:-
//<div class="label">
//<h1 class="bold">Nutrition Facts</h1>
//<div class="divider"></div>
//<p>8 servings per container</p>
//<p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
//</div>
But This will not work:-
// <div class="label">
//<h1 class="bold">Nutrition Facts</h1>
//<div class="divider"></div>
//<p>8 servings per container</p>
//<p class="bold">Serving size<span class="right"> 2/3 cup (55g)</span></p>
//</div>
we can add a new test case which could allow the second one too or can add a description regarding it.
Affected Page
Your code
//<div class="label">
// <h1 class="bold">Nutrition Facts</h1>
//<div class="divider"></div>
//<p>8 servings per container</p>
//<p class="bold">Serving size<span class="right"> 2/3 cup (55g)</span></p>
//</div>
Expected behavior
This should have been worked or we could actually tell the user to rectify the spacing
Screenshots
No response
System
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 22] Laptop Windows 11 Brave
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:20 (19 by maintainers)
Top Results From Across the Web
[Step 22]Learn Typography by Building a Nutrition Label
Tell us what's happening: Describe your issue in detail here. I'm told to " Wrap the text 2/3 cup (55g) in a span...
Read more >Learn Typography by Building a Nutrition Label | PLAYCODE
Learn Typography by Building a Nutrition Label. Step 1 ... Step 18. PRO. Step 19. PRO. Step 20. PRO. Step 21. PRO. Step...
Read more >step 47 freecodecamp nutrition table - Code Grepper
Daily Value * Total Fat 8g10% Saturated Fat 1g 5%
Read more >Guide to creating a front of pack (FoP) nutrition label for pre ...
This guidance provides a step-by-step guide through the process of creating a FoP label, with further advice and worked examples provided in the...
Read more >Raj Pansuriya (@Raj_Pansuriya7) / Twitter
It was about learning typography by building a Nutrition Label. Understood significance of text-styling and got to use many new CSS rules and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, I’m going to open this up for help. We want to change the test so it allows a space at the start of that span, but keep the test for the paragraph so the whole sentence is correct. It’s the third test in this file
@moT01, removing the leading/trailing white space from the span assertion could be an option. That way, the test only has to confirm the correct text(leading/trailing space) and let the general
p
tag test handle any spacing issues.