mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
fix(curriculum): more lenient border width for legacy css (#57637)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
@@ -50,10 +50,14 @@ assert.isTrue(document.querySelector('img').classList.contains('thick-green-bord
|
||||
Your image should have a border width of `10px`.
|
||||
|
||||
```js
|
||||
// Note: to any future maintainers, the read width of the border is dependent on
|
||||
// the zoom. For example we cannot match 10px exactly because if a campers set the zoom to 110%
|
||||
// it will be read as 9~px.
|
||||
const image = document.querySelector('img');
|
||||
const imageBorderTopWidth = window.getComputedStyle(image)["border-top-width"];
|
||||
|
||||
assert.strictEqual(imageBorderTopWidth, "10px")
|
||||
const widthNumber = parseInt(imageBorderTopWidth);
|
||||
assert.isAtLeast(widthNumber, 8);
|
||||
assert.isAtMost(widthNumber, 12);
|
||||
```
|
||||
|
||||
Your image should have a border style of `solid`.
|
||||
|
||||
Reference in New Issue
Block a user