Files
Nicholas Carrigan (he/him) 59c24bd4be chore: rename cafe menu (#44201)
* chore: rename files

* chore: update codebase

* chore: proper title case

* chore: missed block name

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-11-19 22:22:24 -06:00

1.3 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
5f344f9c805cd193c33d829c Step 12 0 step-12

--description--

You can add style to an element by specifying it in the style element and setting a property for it like this:

element {
 property: value;
}

Center your h1 element by setting its text-align property to the value center.

--hints--

You should have an h1 selector in your style element.

const hasSelector = new __helpers.CSSHelp(document).getStyle('h1');
assert(hasSelector);

Your text-align property should set a value of center.

const hasTextAlign = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['text-align'] === 'center');
assert(hasTextAlign);

Your h1 selector should set the text-align property to center.

const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align');
assert(h1TextAlign === 'center');

--seed--

--seed-contents--

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Camper Cafe Menu</title>
--fcc-editable-region--
    <style>
    </style>
--fcc-editable-region--
  </head>
  <body>
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
<html>