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:
Anna
2024-12-21 05:20:01 -05:00
committed by GitHub
parent eabf73b30f
commit 8600ebb081

View File

@@ -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`.