Share
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-align-self-property.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-align-self-property.md
index acfa330961d..19ed4bbfad7 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-align-self-property.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-align-self-property.md
@@ -22,13 +22,17 @@ Add the CSS property `align-self` to both `#box-1` and `#box-2`. Give `#box-1` a
The `#box-1` element should have the `align-self` property set to a value of `center`.
```js
-assert($('#box-1').css('align-self') == 'center');
+const boxOne = document.querySelector('#box-1');
+const alignment = window.getComputedStyle(boxOne)['align-self'];
+assert.strictEqual(alignment, 'center');
```
The `#box-2` element should have the `align-self` property set to a value of `flex-end`.
```js
-assert($('#box-2').css('align-self') == 'flex-end');
+const boxTwo = document.querySelector('#box-2');
+const alignment = window.getComputedStyle(boxTwo)['align-self'];
+assert.strictEqual(alignment, 'flex-end');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-basis-property-to-set-the-initial-size-of-an-item.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-basis-property-to-set-the-initial-size-of-an-item.md
index 905c259fa47..f85b3ad59bb 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-basis-property-to-set-the-initial-size-of-an-item.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-basis-property-to-set-the-initial-size-of-an-item.md
@@ -22,25 +22,29 @@ Set the initial size of the boxes using `flex-basis`. Add the CSS property `flex
The `#box-1` element should have the `flex-basis` property.
```js
-assert($('#box-1').css('flex-basis') != 'auto');
+const boxOne = document.querySelector('#box-1');
+const flexBasis = window.getComputedStyle(boxOne)['flex-basis'];
+assert.notStrictEqual(flexBasis, 'auto');
```
The `#box-1` element should have a `flex-basis` value of `10em`.
```js
-assert(code.match(/#box-1\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?10em;/g));
+assert.match(code, /#box-1\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?10em;/g);
```
The `#box-2` element should have the `flex-basis` property.
```js
-assert($('#box-2').css('flex-basis') != 'auto');
+const boxTwo = document.querySelector('#box-2');
+const flexBasis = window.getComputedStyle(boxTwo)['flex-basis'];
+assert.notStrictEqual(flexBasis, 'auto');
```
The `#box-2` element should have a `flex-basis` value of `20em`.
```js
-assert(code.match(/#box-2\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?20em;/g));
+assert.match(code, /#box-2\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?20em;/g);
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-column.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-column.md
index 3c4d4ed9ec7..5677f7f0344 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-column.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-column.md
@@ -20,7 +20,9 @@ Add the CSS property `flex-direction` to the `#box-container` element, and give
The `#box-container` element should have a `flex-direction` property set to `column`.
```js
-assert($('#box-container').css('flex-direction') == 'column');
+const boxContainer = document.querySelector('#box-container');
+const flexDirection = window.getComputedStyle(boxContainer)['flex-direction'];
+assert.strictEqual(flexDirection, 'column');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-row.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-row.md
index 0820808a7f6..cb64d5cad90 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-row.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-direction-property-to-make-a-row.md
@@ -24,7 +24,9 @@ Add the CSS property `flex-direction` to the `#box-container` element, and give
The `#box-container` element should have a `flex-direction` property set to `row-reverse`.
```js
-assert($('#box-container').css('flex-direction') == 'row-reverse');
+const boxContainer = document.querySelector('#box-container');
+const flexDirection = window.getComputedStyle(boxContainer)['flex-direction'];
+assert.strictEqual(flexDirection, 'row-reverse');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-grow-property-to-expand-items.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-grow-property-to-expand-items.md
index 7a2a0999460..6e6282772a2 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-grow-property-to-expand-items.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-grow-property-to-expand-items.md
@@ -22,13 +22,17 @@ Add the CSS property `flex-grow` to both `#box-1` and `#box-2`. Give `#box-1` a
The `#box-1` element should have the `flex-grow` property set to a value of `1`.
```js
-assert($('#box-1').css('flex-grow') == '1');
+const boxOne = document.querySelector('#box-1');
+const flexGrow = window.getComputedStyle(boxOne)['flex-grow'];
+assert.equal(flexGrow, '1');
```
The `#box-2` element should have the `flex-grow` property set to a value of `2`.
```js
-assert($('#box-2').css('flex-grow') == '2');
+const boxTwo = document.querySelector('#box-2');
+const flexGrow = window.getComputedStyle(boxTwo)['flex-grow'];
+assert.equal(flexGrow, '2');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shorthand-property.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shorthand-property.md
index 69cbf5e74cf..173848ba1ed 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shorthand-property.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shorthand-property.md
@@ -26,27 +26,33 @@ These values will cause `#box-1` to grow to fill the extra space at twice the ra
The `#box-1` element should have the `flex` property set to a value of `2 2 150px`.
```js
-assert(
- $('#box-1').css('flex-grow') == '2' &&
- $('#box-1').css('flex-shrink') == '2' &&
- $('#box-1').css('flex-basis') == '150px'
-);
+const boxOne = document.querySelector('#box-1');
+const flexGrow = window.getComputedStyle(boxOne)['flex-grow'];
+const flexShrink = window.getComputedStyle(boxOne)['flex-shrink'];
+const flexBasis = window.getComputedStyle(boxOne)['flex-basis'];
+
+assert.equal(flexGrow, '2');
+assert.equal(flexShrink, '2');
+assert.equal(flexBasis, '150px');
```
The `#box-2` element should have the `flex` property set to a value of `1 1 150px`.
```js
-assert(
- $('#box-2').css('flex-grow') == '1' &&
- $('#box-2').css('flex-shrink') == '1' &&
- $('#box-2').css('flex-basis') == '150px'
-);
+const boxTwo = document.querySelector('#box-2');
+const flexGrow = window.getComputedStyle(boxTwo)['flex-grow'];
+const flexShrink = window.getComputedStyle(boxTwo)['flex-shrink'];
+const flexBasis = window.getComputedStyle(boxTwo)['flex-basis'];
+
+assert.equal(flexGrow, '1');
+assert.equal(flexShrink, '1');
+assert.equal(flexBasis, '150px');
```
Your code should use the `flex` property for `#box-1` and `#box-2`.
```js
-assert(code.match(/flex:\s*?\d\s+?\d\s+?150px;/g).length == 2);
+assert.lengthOf(code.match(/flex:\s*?\d\s+?\d\s+?150px;/g), 2);
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shrink-property-to-shrink-items.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shrink-property-to-shrink-items.md
index fc9b59ab23f..556bf32f213 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shrink-property-to-shrink-items.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-shrink-property-to-shrink-items.md
@@ -24,13 +24,17 @@ Add the CSS property `flex-shrink` to both `#box-1` and `#box-2`. Give `#box-1`
The `#box-1` element should have the `flex-shrink` property set to a value of `1`.
```js
-assert($('#box-1').css('flex-shrink') == '1');
+const boxOne = document.querySelector('#box-1');
+const flexShrink = window.getComputedStyle(boxOne)['flex-shrink'];
+assert.equal(flexShrink, '1');
```
The `#box-2` element should have the `flex-shrink` property set to a value of `2`.
```js
-assert($('#box-2').css('flex-shrink') == '2');
+const boxTwo = document.querySelector('#box-2');
+const flexShrink = window.getComputedStyle(boxTwo)['flex-shrink'];
+assert.equal(flexShrink, '2');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-wrap-property-to-wrap-a-row-or-column.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-wrap-property-to-wrap-a-row-or-column.md
index cc027815f1a..b86b7adaafb 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-wrap-property-to-wrap-a-row-or-column.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-flex-wrap-property-to-wrap-a-row-or-column.md
@@ -26,7 +26,9 @@ The current layout has too many boxes for one row. Add the CSS property `flex-wr
The `#box-container` element should have the `flex-wrap` property set to a value of `wrap`.
```js
-assert($('#box-container').css('flex-wrap') == 'wrap');
+const boxContainer = document.querySelector('#box-container');
+const flexWrap = window.getComputedStyle(boxContainer)['flex-wrap'];
+assert.strictEqual(flexWrap, 'wrap');
```
# --seed--
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-justify-content-property-in-the-tweet-embed.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-justify-content-property-in-the-tweet-embed.md
index 1dca1dac1cf..1928ecba6a7 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-justify-content-property-in-the-tweet-embed.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-justify-content-property-in-the-tweet-embed.md
@@ -20,16 +20,18 @@ Add the CSS property `justify-content` to the header's `.profile-name` element a
Your `.follow-btn` should be rendered on the page. Be sure to turn off any extensions such as ad blockers.
```js
-assert($('.follow-btn').length > 0 && $('.follow-btn').css('display') !== 'none');
+const followButton = document.querySelector('.follow-btn');
+const displayStyle = window.getComputedStyle(followButton)['display'];
+assert.isNotNull(followButton);
+assert.notStrictEqual(displayStyle, 'none');
```
The `.profile-name` element should have the `justify-content` property set to any of these values: `center`, `flex-start`, `flex-end`, `space-between`, `space-around`, or `space-evenly`.
```js
-assert(
- code.match(
- /header\s.profile-name\s*{\s*?.*?\s*?.*?\s*?\s*?.*?\s*?justify-content\s*:\s*(center|flex-start|flex-end|space-between|space-around|space-evenly)\s*;/g
- )
+assert.match(
+ code,
+ /header\s.profile-name\s*{\s*?.*?\s*?.*?\s*?\s*?.*?\s*?justify-content\s*:\s*(center|flex-start|flex-end|space-between|space-around|space-evenly)\s*;/g
);
```
@@ -42,7 +44,8 @@ assert(
body {
font-family: Arial, sans-serif;
}
- header, footer {
+ header,
+ footer {
display: flex;
flex-direction: row;
}
@@ -66,7 +69,8 @@ assert(
border-radius: 3px;
padding: 5px;
}
- header h3, header h4 {
+ header h3,
+ header h4 {
display: flex;
margin: 0;
}
@@ -98,7 +102,11 @@ assert(
}
-
I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.
+
+ I meet so many people who are in search of that one trick that will help
+ them work smart. Even if you work smart, you still have to work hard.
+
1:32 PM - 12 Jan 2018
-
+
-
-
- 431 Likes
-
+
+
431 Likes
Share
@@ -136,7 +143,8 @@ assert(
body {
font-family: Arial, sans-serif;
}
- header, footer {
+ header,
+ footer {
display: flex;
flex-direction: row;
}
@@ -160,7 +168,8 @@ assert(
border-radius: 3px;
padding: 5px;
}
- header h3, header h4 {
+ header h3,
+ header h4 {
display: flex;
margin: 0;
}
@@ -192,7 +201,11 @@ assert(
}
-
I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.
+
+ I meet so many people who are in search of that one trick that will help
+ them work smart. Even if you work smart, you still have to work hard.
+
1:32 PM - 12 Jan 2018
-
+
-
-
- 431 Likes
-
+
+
431 Likes
Share
diff --git a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-order-property-to-rearrange-items.md b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-order-property-to-rearrange-items.md
index 600e75391c2..5df8a407566 100644
--- a/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-order-property-to-rearrange-items.md
+++ b/curriculum/challenges/english/01-responsive-web-design/css-flexbox/use-the-order-property-to-rearrange-items.md
@@ -20,13 +20,17 @@ Add the CSS property `order` to both `#box-1` and `#box-2`. Give `#box-1` a valu
The `#box-1` element should have the `order` property set to a value of `2`.
```js
-assert($('#box-1').css('order') == '2');
+const boxOne = document.querySelector('#box-1');
+const order = window.getComputedStyle(boxOne)['order'];
+assert.strictEqual(order, '2');
```
The `#box-2` element should have the `order` property set to a value of `1`.
```js
-assert($('#box-2').css('order') == '1');
+const boxTwo = document.querySelector('#box-2');
+const order = window.getComputedStyle(boxTwo)['order'];
+assert.strictEqual(order, '1');
```
# --seed--