* add(tests): parts 1-2 * refactor for multi-file editor, and add temp css tests * re-re-rebasing * add link to subsequent challenges * add test strings to 007-015 * add final tests 001-016 * fix 005-007, add 017-022 tests and test strings * add: tests 021-030, and formatting * add: 031-034 tests * tests: add 035-046 * fix: test in 021 * tests: add 047-050 * format: 009, 051-118 remove css whitespace * tests: add 051-078 * tests: add 079-105 * tests: add 104-118 * fix: empty -> isEmpty, and include -> match * fix: correct editable region * fix: formatting and spelling * fix: test logic, and add TODO for whitespace * fix: add final part solution 🤦♂️ * fix typo in part-006 * remove whitespace in prep * getStyleDeclaration -> getStyle * remove editable region from solution 🤦♂️ * fix: correct tests to fail on initial * fix: add missing regex Co-authored-by: gikf <60067306+gikf@users.noreply.github.com> * fix: correct tests * remove commas and stuff 🤷♂️ Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * uppercaserise doctype Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * add "the" Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * remove half-colon Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * use more boring form of the word "shoudl" Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * add suggestions to tests * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-015.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-016.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-016.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-016.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-022.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-093.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-098.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-101.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-023.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-024.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-026.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-035.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-058.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-090.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-058.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-064.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-064.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-064.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-076.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-070.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-079.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-085.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-086.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-087.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-090.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-019.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-019.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-019.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-074.md * Update curriculum/challenges/english/01-responsive-web-design/css-variables-skyline/part-078.md * fix: the few commits I couldn't add on github * fix: lesson 41 Co-authored-by: gikf <60067306+gikf@users.noreply.github.com> Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2.2 KiB
id, title, challengeType, dashedName
id | title | challengeType | dashedName |
---|---|---|---|
5d822fd413a79914d39e98cc | Part 4 | 0 | part-4 |
--description--
Add a title
element to the head
, and give your project a title of freeCodeCamp Skyline Project
. Also, nest a self-closing link
element in the head
element. Give it a rel
attribute value of stylesheet
, a type
attribute value of text/css
, and an href
attribute value of styles.css
.
--hints--
Your code should have a title
element.
const title = document.querySelector('title');
assert.exists(title);
The title
element should be within the head
element.
const head = document.querySelector('head');
// TODO: head does not contain title...body contains title
Your project should have a title of freeCodeCamp Skyline Project
.
const title = document.querySelector('title');
assert.equal(title.text.toLowerCase(), 'freecodecamp skyline project')
Remember, the casing and spelling matters for the title.
const title = document.querySelector('title');
assert.equal(title.text, 'freeCodeCamp Skyline Project');
Your code should have a link
element.
assert.match(code, /<link/)
You should not change your existing head
tags. Make sure you did not delete the closing tag.
const heads = document.querySelectorAll('head');
assert.equal(heads?.length, 1);
Your link
element should be a self-closing element.
assert(code.match(/<link[\w\W\s]+\/>/i));
Your link
element should be within your head
element.
assert(code.match(/<head>[\w\W\s]*<link[\w\W\s]*\/>[\w\W\s]*<\/head>/i))
Your link
element should have a rel
attribute with the value stylesheet
.
assert.match(code, /<link[\s\S]*?rel=('|"|`)stylesheet\1/)
Your link
element should have a type
attribute with the value text/css
.
assert.match(code, /<link[\s\S]*?type=('|"|`)text\/css\1/)
Your link
element should have an href
attribute with the value styles.css
.
assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/)
--seed--
--seed-contents--
<!DOCTYPE html>
<html>
--fcc-editable-region--
<head>
</head>
--fcc-editable-region--
<body>
</body>
</html>