From da4deb77ff6176b8b45f1976bf1aee80c9722973 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Wed, 11 Feb 2015 17:13:00 -0800 Subject: [PATCH] create box model and working test for padding and margin training --- seed_data/coursewares.json | 54 +++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/seed_data/coursewares.json b/seed_data/coursewares.json index 93bd74a5d3..e6970aa28b 100644 --- a/seed_data/coursewares.json +++ b/seed_data/coursewares.json @@ -710,7 +710,7 @@ { "_id" : "bad87fee1348bd9aedf08820", "name": "Turn an Image into a Link", - "difficulty" : "0.27", + "difficulty" : "0.271", "description": [ "Wrap the gray cat's image with an anchor tag that leads nowhere.", "You can make elements into links by wrapping them in an anchor tag.", @@ -746,8 +746,10 @@ "name": "Add Alt Text to an image", "difficulty" : "0.25", "description": [ - "Add the alt text \"a photo of a cute gray cat\" to our cat photo", - "" + "Add the alt text \"a photo of a cute gray cat\" to our cat photo", + "alt text is what browsers will display if they fail to load the image. alt text is also important for blind or visually impaired users to understand what an image portrays. Search engines also look at alt text.", + "In short, every image should have alt text!", + "You can add alt text right in the image tag, like we've done here with the \"cute white cat\" image." ], "tests": [ "expect($('img').filter(function(){ return /cat/gi.test(this.alt) }).length).to.eql(2);" @@ -774,18 +776,52 @@ { "_id" : "bad88fee1348bd9aedf08825", - "name": "Set the Background Color of an Element", + "name": "Adjusting the Padding of an Element", "difficulty" : "0.28", "description": [ - "", - "" + "Change the padding of the yellow box to 20 pixels.", + "An element's padding controls the amount of space between an element and its border.", + "Here, we can see that the green box and the red box and the green box are nested within the blue box.", + "When you increase the green box's padding, it will increase the distance between the word \"padding\" and the border around the text." ], "tests": [ - "expect($('h1')).to.have.class('text-center');", - "expect($('h1')).to.have.text('hello world');" + "expect($('.green-box')).to.have.css('padding', '20px')" ], "challengeSeed": [ - "

hello world

" + "", + "
margin
", + "", + "
", + "
padding
", + "
padding
", + "
" ], "challengeType": 0 },