diff --git a/challenges/01-responsive-web-design/basic-css.json b/challenges/01-responsive-web-design/basic-css.json index c1215859271..2a04c781b60 100644 --- a/challenges/01-responsive-web-design/basic-css.json +++ b/challenges/01-responsive-web-design/basic-css.json @@ -20,14 +20,11 @@ "tests": [ { "text": "Your h2 element should be red.", - "testString": - "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" + "testString": "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" }, { - "text": - "Your style declaration should end with a ; .", - "testString": - "assert(code.match(/\\s*CatPhotoApp\\s*<\\/h2>/),' Your style declaration should end with a ; .');" + "text": "Your style declaration should end with a ; .", + "testString": "assert(code.match(/\\s*CatPhotoApp\\s*<\\/h2>/),' Your style declaration should end with a ; .');" } ], "challengeType": 0, @@ -141,32 +138,24 @@ ], "tests": [ { - "text": - "Remove the style attribute from your h2 element.", - "testString": - "assert(!$(\"h2\").attr(\"style\"), 'Remove the style attribute from your h2 element.');" + "text": "Remove the style attribute from your h2 element.", + "testString": "assert(!$(\"h2\").attr(\"style\"), 'Remove the style attribute from your h2 element.');" }, { "text": "Create a style element.", - "testString": - "assert($(\"style\") && $(\"style\").length > 1, 'Create a style element.');" + "testString": "assert($(\"style\") && $(\"style\").length > 1, 'Create a style element.');" }, { "text": "Your h2 element should be blue.", - "testString": - "assert($(\"h2\").css(\"color\") === \"rgb(0, 0, 255)\", 'Your h2 element should be blue.');" + "testString": "assert($(\"h2\").css(\"color\") === \"rgb(0, 0, 255)\", 'Your h2 element should be blue.');" }, { - "text": - "Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace.", - "testString": - "assert(code.match(/h2\\s*\\{\\s*color\\s*:.*;\\s*\\}/g), 'Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace.');" + "text": "Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace.", + "testString": "assert(code.match(/h2\\s*\\{\\s*color\\s*:.*;\\s*\\}/g), 'Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace.');" }, { - "text": - "Make sure all your style elements are valid and have a closing tag.", - "testString": - "assert(code.match(/<\\/style>/g) && code.match(/<\\/style>/g).length === (code.match(//g) || []).length, 'Make sure all your style elements are valid and have a closing tag.');" + "text": "Make sure all your style elements are valid and have a closing tag.", + "testString": "assert(code.match(/<\\/style>/g) && code.match(/<\\/style>/g).length === (code.match(//g) || []).length, 'Make sure all your style elements are valid and have a closing tag.');" } ], "challengeType": 0, @@ -294,26 +283,19 @@ "tests": [ { "text": "Your h2 element should be red.", - "testString": - "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" + "testString": "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" }, { - "text": - "Your h2 element should have the class red-text.", - "testString": - "assert($(\"h2\").hasClass(\"red-text\"), 'Your h2 element should have the class red-text.');" + "text": "Your h2 element should have the class red-text.", + "testString": "assert($(\"h2\").hasClass(\"red-text\"), 'Your h2 element should have the class red-text.');" }, { - "text": - "Your stylesheet should declare a red-text class and have its color set to red.", - "testString": - "assert(code.match(/\\.red-text\\s*\\{\\s*color\\s*:\\s*red;\\s*\\}/g), 'Your stylesheet should declare a red-text class and have its color set to red.');" + "text": "Your stylesheet should declare a red-text class and have its color set to red.", + "testString": "assert(code.match(/\\.red-text\\s*\\{\\s*color\\s*:\\s*red;\\s*\\}/g), 'Your stylesheet should declare a red-text class and have its color set to red.');" }, { - "text": - "Do not use inline style declarations like style=\"color: red\" in your h2 element.", - "testString": - "assert($(\"h2\").attr(\"style\") === undefined, 'Do not use inline style declarations like style=\"color: red\" in your h2 element.');" + "text": "Do not use inline style declarations like style=\"color: red\" in your h2 element.", + "testString": "assert($(\"h2\").attr(\"style\") === undefined, 'Do not use inline style declarations like style=\"color: red\" in your h2 element.');" } ], "challengeType": 0, @@ -441,31 +423,23 @@ "tests": [ { "text": "Your h2 element should be red.", - "testString": - "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" + "testString": "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.');" }, { - "text": - "Your h2 element should have the class red-text.", - "testString": - "assert($(\"h2\").hasClass(\"red-text\"), 'Your h2 element should have the class red-text.');" + "text": "Your h2 element should have the class red-text.", + "testString": "assert($(\"h2\").hasClass(\"red-text\"), 'Your h2 element should have the class red-text.');" }, { "text": "Your first p element should be red.", - "testString": - "assert($(\"p:eq(0)\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your first p element should be red.');" + "testString": "assert($(\"p:eq(0)\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your first p element should be red.');" }, { - "text": - "Your second and third p elements should not be red.", - "testString": - "assert(!($(\"p:eq(1)\").css(\"color\") === \"rgb(255, 0, 0)\") && !($(\"p:eq(2)\").css(\"color\") === \"rgb(255, 0, 0)\"), 'Your second and third p elements should not be red.');" + "text": "Your second and third p elements should not be red.", + "testString": "assert(!($(\"p:eq(1)\").css(\"color\") === \"rgb(255, 0, 0)\") && !($(\"p:eq(2)\").css(\"color\") === \"rgb(255, 0, 0)\"), 'Your second and third p elements should not be red.');" }, { - "text": - "Your first p element should have the class red-text.", - "testString": - "assert($(\"p:eq(0)\").hasClass(\"red-text\"), 'Your first p element should have the class red-text.');" + "text": "Your first p element should have the class red-text.", + "testString": "assert($(\"p:eq(0)\").hasClass(\"red-text\"), 'Your first p element should have the class red-text.');" } ], "challengeType": 0, @@ -581,10 +555,8 @@ ], "tests": [ { - "text": - "Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.", - "testString": - "assert(code.match(/p\\s*{\\s*font-size\\s*:\\s*16\\s*px\\s*;\\s*}/i), 'Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.');" + "text": "Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.", + "testString": "assert(code.match(/p\\s*{\\s*font-size\\s*:\\s*16\\s*px\\s*;\\s*}/i), 'Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.');" } ], "challengeType": 0, @@ -689,10 +661,8 @@ ], "tests": [ { - "text": - "Your p elements should use the font monospace.", - "testString": - "assert($(\"p\").not(\".red-text\").css(\"font-family\").match(/monospace/i), 'Your p elements should use the font monospace.');" + "text": "Your p elements should use the font monospace.", + "testString": "assert($(\"p\").not(\".red-text\").css(\"font-family\").match(/monospace/i), 'Your p elements should use the font monospace.');" } ], "challengeType": 0, @@ -811,25 +781,19 @@ "tests": [ { "text": "Import the Lobster font.", - "testString": - "assert(new RegExp(\"googleapis\", \"gi\").test(code), 'Import the Lobster font.');" + "testString": "assert(new RegExp(\"googleapis\", \"gi\").test(code), 'Import the Lobster font.');" }, { - "text": - "Your h2 element should use the font Lobster.", - "testString": - "assert($(\"h2\").css(\"font-family\").match(/lobster/i), 'Your h2 element should use the font Lobster.');" + "text": "Your h2 element should use the font Lobster.", + "testString": "assert($(\"h2\").css(\"font-family\").match(/lobster/i), 'Your h2 element should use the font Lobster.');" }, { "text": "Use an h2 CSS selector to change the font.", - "testString": - "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?\\s*;\\s*\\}/gi.test(code), 'Use an h2 CSS selector to change the font.');" + "testString": "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?\\s*;\\s*\\}/gi.test(code), 'Use an h2 CSS selector to change the font.');" }, { - "text": - "Your p element should still use the font monospace.", - "testString": - "assert($(\"p\").css(\"font-family\").match(/monospace/i), 'Your p element should still use the font monospace.');" + "text": "Your p element should still use the font monospace.", + "testString": "assert($(\"p\").css(\"font-family\").match(/monospace/i), 'Your p element should still use the font monospace.');" } ], "challengeType": 0, @@ -952,26 +916,19 @@ "tests": [ { "text": "Your h2 element should use the font Lobster.", - "testString": - "assert($(\"h2\").css(\"font-family\").match(/^\"?lobster/i), 'Your h2 element should use the font Lobster.');" + "testString": "assert($(\"h2\").css(\"font-family\").match(/^\"?lobster/i), 'Your h2 element should use the font Lobster.');" }, { - "text": - "Your h2 element should degrade to the font monospace when Lobster is not available.", - "testString": - "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?,\\s*monospace\\s*;\\s*\\}/gi.test(code), 'Your h2 element should degrade to the font monospace when Lobster is not available.');" + "text": "Your h2 element should degrade to the font monospace when Lobster is not available.", + "testString": "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?,\\s*monospace\\s*;\\s*\\}/gi.test(code), 'Your h2 element should degrade to the font monospace when Lobster is not available.');" }, { - "text": - "Comment out your call to Google for the Lobster font by putting <!-- in front of it.", - "testString": - "assert(new RegExp(\"\", \"gi\").test(code), 'Be sure to close your comment by adding -->.');" + "text": "Be sure to close your comment by adding -->.", + "testString": "assert(new RegExp(\"[^fc]-->\", \"gi\").test(code), 'Be sure to close your comment by adding -->.');" } ], "challengeType": 0, @@ -1095,16 +1052,12 @@ ], "tests": [ { - "text": - "Your img element should have the class smaller-image.", - "testString": - "assert($(\"img[src='https://bit.ly/fcc-relaxing-cat']\").attr('class') === \"smaller-image\", 'Your img element should have the class smaller-image.');" + "text": "Your img element should have the class smaller-image.", + "testString": "assert($(\"img[src='https://bit.ly/fcc-relaxing-cat']\").attr('class') === \"smaller-image\", 'Your img element should have the class smaller-image.');" }, { - "text": - "Your image should be 100 pixels wide. Browser zoom should be at 100%.", - "testString": - "assert($(\"img\").width() === 100, 'Your image should be 100 pixels wide. Browser zoom should be at 100%.');" + "text": "Your image should be 100 pixels wide. Browser zoom should be at 100%.", + "testString": "assert($(\"img\").width() === 100, 'Your image should be 100 pixels wide. Browser zoom should be at 100%.');" } ], "challengeType": 0, @@ -1230,32 +1183,24 @@ ], "tests": [ { - "text": - "Your img element should have the class smaller-image.", - "testString": - "assert($(\"img\").hasClass(\"smaller-image\"), 'Your img element should have the class smaller-image.');" + "text": "Your img element should have the class smaller-image.", + "testString": "assert($(\"img\").hasClass(\"smaller-image\"), 'Your img element should have the class smaller-image.');" }, { - "text": - "Your img element should have the class thick-green-border.", - "testString": - "assert($(\"img\").hasClass(\"thick-green-border\"), 'Your img element should have the class thick-green-border.');" + "text": "Your img element should have the class thick-green-border.", + "testString": "assert($(\"img\").hasClass(\"thick-green-border\"), 'Your img element should have the class thick-green-border.');" }, { "text": "Give your image a border width of 10px.", - "testString": - "assert($(\"img\").hasClass(\"thick-green-border\") && parseInt($(\"img\").css(\"border-top-width\"), 10) >= 8 && parseInt($(\"img\").css(\"border-top-width\"), 10) <= 12, 'Give your image a border width of 10px.');" + "testString": "assert($(\"img\").hasClass(\"thick-green-border\") && parseInt($(\"img\").css(\"border-top-width\"), 10) >= 8 && parseInt($(\"img\").css(\"border-top-width\"), 10) <= 12, 'Give your image a border width of 10px.');" }, { "text": "Give your image a border style of solid.", - "testString": - "assert($(\"img\").css(\"border-right-style\") === \"solid\", 'Give your image a border style of solid.');" + "testString": "assert($(\"img\").css(\"border-right-style\") === \"solid\", 'Give your image a border style of solid.');" }, { - "text": - "The border around your img element should be green.", - "testString": - "assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'The border around your img element should be green.');" + "text": "The border around your img element should be green.", + "testString": "assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'The border around your img element should be green.');" } ], "challengeType": 0, @@ -1391,15 +1336,12 @@ ], "tests": [ { - "text": - "Your image element should have the class \"thick-green-border\".", - "testString": - "assert($(\"img\").hasClass(\"thick-green-border\"), 'Your image element should have the class \"thick-green-border\".');" + "text": "Your image element should have the class \"thick-green-border\".", + "testString": "assert($(\"img\").hasClass(\"thick-green-border\"), 'Your image element should have the class \"thick-green-border\".');" }, { "text": "Your image should have a border radius of 10px", - "testString": - "assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 8, 'Your image should have a border radius of 10px');" + "testString": "assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 8, 'Your image should have a border radius of 10px');" } ], "challengeType": 0, @@ -1523,15 +1465,12 @@ ], "tests": [ { - "text": - "Your image should have a border radius of 50%, making it perfectly circular.", - "testString": - "assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 48, 'Your image should have a border radius of 50%, making it perfectly circular.');" + "text": "Your image should have a border radius of 50%, making it perfectly circular.", + "testString": "assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 48, 'Your image should have a border radius of 50%, making it perfectly circular.');" }, { "text": "Be sure to use a percentage value of 50%.", - "testString": - "assert(code.match(/50%/g), 'Be sure to use a percentage value of 50%.');" + "testString": "assert(code.match(/50%/g), 'Be sure to use a percentage value of 50%.');" } ], "challengeType": 0, @@ -1652,22 +1591,16 @@ ], "tests": [ { - "text": - "Give your div element the class silver-background.", - "testString": - "assert($(\"div\").hasClass(\"silver-background\"), 'Give your div element the class silver-background.');" + "text": "Give your div element the class silver-background.", + "testString": "assert($(\"div\").hasClass(\"silver-background\"), 'Give your div element the class silver-background.');" }, { - "text": - "Your div element should have a silver background.", - "testString": - "assert($(\"div\").css(\"background-color\") === \"rgb(192, 192, 192)\", 'Your div element should have a silver background.');" + "text": "Your div element should have a silver background.", + "testString": "assert($(\"div\").css(\"background-color\") === \"rgb(192, 192, 192)\", 'Your div element should have a silver background.');" }, { - "text": - "Define a class named silver-background within the style element and assign the value of silver to the background-color property.", - "testString": - "assert(code.match(/\\.silver-background\\s*{\\s*background-color:\\s*silver;\\s*}/), \"Define a class named silver-background within the style element and assign the value of silver to the background-color property.\");" + "text": "Define a class named silver-background within the style element and assign the value of silver to the background-color property.", + "testString": "assert(code.match(/\\.silver-background\\s*{\\s*background-color:\\s*silver;\\s*}/), \"Define a class named silver-background within the style element and assign the value of silver to the background-color property.\");" } ], "challengeType": 0, @@ -1800,10 +1733,8 @@ ], "tests": [ { - "text": - "Give your form element the id of cat-photo-form.", - "testString": - "assert($(\"form\").attr(\"id\") === \"cat-photo-form\", 'Give your form element the id of cat-photo-form.');" + "text": "Give your form element the id of cat-photo-form.", + "testString": "assert($(\"form\").attr(\"id\") === \"cat-photo-form\", 'Give your form element the id of cat-photo-form.');" } ], "challengeType": 0, @@ -1946,28 +1877,20 @@ ], "tests": [ { - "text": - "Give your form element the id of cat-photo-form.", - "testString": - "assert($(\"form\").attr(\"id\") === \"cat-photo-form\", 'Give your form element the id of cat-photo-form.');" + "text": "Give your form element the id of cat-photo-form.", + "testString": "assert($(\"form\").attr(\"id\") === \"cat-photo-form\", 'Give your form element the id of cat-photo-form.');" }, { - "text": - "Your form element should have the background-color of green.", - "testString": - "assert($(\"#cat-photo-form\").css(\"background-color\") === \"rgb(0, 128, 0)\", 'Your form element should have the background-color of green.');" + "text": "Your form element should have the background-color of green.", + "testString": "assert($(\"#cat-photo-form\").css(\"background-color\") === \"rgb(0, 128, 0)\", 'Your form element should have the background-color of green.');" }, { - "text": - "Make sure your form element has an id attribute.", - "testString": - "assert(code.match(//gi) && code.match(//gi).length > 0, 'Make sure your form element has an id attribute.');" + "text": "Make sure your form element has an id attribute.", + "testString": "assert(code.match(//gi) && code.match(//gi).length > 0, 'Make sure your form element has an id attribute.');" }, { - "text": - "Do not give your form any class or style attributes.", - "testString": - "assert(!code.match(//gi) && !code.match(//gi), 'Do not give your form any class or style attributes.');" + "text": "Do not give your form any class or style attributes.", + "testString": "assert(!code.match(//gi) && !code.match(//gi), 'Do not give your form any class or style attributes.');" } ], "challengeType": 0, @@ -2109,10 +2032,8 @@ ], "tests": [ { - "text": - "Your blue-box class should give elements 20px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-top\") === \"20px\", 'Your blue-box class should give elements 20px of padding.');" + "text": "Your blue-box class should give elements 20px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-top\") === \"20px\", 'Your blue-box class should give elements 20px of padding.');" } ], "challengeType": 0, @@ -2232,10 +2153,8 @@ ], "tests": [ { - "text": - "Your blue-box class should give elements 20px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-top\") === \"20px\", 'Your blue-box class should give elements 20px of margin.');" + "text": "Your blue-box class should give elements 20px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-top\") === \"20px\", 'Your blue-box class should give elements 20px of margin.');" } ], "challengeType": 0, @@ -2346,10 +2265,8 @@ ], "tests": [ { - "text": - "Your blue-box class should give elements -15px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-top\") === \"-15px\", 'Your blue-box class should give elements -15px of margin.');" + "text": "Your blue-box class should give elements -15px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-top\") === \"-15px\", 'Your blue-box class should give elements -15px of margin.');" } ], "challengeType": 0, @@ -2458,35 +2375,26 @@ ], "tests": [ { - "text": - "Your blue-box class should give the top of the elements 40px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-top\") === \"40px\", 'Your blue-box class should give the top of the elements 40px of padding.');" + "text": "Your blue-box class should give the top of the elements 40px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-top\") === \"40px\", 'Your blue-box class should give the top of the elements 40px of padding.');" }, { - "text": - "Your blue-box class should give the right of the elements 20px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-right\") === \"20px\", 'Your blue-box class should give the right of the elements 20px of padding.');" + "text": "Your blue-box class should give the right of the elements 20px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-right\") === \"20px\", 'Your blue-box class should give the right of the elements 20px of padding.');" }, { - "text": - "Your blue-box class should give the bottom of the elements 20px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-bottom\") === \"20px\", 'Your blue-box class should give the bottom of the elements 20px of padding.');" + "text": "Your blue-box class should give the bottom of the elements 20px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-bottom\") === \"20px\", 'Your blue-box class should give the bottom of the elements 20px of padding.');" }, { - "text": - "Your blue-box class should give the left of the elements 40px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-left\") === \"40px\", 'Your blue-box class should give the left of the elements 40px of padding.');" + "text": "Your blue-box class should give the left of the elements 40px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-left\") === \"40px\", 'Your blue-box class should give the left of the elements 40px of padding.');" } ], "challengeType": 0, "translations": { "de": { - "title": - "Gib jeder Seite eines Elements einen unterschiedlichen Innenabstand", + "title": "Gib jeder Seite eines Elements einen unterschiedlichen Innenabstand", "description": [ "Manchmal wirst du einem Element auf jeder Seite unterschiedliche Innenabstände – also padding – geben wollen.", "CSS erlaubt dir den Innenabstand - padding - eines Elements auf allen Seiten einzeln mit den Eigenschaften padding-top, padding-right, padding-bottom und padding-left zu steuern.", @@ -2504,8 +2412,7 @@ ] }, "pt-br": { - "title": - "Dê Valores Diferentes de Preenchimento a Cada Lado de um Elemento", + "title": "Dê Valores Diferentes de Preenchimento a Cada Lado de um Elemento", "description": [ "As vezes pode ser que você queira personalizar um elemento para que tenha um preenchimento (padding) diferente em cada um de seus lados.", "O CSS permite controlar o preenchimento (padding) de um elemento em todos os quatro lados: superior, direito, inferior e esquerdo, com as propriedades padding-top, padding-right, padding-bottom e padding-left.", @@ -2514,8 +2421,7 @@ ] }, "ru": { - "title": - "Добавьте разный отступ содердимого с каждой стороны элемента", + "title": "Добавьте разный отступ содердимого с каждой стороны элемента", "description": [ "Иногда вам может потребоваться изменить элемент таким образом, чтобы отступ содержимого padding с каждой из сторон был разным.", "CSS позволяет вам контролировать значение свойства padding элемента со всех сторон с помощью свойств: padding-top, padding-right, padding-bottom, padding-left.", @@ -2588,35 +2494,26 @@ ], "tests": [ { - "text": - "Your blue-box class should give the top of elements 40px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of margin.');" + "text": "Your blue-box class should give the top of elements 40px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of margin.');" }, { - "text": - "Your blue-box class should give the right of elements 20px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of margin.');" + "text": "Your blue-box class should give the right of elements 20px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of margin.');" }, { - "text": - "Your blue-box class should give the bottom of elements 20px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of margin.');" + "text": "Your blue-box class should give the bottom of elements 20px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of margin.');" }, { - "text": - "Your blue-box class should give the left of elements 40px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of margin.');" + "text": "Your blue-box class should give the left of elements 40px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of margin.');" } ], "challengeType": 0, "translations": { "de": { - "title": - "Füge jeder Seite eines Elements einen unterschiedlichen Außenabstand hinzu", + "title": "Füge jeder Seite eines Elements einen unterschiedlichen Außenabstand hinzu", "description": [ "Manchmal wirst du einem Element auf jeder Seite einen unterschiedlichen Außenabstand - margin - geben wollen.", "CSS erlaubt dir ebenfalls den Außenabstand - margin - eines Elements auf jeder Seite einzeln mit den Eigenschaften margin-top, margin-right, margin-bottom und margin-left zu steuern.", @@ -2715,41 +2612,30 @@ ], "tests": [ { - "text": - "Your blue-box class should give the top of elements 40px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of padding.');" + "text": "Your blue-box class should give the top of elements 40px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of padding.');" }, { - "text": - "Your blue-box class should give the right of elements 20px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of padding.');" + "text": "Your blue-box class should give the right of elements 20px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of padding.');" }, { - "text": - "Your blue-box class should give the bottom of elements 20px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of padding.');" + "text": "Your blue-box class should give the bottom of elements 20px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of padding.');" }, { - "text": - "Your blue-box class should give the left of elements 40px of padding.", - "testString": - "assert($(\".blue-box\").css(\"padding-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of padding.');" + "text": "Your blue-box class should give the left of elements 40px of padding.", + "testString": "assert($(\".blue-box\").css(\"padding-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of padding.');" }, { - "text": - "You should use the clockwise notation to set the padding of blue-box class.", - "testString": - "assert(!/padding-top|padding-right|padding-bottom|padding-left/.test(code), 'You should use the clockwise notation to set the padding of blue-box class.');" + "text": "You should use the clockwise notation to set the padding of blue-box class.", + "testString": "assert(!/padding-top|padding-right|padding-bottom|padding-left/.test(code), 'You should use the clockwise notation to set the padding of blue-box class.');" } ], "challengeType": 0, "translations": { "de": { - "title": - "Nutze die Notation im Uhrzeigersinn um den Innenabstand eines Elements zu bestimmen", + "title": "Nutze die Notation im Uhrzeigersinn um den Innenabstand eines Elements zu bestimmen", "description": [ "Anstatt die Eigenschaften padding-top, padding-right, padding-bottom und padding-left zu verwenden, kannst du sie alle in einer Zeile schreiben:", "padding: 10px 20px 10px 20px;", @@ -2759,8 +2645,7 @@ ] }, "es": { - "title": - "Utiliza notación en sentido horario para especificar el relleno de un elemento", + "title": "Utiliza notación en sentido horario para especificar el relleno de un elemento", "description": [ "En lugar de especificar las propiedades padding-top, padding-right, padding-bottom y padding-left de un elemento, puedes especificar todas en una sóla línea, así: ", "padding: 10px 20px 10px 20px;", @@ -2770,8 +2655,7 @@ ] }, "pt-br": { - "title": - "Use Notação em Sentido Horário para Especificar o Preenchimento de um Elemento", + "title": "Use Notação em Sentido Horário para Especificar o Preenchimento de um Elemento", "description": [ "Ao invés de especificar as propriedades padding-top, padding-right, padding-bottom e padding-left de um elemento, você pode especificar todas elas em uma só linha, assim:", "padding: 10px 20px 10px 20px;", @@ -2781,8 +2665,7 @@ ] }, "ru": { - "title": - "Используйте систему ссылок по часовой стрелке для установки отступа содержмого элемента", + "title": "Используйте систему ссылок по часовой стрелке для установки отступа содержмого элемента", "description": [ "Вместо указания свойств элемента: padding-top, padding-right, padding-bottom, padding-left, вы можете указать их в строку, например:", "padding: 10px 20px 10px 20px;", @@ -2853,35 +2736,26 @@ ], "tests": [ { - "text": - "Your blue-box class should give the top of elements 40px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of margin.');" + "text": "Your blue-box class should give the top of elements 40px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-top\") === \"40px\", 'Your blue-box class should give the top of elements 40px of margin.');" }, { - "text": - "Your blue-box class should give the right of elements 20px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of margin.');" + "text": "Your blue-box class should give the right of elements 20px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-right\") === \"20px\", 'Your blue-box class should give the right of elements 20px of margin.');" }, { - "text": - "Your blue-box class should give the bottom of elements 20px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of margin.');" + "text": "Your blue-box class should give the bottom of elements 20px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-bottom\") === \"20px\", 'Your blue-box class should give the bottom of elements 20px of margin.');" }, { - "text": - "Your blue-box class should give the left of elements 40px of margin.", - "testString": - "assert($(\".blue-box\").css(\"margin-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of margin.');" + "text": "Your blue-box class should give the left of elements 40px of margin.", + "testString": "assert($(\".blue-box\").css(\"margin-left\") === \"40px\", 'Your blue-box class should give the left of elements 40px of margin.');" } ], "challengeType": 0, "translations": { "de": { - "title": - "Nutze die Notation im Uhrzeigersinn um den Außenabstand eines Elements zu bestimmen", + "title": "Nutze die Notation im Uhrzeigersinn um den Außenabstand eines Elements zu bestimmen", "description": [ "Versuchen wir das noch einmal, aber diesmal mit dem Außenabstand – also margin.", "Anstatt die Eigenschaften margin-top, margin-right, margin-bottom und margin-left zu verwenden, kannst du alle in eine Zeile schreiben:", @@ -2892,8 +2766,7 @@ ] }, "es": { - "title": - "Utiliza notación en sentido horario para especificar el margen de un elemento", + "title": "Utiliza notación en sentido horario para especificar el margen de un elemento", "description": [ "Vamos a intentar esto de nuevo, pero esta vez con el margen (margin).", "En lugar de especificar las propiedades margin-top, margin-right, margin-bottom, y margin-left de un elemento, puedes especificarlas en una sóla línea así: ", @@ -2904,8 +2777,7 @@ ] }, "pt-br": { - "title": - "Use Notação em Sentido Horário para Especificar a Margem de um Elemento", + "title": "Use Notação em Sentido Horário para Especificar a Margem de um Elemento", "description": [ "Vamos praticar isso outra vez, mas desta vez será com a margem (margin).", "Ao invés de especificar as propriedades margin-top, margin-right, margin-bottom, e margin-left de um elemento, você pode especificar todas elas em apenas uma linha assim:", @@ -2916,8 +2788,7 @@ ] }, "ru": { - "title": - "Используйте систему ссылок по часовой стрелке для установки отступа элемента", + "title": "Используйте систему ссылок по часовой стрелке для установки отступа элемента", "description": [ "Давайте попробуем то же самое, но со свойством margin на этот раз.", "Вмето указания свойств элемента: margin-top, margin-right, margin-bottom, margin-left, вы можете указать их в строку, например:", @@ -2989,20 +2860,16 @@ ], "tests": [ { - "text": - "The type attribute selector should be used to select the checkboxes.", - "testString": - "assert(code.match(/