Files

75 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

---
id: 60a3e3396c7b40068ad6997a
title: Step 17
challengeType: 0
dashedName: step-17
---
# --description--
Scrivi una nuova regola che seleziona `.one` e imposta la sua `width` a 425 pixel.
# --hints--
Dovresti avere un selettore `.one`.
```js
const hasOne = new __helpers.CSSHelp(document).getStyle('.one');
assert(hasOne);
```
Dovresti impostare la proprietà `width` su `425px`.
```js
const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '425px');
assert(hasWidth);
```
Il tuo elemento `.one` dovrebbe avere un valore `width` di `425px`.
```js
const oneWidth = new __helpers.CSSHelp(document).getStyle('.one')?.getPropertyValue('width');
assert(oneWidth === '425px');
```
# --seed--
## --seed-contents--
```css
.canvas {
width: 500px;
height: 600px;
background-color: #4d0f00;
}
.frame {
border: 50px solid black;
width: 500px;
padding: 50px;
margin: 20px auto;
}
--fcc-editable-region--
--fcc-editable-region--
```
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rothko Painting</title>
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div class="frame">
<div class="canvas">
<div class="one"></div>
</div>
</div>
</body>
</html>
```