hey, so the task is to assign a fallback property to a variable and I tried to do the by several and and so many times but it doesn’t worked .
<style>
:root {
--red-color: red;
}
.red-box {
background: var(--red-color, red);
height: 200px;
width:200px;
}
</style>
<div class="red-box"></div>
https://www.freecodecamp.org/learn/responsive-web-design/basic-css/improve-compatibility-with-browser-fallbacks
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
.
Challenge: Improve Compatibility with Browser Fallbacks
Link to the challenge:
It wants you to set the fallback on a separate line. Leave the line where the var is used, and set the background again on the line before, hardcoding the value.
You can use the Reset All Code button to start over.
2 Likes
A great hint they leave is a “blank line” between two lines of code. That is the right place to type code in.
1 Like
system
Closed
October 20, 2021, 12:00pm
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.