mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix: allow space in cafe css project step 34 (#52551)
This commit is contained in:
parent
a31f6637d7
commit
607d932cc2
@ -14,19 +14,22 @@ Next, you want to align the price to the right. Add a class named `price` to you
|
||||
You should add the `price` class to your `p` element.
|
||||
|
||||
```js
|
||||
assert(code.match(/<p\s*class=('|")price\1\s*>/i));
|
||||
const el = document.querySelector('.price');
|
||||
assert.exists(el);
|
||||
```
|
||||
|
||||
You should only have one element with the `price` class.
|
||||
|
||||
```js
|
||||
assert($('.price').length === 1);
|
||||
const elements = document.querySelectorAll('.price');
|
||||
assert.lengthOf(elements, 1);
|
||||
```
|
||||
|
||||
Your `price` class should be on the `p` element with the text `3.00`.
|
||||
|
||||
```js
|
||||
assert($('.price')[0].innerText.match(/3\.00/i));
|
||||
const el = document.querySelector('.price');
|
||||
assert.match(el.innerText, /3\.00/i);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user