From ba927090fe6efc8c90d86e0bff7d8aaab94c4b55 Mon Sep 17 00:00:00 2001
From: lasjorg <28780271+lasjorg@users.noreply.github.com>
Date: Tue, 26 Nov 2019 04:40:21 +0100
Subject: [PATCH] fix(challenge): account for browser zoom, add note to
challenge (for height challenge) (#37687)
* fix(challenge): account for browser zoom, add note to challenge
* fix(challenge): use regex for height assert
* fix(challenge): remove note
* fix(challenge): revert to initial PR code
---
...e-height-of-an-element-using-the-height-property.english.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-height-of-an-element-using-the-height-property.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-height-of-an-element-using-the-height-property.english.md
index 48dec0be20..2439a6f851 100644
--- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-height-of-an-element-using-the-height-property.english.md
+++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-height-of-an-element-using-the-height-property.english.md
@@ -21,6 +21,7 @@ img {
## Instructions
Add a height
property to the h4
tag and set it to 25px.
+Note: You may need to be at 100% zoom to pass the test on this challenge.
## Tests
@@ -29,7 +30,7 @@ Add a height
property to the h4
tag and set it to 25px
```yml
tests:
- text: Your code should change the h4
height
property to a value of 25 pixels.
- testString: assert(document.querySelector('h4').offsetHeight === 25 && /h4{\S*height:25px(;\S*}|})/.test($('style').text().replace(/\s/g ,'')));
+ testString: assert(Math.round(document.querySelector('h4').getBoundingClientRect().height) === 25 && /h4{\S*height:25px(;\S*}|})/.test($('style').text().replace(/\s/g ,'')));
```