From 8600ebb081bdde340cde294b40c04207e7013a36 Mon Sep 17 00:00:00 2001 From: Anna Date: Sat, 21 Dec 2024 05:20:01 -0500 Subject: [PATCH] fix(curriculum): more lenient border width for legacy css (#57637) Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> --- .../basic-css/add-borders-around-your-elements.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.md index 4d395b07e01..51d36422daa 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.md @@ -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`.