From 8dffd3b124f03675b150f2a097cda58b56e0d239 Mon Sep 17 00:00:00 2001 From: Aditi Joshi Date: Sat, 27 Apr 2019 03:26:22 -0400 Subject: [PATCH] Fix/update challenge for responsive web design principles chinese (#35918) * Fix/update challenges for responsive-web-design-principles chinese * fix: corrected translation --- .../create-a-media-query.chinese.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/chinese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.chinese.md b/curriculum/challenges/chinese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.chinese.md index 31d007ec2a..60108e7393 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.chinese.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.chinese.md @@ -17,11 +17,12 @@ localeTitle: 创建媒体查询 ```yml tests: - - text: 当设备height小于或等于800px时,您的p元素的font-size为10px。 - testString: 'assert($("p").css("font-size") == "10px", "Your p element should have the font-size of 10px when the device height is less than or equal to 800px.");' - text: 为height小于或等于800px的设备声明@media查询。 - testString: 'assert(code.match(/@media\s*?\(\s*?max-height\s*?:\s*?800px\s*?\)/g), "Declare a @media query for devices with a height less than or equal to 800px.");' - + testString: assert($(“style”).text().replace(/\s/g ,‘’).match(/@media\(max-height:800px\)/g), “Declare a @media query for devices with a height less than or equal to 800px.“); + - 当设备 height 小于或等于800px时, p 元素的 font-size 应为10px. + testString: assert($(“style”).text().replace(/\s/g ,‘’).match(/@media\(max-height:800px\){p{font-size:10px;?}}/g), “Your p element should have the font-size of 10px when the device height is less than or equal to 800px.“);’ + - text: 当设备height大于800px时,您的p元素的font-size初始值应为20px。 + testString: assert($(“style”).text().replace(/\s/g ,‘’).replace(/@media.*}/g, ‘’).match(/p{font-size:20px;?}/g), Your p element should have an initial font-size of 20px when the device height is more than 800px); ```