Skip to content

Commit ed2b372

Browse files
authored
fix(curriculum): make color percentage requirements clearer (freeCodeCamp#56607)
1 parent 18d3142 commit ed2b372

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

curriculum/challenges/english/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9904.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ gradient-type(
1717
);
1818
```
1919

20-
Fill in `.bb3` with a `repeating-linear-gradient`. Use `90deg` for the direction, your `building-color3` for the first two colors, and `window-color3` at `15%` for the third. When you don't specify a distance for a color, it will use the values that makes sense. In this case, the first two colors will default to `0%` and `7.5%` because it starts at `0%`, and `7.5%` is half of the `15%`.
20+
Fill in `.bb3` with a `repeating-linear-gradient`. Use `90deg` for the direction, your `building-color3` for the first two colors, and `window-color3` at `15%` for the third.
21+
22+
When you don't specify a distance for a color, it will use the values that makes sense. In this case, the first two colors will default to `0%` and `7.5%` because it starts at `0%`, and `7.5%` is half of the `15%`, so you do not need to set them.
2123

2224
# --hints--
2325

@@ -33,6 +35,18 @@ You should use `90deg` for the direction in the first argument of `repeating-lin
3335
assert.include(new __helpers.CSSHelp(document).getStyle(".bb3")?.getPropVal('background', true), "repeating-linear-gradient(90deg");
3436
```
3537
38+
You should not set the percentage for the first color.
39+
40+
```js
41+
assert.notInclude(new __helpers.CSSHelp(document).getStyle(".bb3")?.getPropVal('background', true), "var(--building-color3)0%");
42+
```
43+
44+
You should not set the percentage for the second color.
45+
46+
```js
47+
assert.notInclude(new __helpers.CSSHelp(document).getStyle(".bb3")?.getPropVal('background', true), "var(--building-color3)7.5%");
48+
```
49+
3650
You should use `--building-color3` for the first two colors.
3751
3852
```js

0 commit comments

Comments
 (0)