chore(learn): remove other language curriculum Chinese (#39745)

This commit is contained in:
Randell Dawson
2020-10-01 11:01:10 -07:00
committed by GitHub
parent 17a6a8868b
commit 11b8e5ba9a
5672 changed files with 0 additions and 399257 deletions

View File

@ -1,122 +0,0 @@
---
id: bad87fee1348bd9aedf08823
title: Add a Negative Margin to an Element
challengeType: 0
videoUrl: ''
localeTitle: Adicione uma margem negativa a um elemento
---
## Descrição
<section id="description"> A propriedade <code>margin</code> de um elemento controla a quantidade de espaço entre a borda(<code>border</code>) do elemento e os elementos adjacentes. Se você definir a propriedade <code>margin</code> de um elemento como um valor negativo, o elemento ficará maior. </section>
## Instruções
<section id="instructions"> Tente definir <code>margin</code> para um valor negativo como o da caixa vermelha. Altere <code>margin</code> da caixa azul para <code>-15px</code>, para preencher toda a largura horizontal da caixa amarela em torno dela. </section>
## Testes
<section id='tests'>
```yml
tests:
- text: Sua classe <code>blue-box</code> deve fornecer elementos de <code>-15px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-top") === "-15px", "Your <code>blue-box</code> class should give elements <code>-15px</code> of <code>margin</code>.");'
```
</section>
## Desafio
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px;
margin: -15px;
}
.blue-box {
background-color: blue;
color: #fff;
padding: 20px;
margin: 20px;
}
</style>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solução
<section id='solution'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px;
margin: -15px;
}
.blue-box {
background-color: blue;
color: #fff;
padding: 20px;
margin: 20px;
margin-top: -15px;
}
</style>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</section>

View File

@ -1,107 +0,0 @@
---
id: bad87fee1348bd9bedf08813
title: Add Borders Around Your Elements
challengeType: 0
videoUrl: ''
localeTitle: Adicionar bordas ao redor de seus elementos
---
## Descrição
<section id="description"> As bordas CSS têm propriedades como <code>style</code> , <code>color</code> e <code>width</code> Por exemplo, se quisermos criar uma borda vermelha de 5 pixels em torno de um elemento HTML, poderíamos usar essa classe: <blockquote> &lt;style&gt; <br> .thin-red-border { <br> border-color: vermelho; <br> largura da borda: 5 px; <br> estilo de borda: sólido; <br> } <br> &lt;/ style&gt; </blockquote></section>
## Instruções
<section id="instructions"> Crie uma classe chamada <code>thick-green-border</code> . Essa classe deve adicionar uma borda verde sólida de 10 pixels em torno de um elemento HTML. Aplique a turma à sua foto de gato. Lembre-se de que você pode aplicar várias classes a um elemento usando seu atributo de <code>class</code> , separando cada nome de classe com um espaço. Por exemplo: <code>&lt;img class=&quot;class1 class2&quot;&gt;</code> </section>
## Testes
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>img</code> deve ter a classe <code>smaller-image</code> .
testString: 'assert($("img").hasClass("smaller-image"), "Your <code>img</code> element should have the class <code>smaller-image</code>.");'
- text: Seu elemento <code>img</code> deve ter a classe <code>thick-green-border</code> .
testString: 'assert($("img").hasClass("thick-green-border"), "Your <code>img</code> element should have the class <code>thick-green-border</code>.");'
- text: Dê à sua imagem uma largura de borda de <code>10px</code> .
testString: 'assert($("img").hasClass("thick-green-border") && parseInt($("img").css("border-top-width"), 10) >= 8 && parseInt($("img").css("border-top-width"), 10) <= 12, "Give your image a border width of <code>10px</code>.");'
- text: Dê à sua imagem um estilo de borda <code>solid</code> .
testString: 'assert($("img").css("border-right-style") === "solid", "Give your image a border style of <code>solid</code>.");'
- text: A borda em volta do seu elemento <code>img</code> deve ser verde.
testString: 'assert($("img").css("border-left-color") === "rgb(0, 128, 0)", "The border around your <code>img</code> element should be green.");'
```
</section>
## Desafio
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solução
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,92 +0,0 @@
---
id: bad87fee1248bd9aedf08824
title: Add Different Margins to Each Side of an Element
challengeType: 0
videoUrl: ''
localeTitle: Adicione margens diferentes a cada lado de um elemento
---
## Description
<section id="description"> Às vezes você vai querer personalizar um elemento para que ele tenha uma margem diferente em cada um dos seus lados. O CSS permite controlar a margem de todos os quatro lados individuais de um elemento com as propriedades <code>margin-top</code>, <code>margin-right</code>, <code>margin-bottom</code> e <code>margin-left</code>. </section>
## Instructions
<section id="instructions"> Dê à caixa azul <code>40px</code> de <code>margin</code> no lado superior e esquerdo, mas apenas <code>20px</code> no lado inferior e direito. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>blue-box</code> deve dar ao topo dos elementos <code>40px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-top") === "40px", "Your <code>blue-box</code> class should give the top of elements <code>40px</code> of <code>margin</code>.");'
- text: Sua turma de <code>blue-box</code> deve dar o direito de elementos de <code>20px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-right") === "20px", "Your <code>blue-box</code> class should give the right of elements <code>20px</code> of <code>margin</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar ao fundo dos elementos 20 <code>20px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-bottom") === "20px", "Your <code>blue-box</code> class should give the bottom of elements <code>20px</code> of <code>margin</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar a esquerda dos elementos <code>40px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-left") === "40px", "Your <code>blue-box</code> class should give the left of elements <code>40px</code> of <code>margin</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
margin-top: 40px;
margin-right: 20px;
margin-bottom: 20px;
margin-left: 40px;
}
.blue-box {
background-color: blue;
color: #fff;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,92 +0,0 @@
---
id: bad87fee1348bd9aedf08824
title: Add Different Padding to Each Side of an Element
challengeType: 0
videoUrl: ''
localeTitle: Adicionar preenchimento diferente a cada lado de um elemento
---
## Description
<section id="description"> Às vezes, você desejará personalizar um elemento para que ele tenha diferentes quantidades de <code>padding</code> em cada um dos seus lados. O CSS permite controlar o <code>padding</code> de todos os quatro lados individuais de um elemento com as propriedades <code>padding-top</code> , <code>padding-right</code> , <code>padding-bottom</code> e <code>padding-left</code> . </section>
## Instructions
<section id="instructions"> Dê à caixa azul um <code>padding</code> de <code>40px</code> no lado superior e esquerdo, mas apenas <code>20px</code> no lado inferior e direito. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>blue-box</code> deve dar ao topo dos elementos <code>40px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-top") === "40px", "Your <code>blue-box</code> class should give the top of the elements <code>40px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar o direito dos elementos <code>20px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-right") === "20px", "Your <code>blue-box</code> class should give the right of the elements <code>20px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar ao fundo dos elementos <code>20px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-bottom") === "20px", "Your <code>blue-box</code> class should give the bottom of the elements <code>20px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar a esquerda dos elementos <code>40px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-left") === "40px", "Your <code>blue-box</code> class should give the left of the elements <code>40px</code> of <code>padding</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 40px;
}
.blue-box {
background-color: blue;
color: #fff;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,108 +0,0 @@
---
id: bad87fee1348bd9aedf08814
title: Add Rounded Corners with border-radius
challengeType: 0
videoUrl: ''
localeTitle: Adicionar cantos arredondados com raio de borda
---
## Description
<section id="description"> Sua foto de gato atualmente tem cantos afiados. Podemos arredondar esses cantos com uma propriedade CSS chamada <code>border-radius</code> . </section>
## Instructions
<section id="instructions"> Você pode especificar um <code>border-radius</code> com pixels. Dê ao seu gato uma foto <code>border-radius</code> de 10 <code>10px</code> . Nota: este desafio permite múltiplas soluções possíveis. Por exemplo, você pode adicionar <code>border-radius</code> à classe <code>.smaller-image</code> <code>.thick-green-border</code> ou à classe <code>.smaller-image</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento de imagem deve ter a classe "thick-green-border".
testString: assert($("img").hasClass("thick-green-border"));
- text: Sua imagem deve ter uma borda com raio de <code>10px</code>
testString: assert(parseInt($("img").css("border-top-left-radius")) > 8);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,86 +0,0 @@
---
id: bad87fee1348bd9aedf08822
title: Adjust the Margin of an Element
challengeType: 0
videoUrl: ''
localeTitle: Ajustar a margem de um elemento
---
## Description
<section id="description"> A <code>margin</code> um elemento controla a quantidade de espaço entre a <code>border</code> um elemento e os elementos adjacentes. Aqui, podemos ver que a caixa azul e a caixa vermelha estão aninhadas dentro da caixa amarela. Note que a caixa vermelha tem uma <code>margin</code> maior que a caixa azul, fazendo parecer menor. Quando você aumenta a <code>margin</code> da caixa azul, ela aumenta a distância entre a borda e os elementos adjacentes. </section>
## Instructions
<section id="instructions"> Altere a <code>margin</code> da caixa azul para corresponder à da caixa vermelha. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>blue-box</code> deve dar elementos de <code>20px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-top") === "20px", "Your <code>blue-box</code> class should give elements <code>20px</code> of <code>margin</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px;
margin: 20px;
}
.blue-box {
background-color: blue;
color: #fff;
padding: 20px;
margin: 10px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,84 +0,0 @@
---
id: bad88fee1348bd9aedf08825
title: Adjust the Padding of an Element
challengeType: 0
videoUrl: ''
localeTitle: Ajustar o preenchimento de um elemento
---
## Description
<section id="description"> Agora vamos colocar nosso Cat Photo App por um tempo e aprender mais sobre o estilo HTML. Você já deve ter percebido isso, mas todos os elementos HTML são essencialmente pequenos retângulos. Três propriedades importantes controlam o espaço que envolve cada elemento HTML: <code>padding</code> , <code>margin</code> e <code>border</code> . O <code>padding</code> um elemento controla a quantidade de espaço entre o conteúdo do elemento e sua <code>border</code> . Aqui, podemos ver que a caixa azul e a caixa vermelha estão aninhadas dentro da caixa amarela. Observe que a caixa vermelha tem mais <code>padding</code> que a caixa azul. Quando você aumenta o <code>padding</code> da caixa azul, ela aumentará a distância ( <code>padding</code> ) entre o texto e a borda ao redor dele. </section>
## Instructions
<section id="instructions"> Altere o <code>padding</code> de sua caixa azul para corresponder à sua caixa vermelha. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua turma de <code>blue-box</code> deve fornecer elementos de <code>20px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-top") === "20px", "Your <code>blue-box</code> class should give elements <code>20px</code> of <code>padding</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 10px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px;
}
.blue-box {
background-color: blue;
color: #fff;
padding: 10px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,254 +0,0 @@
---
id: 5a9d7286424fe3d0e10cad13
title: Attach a Fallback value to a CSS Variable
challengeType: 0
videoUrl: ''
localeTitle: Anexar um valor de fallback a uma variável CSS
---
## Description
<section id="description"> Ao usar sua variável como um valor de propriedade CSS, você pode anexar um valor de fallback para o qual o navegador reverterá se a variável fornecida for inválida. <strong>Nota:</strong> Esse fallback não é usado para aumentar a compatibilidade do navegador e não funcionará nos navegadores IE. Em vez disso, ele é usado para que o navegador tenha uma cor para exibir se não puder encontrar sua variável. Veja como você faz isso: <blockquote> fundo: var (- pinguim-pele, preto); </blockquote> Isso definirá o plano de fundo para preto se sua variável não foi definida. Observe que isso pode ser útil para depuração. </section>
## Instructions
<section id="instructions"> Parece que há um problema com as variáveis fornecidas para as <code>.penguin-top</code> e <code>.penguin-bottom</code> . Em vez de corrigir o erro de digitação, adicione um valor de fallback de <code>black</code> à propriedade <code>background</code> das <code>.penguin-top</code> e <code>.penguin-bottom</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Aplique o valor de fallback de <code>black</code> na propriedade <code>background</code> da classe de <code>penguin-top</code> .
testString: 'assert(code.match(/.penguin-top\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}[\s\S]*.penguin-bottom\s{/gi), "Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.");'
- text: Aplique o valor de fallback de <code>black</code> na propriedade <code>background</code> da classe <code>penguin-bottom</code> .
testString: 'assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}/gi), "Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.penguin {
--penguin-skin: black;
--penguin-belly: gray;
--penguin-beak: yellow;
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.penguin-top {
top: 10%;
left: 25%;
/* change code below */
background: var(--pengiun-skin);
/* change code above */
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
/* change code below */
background: var(--pengiun-skin);
/* change code above */
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
background: var(--penguin-skin, black);
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
background: var(--penguin-skin, black);
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-cheek {
top: 15%;
left: 35%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: var(--penguin-belly, white);
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.right-feet {
top: 85%;
left: 60%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: var(--penguin-beak, orange);
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: var(--penguin-beak, orange);
width: 16%;
height: 10%;
border-radius: 50%;
}
body {
background:#c6faf1;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,250 +0,0 @@
---
id: 5a9d7295424fe3d0e10cad14
title: Cascading CSS variables
challengeType: 0
videoUrl: ''
localeTitle: Variáveis CSS em cascata
---
## Description
<section id="description"> Quando você cria uma variável, ela fica disponível para você usar dentro do elemento no qual você a cria. Ele também fica disponível dentro de qualquer elemento aninhado dentro dele. Esse efeito é conhecido como <dfn>cascata</dfn> . Por causa da cascata, as variáveis CSS são geralmente definidas no elemento <dfn>: root</dfn> . <code>:root</code> é um seletor de <dfn>pseudo-classe</dfn> que combina com o elemento raiz do documento, geralmente o <code></code> elemento. Ao criar suas variáveis em <code>:root</code> , elas estarão disponíveis globalmente e poderão ser acessadas de qualquer outro seletor posteriormente na folha de estilos. </section>
## Instructions
<section id="instructions"> Defina uma variável chamada <code>--penguin-belly</code> no seletor <code>:root</code> e dê a ela o valor de <code>pink</code> . Você pode, então, ver como o valor irá cair em cascata para alterar o valor para rosa, em qualquer lugar em que a variável for usada. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'declare a variável <code>--penguin-belly</code> no <code>:root</code> e atribua-a a <code>pink</code> .'
testString: 'assert(code.match(/:root\s*?{[\s\S]*--penguin-belly\s*?:\s*?pink\s*?;[\s\S]*}/gi), "declare the <code>--penguin-belly</code> variable in the <code>:root</code> and assign it to <code>pink</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
:root {
/* add code below */
/* add code above */
}
body {
background: var(--penguin-belly, #c6faf1);
}
.penguin {
--penguin-skin: gray;
--penguin-beak: orange;
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.right-cheek {
top: 15%;
left: 35%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: var(--penguin-belly, white);
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.penguin-top {
top: 10%;
left: 25%;
background: var(--penguin-skin, gray);
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
background: var(--penguin-skin, gray);
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-feet {
top: 85%;
left: 60%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: var(--penguin-beak, orange);
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: var(--penguin-beak, orange);
width: 16%;
height: 10%;
border-radius: 50%;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,252 +0,0 @@
---
id: 5a9d72a1424fe3d0e10cad15
title: Change a variable for a specific area
challengeType: 0
videoUrl: ''
localeTitle: Alterar uma variável para uma área específica
---
## Description
<section id="description"> Quando você cria suas variáveis em <code>:root</code> elas definem o valor dessa variável para toda a página. Você pode então sobrescrever essas variáveis definindo-as novamente dentro de um elemento específico. </section>
## Instructions
<section id="instructions"> Altere o valor de <code>--penguin-belly</code> para <code>white</code> na classe dos <code>penguin</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: A classe de <code>penguin</code> deve reatribuir a variável <code>--penguin-belly</code> ao <code>white</code> .
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi), "The <code>penguin</code> class should reassign the <code>--penguin-belly</code> variable to <code>white</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
:root {
--penguin-skin: gray;
--penguin-belly: pink;
--penguin-beak: orange;
}
body {
background: var(--penguin-belly, #c6faf1);
}
.penguin {
/* add code below */
/* add code above */
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.right-cheek {
top: 15%;
left: 35%;
background: var(--penguin-belly, pink);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: var(--penguin-belly, pink);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: var(--penguin-belly, pink);
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.penguin-top {
top: 10%;
left: 25%;
background: var(--penguin-skin, gray);
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
background: var(--penguin-skin, gray);
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-feet {
top: 85%;
left: 60%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: var(--penguin-beak, orange);
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: var(--penguin-beak, orange);
width: 16%;
height: 10%;
border-radius: 50%;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,81 +0,0 @@
---
id: bad87fee1348bd9aedf08803
title: Change the Color of Text
challengeType: 0
videoUrl: ''
localeTitle: Alterar a cor do texto
---
## Description
<section id="description"> Agora vamos mudar a cor de alguns dos nossos textos. Podemos fazer isso alterando o <code>style</code> do seu elemento <code>h2</code>. A propriedade responsável pela cor do texto de um elemento é a propriedade de estilo <code>color</code>. Veja como você definirá a cor do texto do elemento <code>h2</code> como azul: <code>&lt;h2 style=&quot;color: blue;&quot;&gt;CatPhotoApp&lt;/h2&gt;</code> Observe que é uma boa prática finalizar declarações de <code>style</code> na linha com um <code>;</code>. </section>
## Instructions
<section id="instructions"> Altere o estilo do elemento <code>h2</code> para que sua cor de texto fique vermelha. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h2</code> deve estar vermelho.
testString: 'assert($("h2").css("color") === "rgb(255, 0, 0)", "Your <code>h2</code> element should be red.");'
- text: Sua declaração de <code>style</code> deve terminar com a <code>;</code> .
testString: 'assert(code.match(/<h2\s+style\s*=\s*(\"|")\s*color\s*:\s*(?:rgb\(\s*255\s*,\s*0\s*,\s*0\s*\)|rgb\(\s*100%\s*,\s*0%\s*,\s*0%\s*\)|red|#ff0000|#f00|hsl\(\s*0\s*,\s*100%\s*,\s*50%\s*\))\s*\;(\"|")>\s*CatPhotoApp\s*<\/h2>/)," Your <code>style</code> declaration should end with a <code>;</code> .");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,85 +0,0 @@
---
id: bad87fee1348bd9aedf08806
title: Change the Font Size of an Element
challengeType: 0
videoUrl: ''
localeTitle: Alterar o tamanho da fonte de um elemento
---
## Description
<section id="description"> O tamanho da fonte é controlado pela propriedade CSS do <code>font-size</code> da <code>font-size</code> , assim: <blockquote> h1 { <br> tamanho da fonte: 30px; <br> } </blockquote></section>
## Instructions
<section id="instructions"> Dentro da mesma tag <code>&lt;style&gt;</code> que contém sua classe <code>red-text</code> , crie uma entrada para <code>p</code> elementos e configure o <code>font-size</code> da <code>font-size</code> para 16 pixels ( <code>16px</code> ). </section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'Entre as tags de <code>style</code> , forneça os elementos <code>p</code> <code>font-size</code> de <code>font-size</code> de <code>16px</code> . O navegador e o zoom de texto devem estar em 100%.'
testString: 'assert(code.match(/p\s*{\s*font-size\s*:\s*16\s*px\s*;\s*}/i), "Between the <code>style</code> tags, give the <code>p</code> elements <code>font-size</code> of <code>16px</code>. Browser and Text zoom should be at 100%.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: red;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,245 +0,0 @@
---
id: 5a9d726c424fe3d0e10cad11
title: Create a custom CSS Variable
challengeType: 0
videoUrl: ''
localeTitle: Crie uma variável CSS personalizada
---
## Description
<section id="description"> Para criar uma variável CSS, basta dar um <code>name</code> a ela com <code>two dashes</code> à frente e atribuir um <code>value</code> como este: <blockquote> - pele de pinguim: cinza; </blockquote> Isso criará uma variável chamada <code>--penguin-skin</code> e atribuirá a ela o valor de <code>gray</code> . Agora você pode usar essa variável em outro lugar no seu CSS para alterar o valor de outros elementos para cinza. </section>
## Instructions
<section id="instructions"> Na classe <code>penguin</code> , crie um nome de variável <code>--penguin-skin</code> e dê a ele um valor de <code>gray</code> </section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>penguin</code> classe <code>penguin</code> deve declarar a variável <code>--penguin-skin</code> e atribuí-la a <code>gray</code> .
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-skin\s*?:\s*?gray\s*?;[\s\S]*}/gi), "<code>penguin</code> class should declare the <code>--penguin-skin</code> variable and assign it to <code>gray</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.penguin {
/* add code below */
/* add code above */
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.penguin-top {
top: 10%;
left: 25%;
background: black;
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
background: black;
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
background: black;
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
background: black;
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-cheek {
top: 15%;
left: 35%;
background: white;
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: white;
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: white;
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.right-feet {
top: 85%;
left: 60%;
background: orange;
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: orange;
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: orange;
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: orange;
width: 16%;
height: 10%;
border-radius: 50%;
}
body {
background:#c6faf1;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,110 +0,0 @@
---
id: bad87fed1348bd9aede07836
title: Give a Background Color to a div Element
challengeType: 0
videoUrl: ''
localeTitle: Dê uma cor de fundo para um elemento div
---
## Descrição
<section id="description"> Você pode definir a cor de fundo de um elemento com a propriedade <code>background-color</code> . Por exemplo, se você quisesse que a cor de fundo de um elemento fosse <code>green</code> (verde), você colocaria isso no seu elemento de <code>style</code> : <blockquote> .green-background { <br> cor de fundo: verde; <br> } </blockquote></section>
## Instruções
<section id="instructions"> Crie uma classe com o nome de <code>silver-background</code> com a <code>background-color</code> de <code>background-color</code> de prata. Atribua essa classe ao seu elemento <code>div</code> . </section>
## Testes
<section id='tests'>
```yml
tests:
- text: Dê ao seu elemento <code>div</code> a classe <code>silver-background</code> .
testString: 'assert($("div").hasClass("silver-background"), "Give your <code>div</code> element the class <code>silver-background</code>.");'
- text: Seu elemento <code>div</code> deve ter um fundo prateado.
testString: 'assert($("div").css("background-color") === "rgb(192, 192, 192)", "Your <code>div</code> element should have a silver background.");'
- text: Defina uma classe denominada <code>silver-background</code> no elemento <code>style</code> e atribua o valor de <code>silver</code> à propriedade <code>background-color</code> .
testString: 'assert(code.match(/\.silver-background\s*{\s*background-color:\s*silver;\s*}/), "Define a class named <code>silver-background</code> within the <code>style</code> element and assign the value of <code>silver</code> to the <code>background-color</code> property.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solução
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,96 +0,0 @@
---
id: bad87fee1348bd9aedf08807
title: Import a Google Font
challengeType: 0
videoUrl: ''
localeTitle: Importar uma fonte do Google
---
## Description
<section id="description"> Além de especificar fontes comuns que são encontradas na maioria dos sistemas operacionais, também podemos especificar fontes da Web não padrão e personalizadas para uso em nosso site. Existem várias fontes para fontes da web na internet, mas, para este exemplo, vamos nos concentrar na biblioteca de fontes do Google. <a href="https://fonts.google.com/" target="_blank">O Google Fonts</a> é uma biblioteca gratuita de fontes da Web que você pode usar no seu CSS fazendo referência ao URL da fonte. Então, vamos em frente e importar e aplicar uma fonte do Google (note que, se o Google está bloqueado em seu país, você precisará pular este desafio). Para importar uma fonte do Google, copie o (s) tipo (s) de fonte da biblioteca do Google Fonts e cole-o no HTML. Para este desafio, vamos importar a fonte <code>Lobster</code> . Para fazer isso, copie o snippet de código a seguir e cole-o na parte superior do editor de código (antes do elemento de <code>style</code> abertura): <code>&lt;link href=&quot;https://fonts.googleapis.com/css?family=Lobster&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;</code> Agora você pode usar a fonte <code>Lobster</code> no seu CSS usando <code>Lobster</code> como FAMILY_NAME, como no exemplo a seguir: <br> <code>font-family: FAMILY_NAME, GENERIC_NAME;</code> . O GENERIC_NAME é opcional e é uma fonte substituta caso a outra fonte especificada não esteja disponível. Isso é coberto no próximo desafio. Nomes de família fazem distinção entre maiúsculas e minúsculas e precisam ser agrupados entre aspas se houver um espaço no nome. Por exemplo, você precisa de citações para usar a fonte <code>&quot;Open Sans&quot;</code> , mas não para usar a fonte <code>Lobster</code> . </section>
## Instructions
<section id="instructions"> Crie uma regra CSS <code>font-family</code> que use a fonte <code>Lobster</code> e garanta que ela será aplicada ao seu elemento <code>h2</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Importe a fonte <code>Lobster</code> .
testString: 'assert(new RegExp("googleapis", "gi").test(code), "Import the <code>Lobster</code> font.");'
- text: Seu elemento <code>h2</code> deve usar a fonte <code>Lobster</code> .
testString: 'assert($("h2").css("font-family").match(/lobster/i), "Your <code>h2</code> element should use the font <code>Lobster</code>.");'
- text: Use um seletor CSS <code>h2</code> para alterar a fonte.
testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?\s*;\s*\}/gi.test(code), "Use an <code>h2</code> CSS selector to change the font.");'
- text: Seu elemento <code>p</code> ainda deve usar a fonte <code>monospace</code> .
testString: 'assert($("p").css("font-family").match(/monospace/i), "Your <code>p</code> element should still use the font <code>monospace</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: red;
}
p {
font-size: 16px;
font-family: monospace;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,60 +0,0 @@
---
id: 5b7d72c338cd7e35b63f3e14
title: Improve Compatibility with Browser Fallbacks
challengeType: 0
videoUrl: ''
localeTitle: Aprimore a compatibilidade com fallbacks do navegador
---
## Description
<section id="description"> Ao trabalhar com o CSS, você provavelmente se deparará com problemas de compatibilidade do navegador em algum momento. É por isso que é importante fornecer fallbacks do navegador para evitar possíveis problemas. Quando seu navegador analisa o CSS de uma página da Web, ele ignora as propriedades que não reconhece ou não suporta. Por exemplo, se você usar uma variável CSS para atribuir uma cor de plano de fundo em um site, o Internet Explorer ignorará a cor do plano de fundo porque ela não suporta variáveis CSS. Nesse caso, o navegador usará qualquer valor que tenha para essa propriedade. Se não puder encontrar nenhum outro valor definido para essa propriedade, ele será revertido para o valor padrão, que normalmente não é o ideal. Isso significa que, se você quiser fornecer um retorno do navegador, será tão fácil quanto fornecer outro valor com maior suporte imediatamente antes de sua declaração. Dessa forma, um navegador mais antigo terá algo em que voltar, enquanto um navegador mais recente irá interpretar qualquer declaração que venha depois na cascata. </section>
## Instructions
<section id="instructions"> Parece que uma variável está sendo usada para definir a cor de fundo da classe <code>.red-box</code> . Vamos melhorar nossa compatibilidade com o navegador, adicionando outra declaração de <code>background</code> antes da declaração existente e definindo seu valor para vermelho. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua regra de <code>.red-box</code> vermelha deve incluir um fallback com o <code>background</code> definido como vermelho imediatamente antes da declaração de <code>background</code> existente.
testString: 'assert(code.match(/.red-box\s*{[^}]*background:\s*(red|#ff0000|#f00|rgb\(\s*255\s*,\s*0\s*,\s*0\s*\)|rgb\(\s*100%\s*,\s*0%\s*,\s*0%\s*\)|hsl\(\s*0\s*,\s*100%\s*,\s*50%\s*\))\s*;\s*background:\s*var\(\s*--red-color\s*\);/gi), "Your <code>.red-box</code> rule should include a fallback with the <code>background</code> set to red immediately before the existing <code>background</code> declaration.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
:root {
--red-color: red;
}
.red-box {
background: var(--red-color);
height: 200px;
width:200px;
}
</style>
<div class="red-box"></div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,66 +0,0 @@
---
id: bad87fee1348bd9aedf08746
title: Inherit Styles from the Body Element
challengeType: 0
videoUrl: ''
localeTitle: Herdar estilos do elemento do corpo
---
## Description
<section id="description"> Agora provamos que toda página HTML tem um elemento <code>body</code> , e que seu elemento <code>body</code> também pode ser estilizado com CSS. Lembre-se, você pode estilizar seu elemento <code>body</code> como qualquer outro elemento HTML, e todos os seus outros elementos herdarão os estilos de seu <code>body</code> . </section>
## Instructions
<section id="instructions"> Primeiro, crie um elemento <code>h1</code> com o texto <code>Hello World</code> Então, vamos dar a todos os elementos da sua página a cor <code>green</code> adicionando <code>color: green;</code> à declaração de estilo do elemento do seu <code>body</code> . Finalmente, dê ao seu <code>body</code> elemento font-family of <code>monospace</code> adicionando <code>font-family: monospace;</code> à declaração de estilo do elemento do seu <code>body</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Crie um elemento <code>h1</code> .
testString: 'assert(($("h1").length > 0), "Create an <code>h1</code> element.");'
- text: Seu elemento <code>h1</code> deve ter o texto <code>Hello World</code> .
testString: 'assert(($("h1").length > 0 && $("h1").text().match(/hello world/i)), "Your <code>h1</code> element should have the text <code>Hello World</code>.");'
- text: Certifique-se de que seu elemento <code>h1</code> tenha uma tag de fechamento.
testString: 'assert(code.match(/<\/h1>/g) && code.match(/<h1/g) && code.match(/<\/h1>/g).length === code.match(/<h1/g).length, "Make sure your <code>h1</code> element has a closing tag.");'
- text: Dê ao seu elemento de <code>body</code> a propriedade de <code>color</code> <code>green</code> .
testString: 'assert(($("body").css("color") === "rgb(0, 128, 0)"), "Give your <code>body</code> element the <code>color</code> property of <code>green</code>.");'
- text: Dê ao seu elemento de <code>body</code> a propriedade <code>font-family</code> de <code>monospace</code> .
testString: 'assert(($("body").css("font-family").match(/monospace/i)), "Give your <code>body</code> element the <code>font-family</code> property of <code>monospace</code>.");'
- text: Seu elemento <code>h1</code> deve herdar a fonte <code>monospace</code> de seu elemento <code>body</code> .
testString: 'assert(($("h1").length > 0 && $("h1").css("font-family").match(/monospace/i)), "Your <code>h1</code> element should inherit the font <code>monospace</code> from your <code>body</code> element.");'
- text: Seu elemento <code>h1</code> deve herdar a cor verde do elemento do <code>body</code> .
testString: 'assert(($("h1").length > 0 && $("h1").css("color") === "rgb(0, 128, 0)"), "Your <code>h1</code> element should inherit the color green from your <code>body</code> element.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
}
</style>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,108 +0,0 @@
---
id: bad87fee1348bd9aedf08815
title: Make Circular Images with a border-radius
challengeType: 0
videoUrl: ''
localeTitle: Faça imagens circulares com um raio de borda
---
## Description
<section id="description"> Além dos pixels, você também pode especificar o <code>border-radius</code> da <code>border-radius</code> usando uma porcentagem. </section>
## Instructions
<section id="instructions"> Dê a sua foto de gato um <code>border-radius</code> de <code>border-radius</code> de <code>50%</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'Sua imagem deve ter um raio de borda de <code>50%</code> , tornando-a perfeitamente circular.'
testString: 'assert(parseInt($("img").css("border-top-left-radius")) > 48, "Your image should have a border radius of <code>50%</code>, making it perfectly circular.");'
- text: Certifique-se de usar um valor percentual de <code>50%</code> .
testString: 'assert(code.match(/50%/g), "Be sure to use a percentage value of <code>50%</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 10px;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,75 +0,0 @@
---
id: bad87fee1348bd9aedf07756
title: Override All Other Styles by using Important
challengeType: 0
videoUrl: ''
localeTitle: Substituir todos os outros estilos usando Importante
---
## Description
<section id="description"> Yay! Acabamos de provar que os estilos inline irão substituir todas as declarações CSS no seu elemento <code>style</code> . Mas espere. Há uma última maneira de substituir o CSS. Este é o método mais poderoso de todos. Mas antes de fazermos isso, vamos falar sobre o motivo pelo qual você deseja substituir o CSS. Em muitas situações, você usará bibliotecas CSS. Estes podem substituir acidentalmente o seu próprio CSS. Então, quando você absolutamente precisa ter certeza de que um elemento tem CSS específico, você pode usar <code>!important</code> Vamos voltar à nossa declaração de classe de <code>pink-text</code> . Lembre-se de que nossa classe de <code>pink-text</code> foi substituída por declarações de classe, declarações de id e estilos inline subsequentes. </section>
## Instructions
<section id="instructions"> Vamos adicionar a palavra-chave <code>!important</code> para a declaração de cor do elemento de texto rosa para ter 100% de certeza de que o elemento <code>h1</code> será rosa. Um exemplo de como fazer isso é: <code>color: red !important;</code> </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h1</code> deve ter a classe <code>pink-text</code> .
testString: 'assert($("h1").hasClass("pink-text"), "Your <code>h1</code> element should have the class <code>pink-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter a classe <code>blue-text</code> .
testString: 'assert($("h1").hasClass("blue-text"), "Your <code>h1</code> element should have the class <code>blue-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter o id de <code>orange-text</code> .
testString: 'assert($("h1").attr("id") === "orange-text", "Your <code>h1</code> element should have the id of <code>orange-text</code>.");'
- text: 'Seu elemento <code>h1</code> deve ter o estilo de <code>color: white</code> inline <code>color: white</code> .'
testString: 'assert(code.match(/<h1.*style/gi) && code.match(/<h1.*style.*color\s*?:/gi), "Your <code>h1</code> element should have the inline style of <code>color&#58; white</code>.");'
- text: Sua declaração de classe de <code>pink-text</code> deve ter a palavra-chave <code>!important</code> para substituir todas as outras declarações.
testString: 'assert(code.match(/\.pink-text\s*?\{[\s\S]*?color:.*pink.*!important\s*;?[^\.]*\}/g), "Your <code>pink-text</code> class declaration should have the <code>!important</code> keyword to override all other declarations.");'
- text: Seu elemento <code>h1</code> deve ser rosa.
testString: 'assert($("h1").css("color") === "rgb(255, 192, 203)", "Your <code>h1</code> element should be pink.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
font-family: monospace;
color: green;
}
#orange-text {
color: orange;
}
.pink-text {
color: pink;
}
.blue-text {
color: blue;
}
</style>
<h1 id="orange-text" class="pink-text blue-text" style="color: white">Hello World!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,74 +0,0 @@
---
id: bad87fee1348bd8aedf06756
title: Override Class Declarations by Styling ID Attributes
challengeType: 0
videoUrl: ''
localeTitle: Substituir Declarações de Classe por Atributos de ID de Estilo
---
## Description
<section id="description"> Acabamos de provar que os navegadores lêem CSS de cima para baixo. Isso significa que, no caso de um conflito, o navegador usará a última declaração CSS. Mas ainda não terminamos. Existem outras maneiras de substituir o CSS. Você se lembra de atributos id? Vamos substituir suas classes de <code>blue-text</code> <code>pink-text</code> <code>blue-text</code> e tornar seu elemento <code>h1</code> laranja, dando um id ao elemento <code>h1</code> e, em seguida, estilizando esse id. </section>
## Instructions
<section id="instructions"> Dê ao seu elemento <code>h1</code> o atributo <code>id</code> do <code>orange-text</code> . Lembre-se, os estilos de id são assim: <code>&lt;h1 id=&quot;orange-text&quot;&gt;</code> Deixe as classes de <code>pink-text</code> <code>blue-text</code> <code>pink-text</code> em seu elemento <code>h1</code> . Crie uma declaração CSS para o seu ID de <code>orange-text</code> em seu elemento de <code>style</code> . Aqui está um exemplo do que isso parece: <blockquote> # brown-text { <br> cor marrom; <br> } </blockquote> Nota: Não importa se você declara este CSS acima ou abaixo da classe pink-text, já que o atributo id sempre terá precedência. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h1</code> deve ter a classe <code>pink-text</code> .
testString: 'assert($("h1").hasClass("pink-text"), "Your <code>h1</code> element should have the class <code>pink-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter a classe <code>blue-text</code> .
testString: 'assert($("h1").hasClass("blue-text"), "Your <code>h1</code> element should have the class <code>blue-text</code>.");'
- text: Dê ao seu elemento <code>h1</code> o id do <code>orange-text</code> .
testString: 'assert($("h1").attr("id") === "orange-text", "Give your <code>h1</code> element the id of <code>orange-text</code>.");'
- text: Deve haver apenas um elemento <code>h1</code> .
testString: 'assert(($("h1").length === 1), "There should be only one <code>h1</code> element.");'
- text: Crie uma declaração CSS para o seu ID de <code>orange-text</code>
testString: 'assert(code.match(/#orange-text\s*{/gi), "Create a CSS declaration for your <code>orange-text</code> id");'
- text: Não dê ao seu <code>h1</code> nenhum atributo de <code>style</code> .
testString: 'assert(!code.match(/<h1.*style.*>/gi), "Do not give your <code>h1</code> any <code>style</code> attributes.");'
- text: Seu elemento <code>h1</code> deve ser laranja.
testString: 'assert($("h1").css("color") === "rgb(255, 165, 0)", "Your <code>h1</code> element should be orange.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
font-family: monospace;
color: green;
}
.pink-text {
color: pink;
}
.blue-text {
color: blue;
}
</style>
<h1 class="pink-text blue-text">Hello World!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,73 +0,0 @@
---
id: bad87fee1348bd9aedf06756
title: Override Class Declarations with Inline Styles
challengeType: 0
videoUrl: ''
localeTitle: Substituir declarações de classe com estilos in-line
---
## Description
<section id="description"> Por isso, provamos que as declarações de ID substituem as declarações de classe, independentemente de onde elas são declaradas no CSS do elemento de <code>style</code> . Existem outras maneiras de substituir o CSS. Você se lembra de estilos inline? </section>
## Instructions
<section id="instructions"> Use um <code>inline style</code> para tentar tornar nosso elemento <code>h1</code> branco. Lembre-se de que os estilos de linha se parecem com isso: <code>&lt;h1 style=&quot;color: green;&quot;&gt;</code> Deixe as classes de <code>pink-text</code> <code>blue-text</code> <code>pink-text</code> em seu elemento <code>h1</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h1</code> deve ter a classe <code>pink-text</code> .
testString: 'assert($("h1").hasClass("pink-text"), "Your <code>h1</code> element should have the class <code>pink-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter a classe <code>blue-text</code> .
testString: 'assert($("h1").hasClass("blue-text"), "Your <code>h1</code> element should have the class <code>blue-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter o id de <code>orange-text</code> .
testString: 'assert($("h1").attr("id") === "orange-text", "Your <code>h1</code> element should have the id of <code>orange-text</code>.");'
- text: Dê ao seu elemento <code>h1</code> um estilo inline.
testString: 'assert(document.querySelector("h1[style]"), "Give your <code>h1</code> element an inline style.");'
- text: Seu elemento <code>h1</code> deve ser branco.
testString: 'assert($("h1").css("color") === "rgb(255, 255, 255)", "Your <code>h1</code> element should be white.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
font-family: monospace;
color: green;
}
#orange-text {
color: orange;
}
.pink-text {
color: pink;
}
.blue-text {
color: blue;
}
</style>
<h1 id="orange-text" class="pink-text blue-text">Hello World!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,65 +0,0 @@
---
id: bad87fee1348bd9aedf04756
title: Override Styles in Subsequent CSS
challengeType: 0
videoUrl: ''
localeTitle: Substituir estilos no CSS subseqüente
---
## Description
<section id="description"> Nossa classe &quot;texto rosa&quot; anulou a declaração CSS do elemento do <code>body</code> ! Nós acabamos de provar que nossas classes irão sobrescrever o CSS do elemento <code>body</code> . Então, a próxima questão lógica é: o que podemos fazer para substituir nossa classe de <code>pink-text</code> ? </section>
## Instructions
<section id="instructions"> Crie uma classe CSS adicional chamada <code>blue-text</code> que dá um elemento a cor azul. Certifique-se de que esteja abaixo da sua declaração de classe de <code>pink-text</code> . Aplique a classe de <code>blue-text</code> ao seu elemento <code>h1</code> , além de sua classe de <code>pink-text</code> , e vamos ver qual deles ganha. A aplicação de vários atributos de classe a um elemento HTML é feita com um espaço entre eles como este: <code>class=&quot;class1 class2&quot;</code> Nota: Não importa qual ordem as classes estão listadas no elemento HTML. No entanto, a ordem das declarações de <code>class</code> na seção <code>&lt;style&gt;</code> é o que é importante. A segunda declaração sempre terá precedência sobre a primeira. Porque <code>.blue-text</code> é declarado em segundo lugar, ele substitui os atributos de <code>.pink-text</code> </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h1</code> deve ter a classe <code>pink-text</code> .
testString: 'assert($("h1").hasClass("pink-text"), "Your <code>h1</code> element should have the class <code>pink-text</code>.");'
- text: Seu elemento <code>h1</code> deve ter a classe <code>blue-text</code> .
testString: 'assert($("h1").hasClass("blue-text"), "Your <code>h1</code> element should have the class <code>blue-text</code>.");'
- text: Tanto <code>blue-text</code> quanto <code>blue-text</code> <code>pink-text</code> devem pertencer ao mesmo elemento <code>h1</code> .
testString: 'assert($(".pink-text").hasClass("blue-text"), "Both <code>blue-text</code> and <code>pink-text</code> should belong to the same <code>h1</code> element.");'
- text: Seu elemento <code>h1</code> deve ser azul.
testString: 'assert($("h1").css("color") === "rgb(0, 0, 255)", "Your <code>h1</code> element should be blue.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
font-family: monospace;
color: green;
}
.pink-text {
color: pink;
}
</style>
<h1 class="pink-text">Hello World!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,60 +0,0 @@
---
id: bad87fee1348bd9aedf08756
title: Prioritize One Style Over Another
challengeType: 0
videoUrl: ''
localeTitle: Priorize um estilo sobre outro
---
## Description
<section id="description"> Às vezes, seus elementos HTML receberão vários estilos que entram em conflito entre si. Por exemplo, seu elemento <code>h1</code> não pode ser verde e rosa ao mesmo tempo. Vamos ver o que acontece quando criamos uma classe que torna o texto rosa e depois aplicamos a um elemento. Nossa classe irá <em>sobrepor</em> a <code>color: green;</code> do elemento <code>body</code> <code>color: green;</code> Propriedade CSS? </section>
## Instructions
<section id="instructions"> Crie uma classe CSS chamada <code>pink-text</code> que forneça um elemento cor-de-rosa. Dê ao seu elemento <code>h1</code> a classe de <code>pink-text</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h1</code> deve ter a classe <code>pink-text</code> .
testString: 'assert($("h1").hasClass("pink-text"), "Your <code>h1</code> element should have the class <code>pink-text</code>.");'
- text: Seu <code>&lt;style&gt;</code> deve ter uma classe CSS de <code>pink-text</code> que altere a <code>color</code> .
testString: 'assert(code.match(/\.pink-text\s*\{\s*color\s*:\s*.+\s*;\s*\}/g), "Your <code>&#60;style&#62;</code> should have a <code>pink-text</code> CSS class that changes the <code>color</code>.");'
- text: Seu elemento <code>h1</code> deve ser rosa.
testString: 'assert($("h1").css("color") === "rgb(255, 192, 203)", "Your <code>h1</code> element should be pink.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
font-family: monospace;
color: green;
}
</style>
<h1>Hello World!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,89 +0,0 @@
---
id: bad87fee1348bd9aede08807
title: Set the Font Family of an Element
challengeType: 0
videoUrl: ''
localeTitle: Definir a família de fontes de um elemento
---
## Description
<section id="description"> Você pode definir qual fonte um elemento deve usar, usando a propriedade <code>font-family</code> . Por exemplo, se você quiser definir a fonte do elemento <code>h2</code> como <code>sans-serif</code> , use o seguinte CSS: <blockquote> h2 { <br> font-family: sem serifa; <br> } </blockquote></section>
## Instructions
<section id="instructions"> Faça com que todos os seus elementos <code>p</code> usem a fonte <code>monospace</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seus elementos <code>p</code> devem usar a fonte <code>monospace</code> .
testString: 'assert($("p").not(".red-text").css("font-family").match(/monospace/i), "Your <code>p</code> elements should use the font <code>monospace</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,110 +0,0 @@
---
id: bad87eee1348bd9aede07836
title: Set the id of an Element
challengeType: 0
videoUrl: ''
localeTitle: Definir o id de um elemento
---
## Description
<section id="description"> Além das classes, cada elemento HTML também pode ter um atributo <code>id</code>. Há vários benefícios em usar os atributos <code>id</code>: você pode usar um <code>id</code> para estilizar um único elemento e, posteriormente, aprenderá que pode usá-los para selecionar e modificar elementos específicos com JavaScript. Atributos <code>id</code> devem ser exclusivos. Os navegadores não reforçam isso, mas é uma prática recomendada amplamente aceita. Então, por favor, não dê a mais de um elemento o mesmo atributo <code>id</code>. Veja um exemplo de como você atribui ao elemento <code>h2</code> o id de <code>cat-photo-app</code>: <code>&lt;h2 id=&quot;cat-photo-app&quot;&gt;</code> </section>
## Instructions
<section id="instructions"> Dê ao seu elemento <code>form</code> o id <code>cat-photo-form</code>. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê ao seu elemento <code>form</code> o id de <code>cat-photo-form</code> .
testString: 'assert($("form").attr("id") === "cat-photo-form", "Give your <code>form</code> element the id of <code>cat-photo-form</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
.silver-background {
background-color: silver;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div class="silver-background">
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,98 +0,0 @@
---
id: bad87fee1348bd9acdf08812
title: Size Your Images
challengeType: 0
videoUrl: ''
localeTitle: Tamanho suas imagens
---
## Description
<section id="description"> CSS tem uma propriedade chamada <code>width</code> que controla a largura de um elemento. Assim como com fontes, usaremos <code>px</code> (pixels) para especificar a largura da imagem. Por exemplo, se quiséssemos criar uma classe CSS chamada <code>larger-image</code> que fornecesse elementos HTML com uma largura de 500 pixels, usaríamos: <blockquote> &lt;style&gt; <br> .larger-image { <br> largura: 500px; <br> } <br> &lt;/ style&gt; </blockquote></section>
## Instructions
<section id="instructions"> Crie uma classe chamada <code>smaller-image</code> e use-a para redimensionar a imagem para que ela tenha apenas 100 pixels de largura. <strong>Nota</strong> <br> Devido às diferenças na implementação do navegador, talvez você precise estar com zoom de 100% para passar nos testes deste desafio. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>img</code> deveria ter a classe <code>smaller-image</code>.
testString: assert($("img[src='https://bit.ly/fcc-relaxing-cat']").attr('class') === "smaller-image");
- text: Sua imagem deve ter 100 pixels de largura. O zoom do navegador deve estar em 100%.
testString: assert($("img").width() === 100);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,101 +0,0 @@
---
id: bad87fee1348bd9aedf08808
title: Specify How Fonts Should Degrade
challengeType: 0
videoUrl: ''
localeTitle: Especifique como as fontes devem ser degradadas
---
## Description
<section id="description"> Existem várias fontes padrão disponíveis em todos os navegadores. Essas famílias de fontes genéricas incluem <code>monospace</code> , <code>serif</code> e <code>sans-serif</code> Quando uma fonte não está disponível, você pode dizer ao navegador para &quot;degradar&quot; a outra fonte. Por exemplo, se você quiser que um elemento use a fonte <code>Helvetica</code> , mas se degrada na fonte <code>sans-serif</code> quando a <code>Helvetica</code> não estiver disponível, especifique-o da seguinte maneira: <blockquote> p { <br> família de fontes: Helvetica, sans-serif; <br> } </blockquote> Os nomes das famílias de fontes genéricas não diferenciam maiúsculas de minúsculas. Além disso, eles não precisam de aspas porque são palavras-chave CSS. </section>
## Instructions
<section id="instructions"> Para começar, aplique a fonte <code>monospace</code> ao elemento <code>h2</code> , para que agora ela tenha duas fontes - <code>Lobster</code> e <code>monospace</code> . No último desafio, você importou a fonte <code>Lobster</code> usando a tag de <code>link</code> . Agora comente a importação da fonte <code>Lobster</code> (usando os comentários HTML que você aprendeu antes) do Google Fonts para que ela não esteja mais disponível. Observe como seu elemento <code>h2</code> degrada para a fonte <code>monospace</code> . <strong>Nota</strong> <br> Se você tem a fonte Lobster instalada no seu computador, você não verá a degradação porque o seu navegador é capaz de encontrar a fonte. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento h2 deve usar a fonte <code>Lobster</code> .
testString: 'assert($("h2").css("font-family").match(/^"?lobster/i), "Your h2 element should use the font <code>Lobster</code>.");'
- text: Seu elemento h2 deve se degradar na fonte <code>monospace</code> quando <code>Lobster</code> não estiver disponível.
testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?,\s*monospace\s*;\s*\}/gi.test(code), "Your h2 element should degrade to the font <code>monospace</code> when <code>Lobster</code> is not available.");'
- text: Comente sua chamada para o Google para a fonte <code>Lobster</code> colocando <code>&lt;!--</code> na frente dela.
testString: 'assert(new RegExp("<!--[^fc]", "gi").test(code), "Comment out your call to Google for the <code>Lobster</code> font by putting <code>&#60!--</code> in front of it.");'
- text: Certifique-se de fechar seu comentário adicionando <code>--&gt;</code> .
testString: 'assert(new RegExp("[^fc]-->", "gi").test(code), "Be sure to close your comment by adding <code>--&#62;</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster;
}
p {
font-size: 16px;
font-family: monospace;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,94 +0,0 @@
---
id: bad87fee1348bd9aefe08806
title: Style Multiple Elements with a CSS Class
challengeType: 0
videoUrl: ''
localeTitle: Estilo vários elementos com uma classe CSS
---
## Description
<section id="description"> As classes permitem que você use os mesmos estilos CSS em vários elementos HTML. Você pode ver isso aplicando sua classe de <code>red-text</code> ao primeiro elemento <code>p</code> . </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h2</code> deve estar vermelho.
testString: 'assert($("h2").css("color") === "rgb(255, 0, 0)", "Your <code>h2</code> element should be red.");'
- text: Seu elemento <code>h2</code> deve ter a classe <code>red-text</code> .
testString: 'assert($("h2").hasClass("red-text"), "Your <code>h2</code> element should have the class <code>red-text</code>.");'
- text: Seu primeiro elemento <code>p</code> deve ser vermelho.
testString: 'assert($("p:eq(0)").css("color") === "rgb(255, 0, 0)", "Your first <code>p</code> element should be red.");'
- text: Seu segundo e terceiro elementos <code>p</code> não devem ser vermelhos.
testString: 'assert(!($("p:eq(1)").css("color") === "rgb(255, 0, 0)") && !($("p:eq(2)").css("color") === "rgb(255, 0, 0)"), "Your second and third <code>p</code> elements should not be red.");'
- text: Seu primeiro elemento <code>p</code> deve ter a classe <code>red-text</code> .
testString: 'assert($("p:eq(0)").hasClass("red-text"), "Your first <code>p</code> element should have the class <code>red-text</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: red;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,55 +0,0 @@
---
id: bad87fee1348bd9aedf08736
title: Style the HTML Body Element
challengeType: 0
videoUrl: ''
localeTitle: Estilize o elemento do corpo do HTML
---
## Description
<section id="description"> Agora vamos começar de novo e falar sobre herança de CSS. Toda página HTML possui um elemento <code>body</code> . </section>
## Instructions
<section id="instructions"> Podemos provar que o elemento do <code>body</code> existe aqui, dando-lhe uma <code>background-color</code> de <code>background-color</code> de preto. Podemos fazer isso adicionando o seguinte ao nosso elemento de <code>style</code> : <blockquote> body { <br> cor de fundo: preto; <br> } </blockquote></section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê ao seu <code>body</code> a <code>background-color</code> de <code>background-color</code> do preto.
testString: 'assert($("body").css("background-color") === "rgb(0, 0, 0)", "Give your <code>body</code> element the <code>background-color</code> of black.");'
- text: Verifique se sua regra de CSS está formatada corretamente com as chaves de abertura e fechamento.
testString: 'assert(code.match(/<style>\s*body\s*\{\s*background.*\s*:\s*.*;\s*\}\s*<\/style>/i), "Make sure your CSS rule is properly formatted with both opening and closing curly brackets.");'
- text: Verifique se sua regra de CSS termina com um ponto e vírgula.
testString: 'assert(code.match(/<style>\s*body\s*\{\s*background.*\s*:\s*.*;\s*\}\s*<\/style>/i), "Make sure your CSS rule ends with a semi-colon.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
</style>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,85 +0,0 @@
---
id: bad82fee1322bd9aedf08721
title: Understand Absolute versus Relative Units
challengeType: 0
videoUrl: ''
localeTitle: Entenda Unidades Absolutas versus Unidades Relativas
---
## Description
<section id="description"> Os últimos vários desafios definem a margem ou preenchimento de um elemento com pixels ( <code>px</code> ). Os pixels são um tipo de unidade de comprimento, que é o que informa ao navegador como dimensionar ou espaçar um item. Além do <code>px</code> , o CSS tem várias opções de unidades de comprimento diferentes que você pode usar. Os dois tipos principais de unidades de comprimento são absolutos e relativos. Unidades absolutas se ligam a unidades físicas de comprimento. Por exemplo, <code>in</code> e <code>mm</code> referem-se a polegadas e milímetros, respectivamente. Unidades de comprimento absoluto se aproximam da medida real em uma tela, mas há algumas diferenças dependendo da resolução de uma tela. Unidades relativas, como <code>em</code> ou <code>rem</code> , são relativas a outro valor de comprimento. Por exemplo, <code>em</code> se baseia no tamanho da fonte de um elemento. Se você usá-lo para definir a própria propriedade <code>font-size</code> , ela será relativa ao <code>font-size</code> da <code>font-size</code> do pai. <strong>Nota</strong> <br> Existem várias opções de unidades relativas que estão ligadas ao tamanho da janela de visualização. Eles são abordados na seção Princípios de design da Web responsivo. </section>
## Instructions
<section id="instructions"> Adicione uma propriedade <code>padding</code> ao elemento com a classe <code>red-box</code> e defina-a como <code>1.5em</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>red-box</code> deve ter uma propriedade de <code>padding</code> .
testString: 'assert($(".red-box").css("padding-top") != "0px" && $(".red-box").css("padding-right") != "0px" && $(".red-box").css("padding-bottom") != "0px" && $(".red-box").css("padding-left") != "0px", "Your <code>red-box</code> class should have a <code>padding</code> property.");'
- text: 'Sua classe de <code>red-box</code> deve fornecer elementos de 1,5n de <code>padding</code> .'
testString: 'assert(code.match(/\.red-box\s*?{\s*?.*?\s*?.*?\s*?padding:\s*?1\.5em/gi), "Your <code>red-box</code> class should give elements 1.5em of <code>padding</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}
.red-box {
background-color: red;
margin: 20px 40px 20px 40px;
}
.green-box {
background-color: green;
margin: 20px 40px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,92 +0,0 @@
---
id: bad87fee1348bd9aecf08806
title: Use a CSS Class to Style an Element
challengeType: 0
videoUrl: ''
localeTitle: Use uma classe CSS para estilizar um elemento
---
## Description
<section id="description"> Classes são estilos reutilizáveis que podem ser adicionados a elementos HTML. Aqui está um exemplo de declaração de classe CSS: <blockquote> &lt;style&gt; <br> .blue-text { <br> cor azul; <br> } <br> &lt;/ style&gt; </blockquote> Você pode ver que criamos uma classe CSS chamada <code>blue-text</code> na tag <code>&lt;style&gt;</code> . Você pode aplicar uma classe a um elemento HTML como este: <code>&lt;h2 class=&quot;blue-text&quot;&gt;CatPhotoApp&lt;/h2&gt;</code> Observe que no seu elemento de <code>style</code> CSS, os nomes de classe começam com um ponto. No atributo de classe dos elementos HTML, o nome da classe não inclui o período. </section>
## Instructions
<section id="instructions"> Dentro do seu elemento de <code>style</code> , altere o seletor <code>h2</code> para <code>.red-text</code> e atualize o valor da <code>blue</code> de <code>blue</code> para <code>red</code> . Dê ao seu elemento <code>h2</code> o atributo <code>class</code> com um valor <code>&#39;red-text&#39;</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>h2</code> deve ser vermelho.
testString: assert($("h2").css("color") === "rgb(255, 0, 0)");
- text: Seu elemento <code>h2</code> deveria ter a classe <code>red-text</code>.
testString: assert($("h2").hasClass("red-text"));
- text: Sua folha de estilo deve declarar uma classe <code>red-text</code> e tenha a cor definida em vermelho.
testString: assert(code.match(/\.red-text\s*\{\s*color\s*:\s*red;\s*\}/g));
- text: Não use declarações de estilo embutido como <code>style="color&#58; red"</code> em seu elemento <code>h2</code>.
testString: assert($("h2").attr("style") === undefined);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
h2 {
color: blue;
}
</style>
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,264 +0,0 @@
---
id: 5a9d727a424fe3d0e10cad12
title: Use a custom CSS Variable
challengeType: 0
videoUrl: ''
localeTitle: Use uma variável CSS personalizada
---
## Description
<section id="description"> Depois de criar sua variável, você pode atribuir seu valor a outras propriedades CSS referenciando o nome que você deu a ela. <blockquote> fundo: var (- pinguim-pele); </blockquote> Isso mudará o plano de fundo de qualquer elemento que você esteja direcionando para cinza porque esse é o valor da variável <code>--penguin-skin</code> . Observe que os estilos não serão aplicados, a menos que os nomes das variáveis sejam uma correspondência exata. </section>
## Instructions
<section id="instructions"> Aplique a variável <code>--penguin-skin</code> na propriedade <code>background</code> das classes <code>penguin-top</code> , <code>penguin-bottom</code> , <code>right-hand</code> <code>left-hand</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Aplique a variável <code>--penguin-skin</code> na propriedade <code>background</code> da classe de <code>penguin-top</code> .
testString: 'assert(code.match(/.penguin-top\s*?{[\s\S]*background\s*?:\s*?var\s*?\(\s*?--penguin-skin\s*?\)\s*?;[\s\S]*}[\s\S]*.penguin-bottom\s{/gi), "Apply the <code>--penguin-skin</code> variable to the <code>background</code> property of the <code>penguin-top</code> class.");'
- text: Aplique a variável <code>--penguin-skin</code> na propriedade <code>background</code> da classe com <code>penguin-bottom</code> .
testString: 'assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\s*?\(\s*?--penguin-skin\s*?\)\s*?;[\s\S]*}[\s\S]*.right-hand\s{/gi), "Apply the <code>--penguin-skin</code> variable to the <code>background</code> property of the <code>penguin-bottom</code> class.");'
- text: Aplique a variável <code>--penguin-skin</code> à propriedade <code>background</code> da classe à <code>right-hand</code> .
testString: 'assert(code.match(/.right-hand\s*?{[\s\S]*background\s*?:\s*?var\s*?\(\s*?--penguin-skin\s*?\)\s*?;[\s\S]*}[\s\S]*.left-hand\s{/gi), "Apply the <code>--penguin-skin</code> variable to the <code>background</code> property of the <code>right-hand</code> class.");'
- text: Aplique a variável <code>--penguin-skin</code> na propriedade <code>background</code> da classe à <code>left-hand</code> .
testString: 'assert(code.match(/.left-hand\s*?{[\s\S]*background\s*?:\s*?var\s*?\(\s*?--penguin-skin\s*?\)\s*?;[\s\S]*}/gi), "Apply the <code>--penguin-skin</code> variable to the <code>background</code> property of the <code>left-hand</code> class.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.penguin {
--penguin-skin: gray;
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.penguin-top {
top: 10%;
left: 25%;
/* change code below */
background: black;
/* change code above */
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
/* change code below */
background: black;
/* change code above */
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
/* change code below */
background: black;
/* change code above */
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
/* change code below */
background: black;
/* change code above */
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-cheek {
top: 15%;
left: 35%;
background: white;
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: white;
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: white;
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.right-feet {
top: 85%;
left: 60%;
background: orange;
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: orange;
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: orange;
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: orange;
width: 16%;
height: 10%;
border-radius: 50%;
}
body {
background:#c6faf1;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,280 +0,0 @@
---
id: 5a9d72ad424fe3d0e10cad16
title: Use a media query to change a variable
challengeType: 0
videoUrl: ''
localeTitle: Use uma consulta de mídia para alterar uma variável
---
## Description
<section id="description"> Variáveis CSS podem simplificar a maneira como você usa as consultas de mídia. Por exemplo, quando a tela é menor ou maior que o ponto de interrupção da consulta de mídia, você pode alterar o valor de uma variável e aplicar seu estilo onde quer que ela seja usada. </section>
## Instructions
<section id="instructions"> No seletor <code>:root</code> da <code>media query</code> , altere-o para que <code>--penguin-size</code> seja redefinido e tenha um valor de <code>200px</code> . Além disso, redefina <code>--penguin-skin</code> e dê a ele um valor de <code>black</code> . Em seguida, redimensione a visualização para ver essa alteração em ação. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: '<code>:root</code> deve reatribuir a variável <code>--penguin-size</code> para <code>200px</code> .'
testString: 'assert(code.match(/media\s*?\(\s*?max-width\s*?:\s*?350px\s*?\)\s*?{[\s\S]*:root\s*?{[\s\S]*--penguin-size\s*?:\s*?200px\s*?;[\s\S]*}[\s\S]*}/gi), "<code>:root</code> should reassign the <code>--penguin-size</code> variable to <code>200px</code>.");'
- text: '<code>:root</code> deve reatribuir a variável <code>--penguin-skin</code> para <code>black</code> .'
testString: 'assert(code.match(/media\s*?\(\s*?max-width\s*?:\s*?350px\s*?\)\s*?{[\s\S]*:root\s*?{[\s\S]*--penguin-skin\s*?:\s*?black\s*?;[\s\S]*}[\s\S]*}/gi), "<code>:root</code> should reassign the <code>--penguin-skin</code> variable to <code>black</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
:root {
--penguin-size: 300px;
--penguin-skin: gray;
--penguin-belly: white;
--penguin-beak: orange;
}
@media (max-width: 350px) {
:root {
/* add code below */
/* add code above */
}
}
.penguin {
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: var(--penguin-size, 300px);
height: var(--penguin-size, 300px);
}
.right-cheek {
top: 15%;
left: 35%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: var(--penguin-belly, white);
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.penguin-top {
top: 10%;
left: 25%;
background: var(--penguin-skin, gray);
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
background: var(--penguin-skin, gray);
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 5%;
left: 25%;
background: var(--penguin-skin, black);
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(130deg);
z-index: -1;
animation-duration: 3s;
animation-name: wave;
animation-iteration-count: infinite;
transform-origin:0% 0%;
animation-timing-function: linear;
}
@keyframes wave {
10% {
transform: rotate(110deg);
}
20% {
transform: rotate(130deg);
}
30% {
transform: rotate(110deg);
}
40% {
transform: rotate(130deg);
}
}
.left-hand {
top: 0%;
left: 75%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-feet {
top: 85%;
left: 60%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left:-23%;
background: white;
width: 150%;
height: 100%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: var(--penguin-beak, orange);
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: var(--penguin-beak, orange);
width: 16%;
height: 10%;
border-radius: 50%;
}
body {
background:#c6faf1;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,105 +0,0 @@
---
id: bad87fee1348bd9aedf08719
title: Use Abbreviated Hex Code
challengeType: 0
videoUrl: ''
localeTitle: Use o código hexadecimal abreviado
---
## Description
<section id="description"> Muitas pessoas se sentem oprimidas pelas possibilidades de mais de 16 milhões de cores. E é difícil lembrar o código hexadecimal. Felizmente, você pode encurtá-lo. Por exemplo, o código hexadecimal vermelho <code>#FF0000</code> pode ser encurtado para <code>#F00</code> . Essa forma abreviada fornece um dígito para vermelho, um dígito para verde e um dígito para azul. Isso reduz o número total de cores possíveis para cerca de 4.000. Mas os navegadores interpretarão <code>#FF0000</code> e <code>#F00</code> exatamente como a mesma cor. </section>
## Instructions
<section id="instructions"> Vá em frente, tente usar os códigos hexadecimais abreviados para colorir os elementos corretos. <table class="table table-striped"><tbody><tr><th> Cor </th><th> Código hexadecimal curto </th></tr><tr><td> Ciano </td><td> <code>#0FF</code> </td> </tr><tr><td> Verde </td><td> <code>#0F0</code> </td> </tr><tr><td> Vermelho </td><td> <code>#F00</code> </td> </tr><tr><td> Fúcsia </td><td> <code>#F0F</code> </td> </tr></tbody></table></section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê seu elemento <code>h1</code> com o texto <code>I am red!</code> a <code>color</code> vermelha.
testString: 'assert($(".red-text").css("color") === "rgb(255, 0, 0)", "Give your <code>h1</code> element with the text <code>I am red!</code> the <code>color</code> red.");'
- text: 'Use o <code>hex code</code> abreviado para a cor vermelha em vez do código hexadecimal <code>#FF0000</code> .'
testString: 'assert(code.match(/\.red-text\s*?{\s*?color:\s*?#F00\s*?;\s*?}/gi), "Use the abbreviate <code>hex code</code> for the color red instead of the hex code <code>#FF0000</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto que <code>I am green!</code> a <code>color</code> verde.
testString: 'assert($(".green-text").css("color") === "rgb(0, 255, 0)", "Give your <code>h1</code> element with the text <code>I am green!</code> the <code>color</code> green.");'
- text: 'Use o <code>hex code</code> abreviado para a cor verde em vez do código hexadecimal <code>#00FF00</code> .'
testString: 'assert(code.match(/\.green-text\s*?{\s*?color:\s*?#0F0\s*?;\s*?}/gi), "Use the abbreviated <code>hex code</code> for the color green instead of the hex code <code>#00FF00</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto que <code>I am cyan!</code> a <code>color</code> ciano.
testString: 'assert($(".cyan-text").css("color") === "rgb(0, 255, 255)", "Give your <code>h1</code> element with the text <code>I am cyan!</code> the <code>color</code> cyan.");'
- text: 'Use o <code>hex code</code> abreviado para o ciano da cor em vez do código hexadecimal <code>#00FFFF</code> .'
testString: 'assert(code.match(/\.cyan-text\s*?{\s*?color:\s*?#0FF\s*?;\s*?}/gi), "Use the abbreviated <code>hex code</code> for the color cyan instead of the hex code <code>#00FFFF</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto que <code>I am fuchsia!</code> a <code>color</code> fúcsia.
testString: 'assert($(".fuchsia-text").css("color") === "rgb(255, 0, 255)", "Give your <code>h1</code> element with the text <code>I am fuchsia!</code> the <code>color</code> fuchsia.");'
- text: 'Use o <code>hex code</code> abreviado para a cor fúcsia em vez do código hexadecimal <code>#FF00FF</code> .'
testString: 'assert(code.match(/\.fuchsia-text\s*?{\s*?color:\s*?#F0F\s*?;\s*?}/gi), "Use the abbreviated <code>hex code</code> for the color fuchsia instead of the hex code <code>#FF00FF</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: #000000;
}
.fuchsia-text {
color: #000000;
}
.cyan-text {
color: #000000;
}
.green-text {
color: #000000;
}
</style>
<h1 class="red-text">I am red!</h1>
<h1 class="fuchsia-text">I am fuchsia!</h1>
<h1 class="cyan-text">I am cyan!</h1>
<h1 class="green-text">I am green!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```html
<style>
.red-text {
color: #F00;
}
.fuchsia-text {
color: #F0F;
}
.cyan-text {
color: #0FF;
}
.green-text {
color: #0F0;
}
</style>
<h1 class="red-text">I am red!</h1>
<h1 class="fuchsia-text">I am fuchsia!</h1>
<h1 class="cyan-text">I am cyan!</h1>
<h1 class="green-text">I am green!</h1>
```
</section>

View File

@ -1,181 +0,0 @@
---
id: bad87dee1348bd9aede07836
title: Use an id Attribute to Style an Element
challengeType: 0
videoUrl: ''
localeTitle: Use um atributo id para estilizar um elemento
---
## Description
<section id="description"> Uma coisa legal sobre os atributos <code>id</code> é que, como nas classes, você pode estilizá-los usando CSS. No entanto, um <code>id</code> não é reutilizável e deve ser aplicado apenas a um elemento. Um <code>id</code> também tem uma maior especificidade (importância) do que uma classe, portanto, se ambos forem aplicados ao mesmo elemento e tiverem estilos conflitantes, os estilos do <code>id</code> serão aplicados. Aqui está um exemplo de como você pode pegar seu elemento com o atributo <code>id</code> de <code>cat-photo-element</code> e dar a ele a cor de fundo verde. Em seu elemento de <code>style</code> : <blockquote> # cat-photo-element { <br> cor de fundo: verde; <br> } </blockquote> Note que dentro do seu elemento de <code>style</code> , você sempre faz referência a classes colocando um <code>.</code> na frente de seus nomes. Você sempre faz referência a ids colocando um <code>#</code> na frente de seus nomes. </section>
## Instructions
<section id="instructions"> Tente dar o seu formulário, que agora tem o atributo <code>id</code> de <code>cat-photo-form</code> , um fundo verde. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê ao seu elemento <code>form</code> o id de <code>cat-photo-form</code> .
testString: 'assert($("form").attr("id") === "cat-photo-form", "Give your <code>form</code> element the id of <code>cat-photo-form</code>.");'
- text: Seu elemento de <code>form</code> deve ter a <code>background-color</code> de fundo verde.
testString: 'assert($("#cat-photo-form").css("background-color") === "rgb(0, 128, 0)", "Your <code>form</code> element should have the <code>background-color</code> of green.");'
- text: Certifique-se de que seu elemento <code>form</code> tenha um atributo <code>id</code> .
testString: 'assert(code.match(/<form.*cat-photo-form.*>/gi) && code.match(/<form.*cat-photo-form.*>/gi).length > 0, "Make sure your <code>form</code> element has an <code>id</code> attribute.");'
- text: Não forneça ao seu <code>form</code> nenhum atributo de <code>class</code> ou <code>style</code> .
testString: 'assert(!code.match(/<form.*style.*>/gi) && !code.match(/<form.*class.*>/gi), "Do not give your <code>form</code> any <code>class</code> or <code>style</code> attributes.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
.silver-background {
background-color: silver;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div class="silver-background">
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo" id="cat-photo-form">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
.silver-background {
background-color: silver;
}
#cat-photo-form{
background-color: green;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div class="silver-background">
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo" id="cat-photo-form">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</section>

View File

@ -1,115 +0,0 @@
---
id: 58c383d33e2e3259241f3076
title: Use Attribute Selectors to Style Elements
challengeType: 0
videoUrl: ''
localeTitle: Use Seletores de Atributo para Elementos de Estilo
---
## Description
<section id="description"> Você tem dado atributos de <code>id</code> ou <code>class</code> aos elementos que você deseja estilizar especificamente. Eles são conhecidos como seletores de ID e classe. Existem outros Seletores de CSS que você pode usar para selecionar grupos personalizados de elementos para estilizar. Vamos trazer o CatPhotoApp novamente para praticar o uso de CSS Selectors. Para este desafio, você usará o seletor de atributo <code>[attr=value]</code> para estilizar as caixas de seleção no CatPhotoApp. Esse seletor corresponde e estiliza elementos com um valor de atributo específico. Por exemplo, o código abaixo altera as margens de todos os elementos com o <code>type</code> atributo e um valor correspondente de <code>radio</code> : <blockquote> [type = &#39;radio&#39;] { <br> margem: 20px 0px 20px 0px; <br> } </blockquote></section>
## Instructions
<section id="instructions"> Usando o seletor de atributo <code>type</code> , tente dar às caixas de seleção em CatPhotoApp uma margem superior de 10px e uma margem inferior de 15px. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: O seletor de atributo <code>type</code> deve ser usado para selecionar as caixas de seleção.
testString: assert(code.match(/<style>[\s\S]*?\[type=("|")checkbox\1\]\s*?{[\s\S]*?}[\s\S]*?<\/style>/gi));
- text: As margens superiores das caixas de seleção devem ser 10px.
testString: assert((function() {var count=0; $("[type=\"checkbox\"]").each(function() { if($(this).css("marginTop") === "10px") {count++;}});return (count===3)}()));
- text: As margens inferiores das caixas de seleção devem ser 15px.
testString: assert((function() {var count=0; $("[type=\"checkbox\"]").each(function() { if($(this).css("marginBottom") === "15px") {count++;}});return (count===3)}()));
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, monospace;
}
p {
font-size: 16px;
font-family: monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
.silver-background {
background-color: silver;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div class="silver-background">
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo" id="cat-photo-form">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,89 +0,0 @@
---
id: bad87fee1348bd9afdf08726
title: Use Clockwise Notation to Specify the Margin of an Element
challengeType: 0
videoUrl: ''
localeTitle: Use a notação no sentido horário para especificar a margem de um elemento
---
## Description
<section id="description"> Vamos tentar de novo, mas com <code>margin</code> dessa vez. Em vez de especificar as propriedades <code>margin-top</code> , <code>margin-right</code> , <code>margin-bottom</code> e <code>margin-left</code> individualmente, você pode especificá-las todas em uma linha, assim: <code>margin: 10px 20px 10px 20px;</code> Esses quatro valores funcionam como um relógio: superior, direita, inferior, esquerda e produzirão exatamente o mesmo resultado que o uso das instruções de margem específicas do lado. </section>
## Instructions
<section id="instructions"> Use <code>Clockwise Notation</code> para dar ao elemento com a classe <code>blue-box</code> uma margem de <code>40px</code> no lado superior e esquerdo, mas apenas <code>20px</code> no lado inferior e direito. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>blue-box</code> deve dar ao topo dos elementos <code>40px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-top") === "40px", "Your <code>blue-box</code> class should give the top of elements <code>40px</code> of <code>margin</code>.");'
- text: Sua turma de <code>blue-box</code> deve dar o direito de elementos de <code>20px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-right") === "20px", "Your <code>blue-box</code> class should give the right of elements <code>20px</code> of <code>margin</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar ao fundo dos elementos 20 <code>20px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-bottom") === "20px", "Your <code>blue-box</code> class should give the bottom of elements <code>20px</code> of <code>margin</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar a esquerda dos elementos <code>40px</code> de <code>margin</code> .
testString: 'assert($(".blue-box").css("margin-left") === "40px", "Your <code>blue-box</code> class should give the left of elements <code>40px</code> of <code>margin</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}
.red-box {
background-color: crimson;
color: #fff;
margin: 20px 40px 20px 40px;
}
.blue-box {
background-color: blue;
color: #fff;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,126 +0,0 @@
---
id: bad87fee1348bd9aedf08826
title: Use Clockwise Notation to Specify the Padding of an Element
challengeType: 0
videoUrl: ''
localeTitle: Use a notação no sentido horário para especificar o preenchimento de um elemento
---
## Description
<section id="description"> Em vez de especificar as propriedades <code>padding-top</code> , <code>padding-right</code> , <code>padding-bottom</code> e <code>padding-left</code> individualmente, você pode especificá-las todas em uma linha, como: <code>padding: 10px 20px 10px 20px;</code> Esses quatro valores funcionam como um relógio: superior, direita, inferior, esquerda e produzirão exatamente o mesmo resultado que o uso das instruções de preenchimento específicas do lado. </section>
## Instructions
<section id="instructions"> Use Notação no sentido horário para dar à classe &quot;.blue-box&quot; um <code>padding</code> de <code>40px</code> no lado superior e esquerdo, mas apenas <code>20px</code> no lado inferior e direito. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Sua classe de <code>blue-box</code> deve dar ao topo dos elementos <code>40px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-top") === "40px", "Your <code>blue-box</code> class should give the top of elements <code>40px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar o direito de elementos de <code>20px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-right") === "20px", "Your <code>blue-box</code> class should give the right of elements <code>20px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar ao fundo dos elementos <code>20px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-bottom") === "20px", "Your <code>blue-box</code> class should give the bottom of elements <code>20px</code> of <code>padding</code>.");'
- text: Sua classe de <code>blue-box</code> deve dar a esquerda dos elementos <code>40px</code> de <code>padding</code> .
testString: 'assert($(".blue-box").css("padding-left") === "40px", "Your <code>blue-box</code> class should give the left of elements <code>40px</code> of <code>padding</code>.");'
- text: Você deve usar a notação no sentido horário para definir o preenchimento da classe de <code>blue-box</code> .
testString: 'assert(!/padding-top|padding-right|padding-bottom|padding-left/.test(code), "You should use the clockwise notation to set the padding of <code>blue-box</code> class.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px 40px 20px 40px;
}
.blue-box {
background-color: blue;
color: #fff;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```html
<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}
.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}
.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}
.red-box {
background-color: crimson;
color: #fff;
padding: 20px 40px 20px 40px;
}
.blue-box {
background-color: blue;
color: #fff;
padding: 40px 20px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>
<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box blue-box">padding</h5>
</div>
```
</section>

View File

@ -1,124 +0,0 @@
---
id: bad87fee1348bd9aedf08805
title: Use CSS Selectors to Style Elements
challengeType: 0
videoUrl: ''
localeTitle: Use seletores CSS para elementos de estilo
---
## Description
<section id="description"> Com o CSS, existem centenas de <code>properties</code> CSS que você pode usar para alterar a aparência de um elemento na sua página. Quando você digitou <code>&lt;h2 style=&quot;color: red;&quot;&gt;CatPhotoApp&lt;/h2&gt;</code> , você estava estilizando esse elemento <code>h2</code> individual com <code>inline CSS</code> , que significa <code>Cascading Style Sheets</code> . Essa é uma maneira de especificar o estilo de um elemento, mas há uma maneira melhor de aplicar <code>CSS</code> . Na parte superior do seu código, crie um bloco de <code>style</code> como este: <blockquote> &lt;style&gt; <br> &lt;/ style&gt; </blockquote> Dentro desse bloco de estilo, você pode criar um <code>CSS selector</code> para todos os elementos <code>h2</code> . Por exemplo, se você quisesse que todos os elementos <code>h2</code> fossem vermelhos, você adicionaria uma regra de estilo semelhante a esta: <blockquote> &lt;style&gt; <br> h2 {cor: vermelho;} <br> &lt;/ style&gt; </blockquote> Observe que é importante ter chaves de abertura e de fechamento ( <code>{</code> e <code>}</code> ) ao redor das regras de estilo de cada elemento. Você também precisa garantir que a definição de estilo do seu elemento esteja entre as tags de estilo de abertura e fechamento. Por fim, adicione um ponto-e-vírgula ao final de cada uma das regras de estilo de seu elemento. </section>
## Instructions
<section id="instructions"> Exclua o atributo style do seu elemento <code>h2</code> e, em vez disso, crie um bloco de <code>style</code> CSS. Adicione o CSS necessário para tornar todos os elementos <code>h2</code> azuis. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Remova o atributo style do seu elemento <code>h2</code>.
testString: assert(!$("h2").attr("style"));
- text: Crie um elemento <code>style</code>.
testString: assert($("style") && $("style").length >= 1);
- text: Seu elemento <code>h2</code> deveria ser azul.
testString: assert($("h2").css("color") === "rgb(0, 0, 255)");
- text: Certifique-se de que sua declaração <code> h2 </code> da folha de estilo seja válida com um ponto-e-vírgula e uma chave de fechamento.
testString: assert(code.match(/h2\s*\{\s*color\s*:.*;\s*\}/g));
- text: Verifique se todos os seus elementos <code> style </code> são válidos e têm uma tag de fechamento.
testString: assert(code.match(/<\/style>/g) && code.match(/<\/style>/g).length === (code.match(/<style((\s)*((type|media|scoped|title|disabled)="[^"]*")?(\s)*)*>/g) || []).length);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<h2 style="color: red;">CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</div>
</section>
## Solution
<section id='solution'>
```html
<style>
h2 {
color: blue;
}
</style>
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>
<form action="https://freecatphotoapp.com/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>
```
</section>

View File

@ -1,252 +0,0 @@
---
id: 5a9d725e424fe3d0e10cad10
title: Use CSS Variables to change several elements at once
challengeType: 0
videoUrl: ''
localeTitle: Use as variáveis CSS para alterar vários elementos de uma só vez
---
## Description
<section id="description"> <dfn>Variáveis CSS</dfn> são uma maneira poderosa de alterar várias propriedades de estilo CSS de uma só vez, alterando apenas um valor. Siga as instruções abaixo para ver como a alteração de apenas três valores pode alterar o estilo de muitos elementos. </section>
## Instructions
<section id="instructions"> Na classe <code>penguin</code> , altere o valor de <code>black</code> para <code>gray</code> , o valor de <code>gray</code> para <code>white</code> e o valor <code>yellow</code> para <code>orange</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>penguin</code> classe <code>penguin</code> deve declarar a variável <code>--penguin-skin</code> e atribuí-la a <code>gray</code> .
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-skin\s*?:\s*?gray\s*?;[\s\S]*}/gi), "<code>penguin</code> class should declare the <code>--penguin-skin</code> variable and assign it to <code>gray</code>.");'
- text: <code>penguin</code> classe <code>penguin</code> deve declarar a variável <code>--penguin-belly</code> e atribuí-la ao <code>white</code> .
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi), "<code>penguin</code> class should declare the <code>--penguin-belly</code> variable and assign it to <code>white</code>.");'
- text: <code>penguin</code> classe <code>penguin</code> deve declarar a variável <code>--penguin-beak</code> e atribuí-la a <code>orange</code> .
testString: 'assert(code.match(/.penguin\s*?{[\s\S]*--penguin-beak\s*?:\s*?orange\s*?;[\s\S]*}/gi), "<code>penguin</code> class should declare the <code>--penguin-beak</code> variable and assign it to <code>orange</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.penguin {
/* change code below */
--penguin-skin: black;
--penguin-belly: gray;
--penguin-beak: yellow;
/* change code above */
position: relative;
margin: auto;
display: block;
margin-top: 5%;
width: 300px;
height: 300px;
}
.penguin-top {
top: 10%;
left: 25%;
background: var(--penguin-skin, gray);
width: 50%;
height: 45%;
border-radius: 70% 70% 60% 60%;
}
.penguin-bottom {
top: 40%;
left: 23.5%;
background: var(--penguin-skin, gray);
width: 53%;
height: 45%;
border-radius: 70% 70% 100% 100%;
}
.right-hand {
top: 0%;
left: -5%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 120% 30%;
transform: rotate(45deg);
z-index: -1;
}
.left-hand {
top: 0%;
left: 75%;
background: var(--penguin-skin, gray);
width: 30%;
height: 60%;
border-radius: 30% 30% 30% 120%;
transform: rotate(-45deg);
z-index: -1;
}
.right-cheek {
top: 15%;
left: 35%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.left-cheek {
top: 15%;
left: 5%;
background: var(--penguin-belly, white);
width: 60%;
height: 70%;
border-radius: 70% 70% 60% 60%;
}
.belly {
top: 60%;
left: 2.5%;
background: var(--penguin-belly, white);
width: 95%;
height: 100%;
border-radius: 120% 120% 100% 100%;
}
.right-feet {
top: 85%;
left: 60%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(-80deg);
z-index: -2222;
}
.left-feet {
top: 85%;
left: 25%;
background: var(--penguin-beak, orange);
width: 15%;
height: 30%;
border-radius: 50% 50% 50% 50%;
transform: rotate(80deg);
z-index: -2222;
}
.right-eye {
top: 45%;
left: 60%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.left-eye {
top: 45%;
left: 25%;
background: black;
width: 15%;
height: 17%;
border-radius: 50%;
}
.sparkle {
top: 25%;
left: 15%;
background: white;
width: 35%;
height: 35%;
border-radius: 50%;
}
.blush-right {
top: 65%;
left: 15%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.blush-left {
top: 65%;
left: 70%;
background: pink;
width: 15%;
height: 10%;
border-radius: 50%;
}
.beak-top {
top: 60%;
left: 40%;
background: var(--penguin-beak, orange);
width: 20%;
height: 10%;
border-radius: 50%;
}
.beak-bottom {
top: 65%;
left: 42%;
background: var(--penguin-beak, orange);
width: 16%;
height: 10%;
border-radius: 50%;
}
body {
background:#c6faf1;
}
.penguin * {
position: absolute;
}
</style>
<div class="penguin">
<div class="penguin-bottom">
<div class="right-hand"></div>
<div class="left-hand"></div>
<div class="right-feet"></div>
<div class="left-feet"></div>
</div>
<div class="penguin-top">
<div class="right-cheek"></div>
<div class="left-cheek"></div>
<div class="belly"></div>
<div class="right-eye">
<div class="sparkle"></div>
</div>
<div class="left-eye">
<div class="sparkle"></div>
</div>
<div class="blush-right"></div>
<div class="blush-left"></div>
<div class="beak-top"></div>
<div class="beak-bottom"></div>
</div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,55 +0,0 @@
---
id: bad87fee1348bd9aedf08726
title: Use Hex Code for Specific Colors
challengeType: 0
videoUrl: ''
localeTitle: Use o código hexadecimal para cores específicas
---
## Description
<section id="description"> Você sabia que existem outras maneiras de representar cores no CSS? Uma dessas formas é chamada de código hexadecimal ou <code>hex code</code> . Geralmente usamos números <code>decimals</code> ou base 10, que usam os símbolos de 0 a 9 para cada dígito. <code>Hexadecimals</code> (ou <code>hex</code> ) são números de base 16. Isso significa que ele usa dezesseis símbolos distintos. Como decimais, os símbolos 0-9 representam os valores de zero a nove. Então A, B, C, D, E e F representam os valores de dez a quinze. No total, 0 a F pode representar um dígito em <code>hexadecimal</code> , dando-nos 16 valores possíveis totais. Você pode encontrar mais informações sobre <a target="_blank" href="https://en.wikipedia.org/wiki/Hexadecimal">números hexadecimais aqui</a> . Em CSS, podemos usar 6 dígitos hexadecimais para representar cores, dois para os componentes vermelho (R), verde (G) e azul (B). Por exemplo, <code>#000000</code> é preto e também é o menor valor possível. Você pode encontrar mais informações sobre o <a target="_blank" href="https://en.wikipedia.org/wiki/RGB_color_model">sistema de cores RGB aqui</a> . <blockquote> body { <br> cor: # 000000; <br> } </blockquote></section>
## Instructions
<section id="instructions"> Substitua a palavra <code>black</code> na cor de fundo do nosso <code>body</code> com a representação do <code>hex code</code> , <code>#000000</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê ao seu <code>body</code> a cor de fundo do preto.
testString: 'assert($("body").css("background-color") === "rgb(0, 0, 0)", "Give your <code>body</code> element the background-color of black.");'
- text: Use o <code>hex code</code> para a cor preta em vez da palavra <code>black</code> .
testString: 'assert(code.match(/body\s*{(([\s\S]*;\s*?)|\s*?)background.*\s*:\s*?#000(000)?((\s*})|(;[\s\S]*?}))/gi), "Use the <code>hex code</code> for the color black instead of the word <code>black</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: black;
}
</style>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,84 +0,0 @@
---
id: bad87fee1348bd9aedf08721
title: Use Hex Code to Mix Colors
challengeType: 0
videoUrl: ''
localeTitle: Use o código hexadecimal para misturar cores
---
## Description
<section id="description"> Para revisar, os códigos hexadecimais usam 6 dígitos hexadecimais para representar as cores, dois para os componentes vermelho (R), verde (G) e azul (B). Destas três cores puras (vermelho, verde e azul), podemos variar as quantidades de cada uma para criar mais de 16 milhões de outras cores! Por exemplo, laranja é vermelho puro, misturado com verde e não azul. Em código hexadecimal, isso se traduz em ser <code>#FFA500</code> . O dígito <code>0</code> é o menor número no código hexadecimal e representa uma completa ausência de cor. O dígito <code>F</code> é o número mais alto no código hexadecimal e representa o brilho máximo possível. </section>
## Instructions
<section id="instructions"> Substitua as palavras de cor em nosso elemento de <code>style</code> com seus códigos hexadecimais corretos. <table class="table table-striped"><tbody><tr><th> Cor </th><th> Código hexadecimal </th></tr><tr><td> Trapaceiro azul </td><td> <code>#1E90FF</code> </td> </tr><tr><td> Verde </td><td> <code>#00FF00</code> </td> </tr><tr><td> laranja </td><td> <code>#FFA500</code> </td> </tr><tr><td> Vermelho </td><td> <code>#FF0000</code> </td> </tr></tbody></table></section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê seu elemento <code>h1</code> com o texto <code>I am red!</code> a <code>color</code> vermelha.
testString: 'assert($(".red-text").css("color") === "rgb(255, 0, 0)", "Give your <code>h1</code> element with the text <code>I am red!</code> the <code>color</code> red.");'
- text: Use o <code>hex code</code> para a cor vermelha em vez da palavra <code>red</code> .
testString: 'assert(code.match(/\.red-text\s*?{\s*?color:\s*?#FF0000\s*?;\s*?}/gi), "Use the <code>hex code</code> for the color red instead of the word <code>red</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto que <code>I am green!</code> a <code>color</code> verde.
testString: 'assert($(".green-text").css("color") === "rgb(0, 255, 0)", "Give your <code>h1</code> element with the text <code>I am green!</code> the <code>color</code> green.");'
- text: Use o <code>hex code</code> para a cor verde em vez da palavra <code>green</code> .
testString: 'assert(code.match(/\.green-text\s*?{\s*?color:\s*?#00FF00\s*?;\s*?}/gi), "Use the <code>hex code</code> for the color green instead of the word <code>green</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto <code>I am dodger blue!</code> o <code>color</code> dodger azul.
testString: 'assert($(".dodger-blue-text").css("color") === "rgb(30, 144, 255)", "Give your <code>h1</code> element with the text <code>I am dodger blue!</code> the <code>color</code> dodger blue.");'
- text: Use o <code>hex code</code> para o cor dodger blue em vez da palavra <code>dodgerblue</code> .
testString: 'assert(code.match(/\.dodger-blue-text\s*?{\s*?color:\s*?#1E90FF\s*?;\s*?}/gi), "Use the <code>hex code</code> for the color dodger blue instead of the word <code>dodgerblue</code>.");'
- text: Dê seu elemento <code>h1</code> com o texto <code>I am orange!</code> a <code>color</code> laranja.
testString: 'assert($(".orange-text").css("color") === "rgb(255, 165, 0)", "Give your <code>h1</code> element with the text <code>I am orange!</code> the <code>color</code> orange.");'
- text: Use o <code>hex code</code> da cor laranja em vez da palavra <code>orange</code> .
testString: 'assert(code.match(/\.orange-text\s*?{\s*?color:\s*?#FFA500\s*?;\s*?}/gi), "Use the <code>hex code</code> for the color orange instead of the word <code>orange</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: black;
}
.green-text {
color: black;
}
.dodger-blue-text {
color: black;
}
.orange-text {
color: black;
}
</style>
<h1 class="red-text">I am red!</h1>
<h1 class="green-text">I am green!</h1>
<h1 class="dodger-blue-text">I am dodger blue!</h1>
<h1 class="orange-text">I am orange!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,84 +0,0 @@
---
id: bad82fee1348bd9aedf08721
title: Use RGB to Mix Colors
challengeType: 0
videoUrl: ''
localeTitle: Use RGB para misturar cores
---
## Description
<section id="description"> Assim como com o código hexadecimal, você pode misturar cores em RGB usando combinações de valores diferentes. </section>
## Instructions
<section id="instructions"> Substitua os códigos hexadecimais em nosso elemento de <code>style</code> por seus valores RGB corretos. <table class="table table-striped"><tbody><tr><th> Cor </th><th> RGB </th></tr><tr><td> Azul </td><td> <code>rgb(0, 0, 255)</code> </td> </tr><tr><td> Vermelho </td><td> <code>rgb(255, 0, 0)</code> </td> </tr><tr><td> Orquídea </td><td> <code>rgb(218, 112, 214)</code> </td> </tr><tr><td> Sienna </td><td> <code>rgb(160, 82, 45)</code> </td> </tr></tbody></table></section>
## Tests
<section id='tests'>
```yml
tests:
- text: Dê seu elemento <code>h1</code> com o texto <code>I am red!</code> a <code>color</code> vermelha.
testString: 'assert($(".red-text").css("color") === "rgb(255, 0, 0)", "Give your <code>h1</code> element with the text <code>I am red!</code> the <code>color</code> red.");'
- text: Use <code>rgb</code> para a cor vermelha.
testString: 'assert(code.match(/\.red-text\s*?{\s*?color:\s*?rgb\(\s*?255\s*?,\s*?0\s*?,\s*?0\s*?\)\s*?;\s*?}/gi), "Use <code>rgb</code> for the color red.");'
- text: Dê seu elemento <code>h1</code> com o texto <code>I am orchid!</code> a orquídea <code>color</code> .
testString: 'assert($(".orchid-text").css("color") === "rgb(218, 112, 214)", "Give your <code>h1</code> element with the text <code>I am orchid!</code> the <code>color</code> orchid.");'
- text: Use <code>rgb</code> para a orquídea colorida.
testString: 'assert(code.match(/\.orchid-text\s*?{\s*?color:\s*?rgb\(\s*?218\s*?,\s*?112\s*?,\s*?214\s*?\)\s*?;\s*?}/gi), "Use <code>rgb</code> for the color orchid.");'
- text: Dê seu elemento <code>h1</code> com o texto que <code>I am blue!</code> a <code>color</code> azul.
testString: 'assert($(".blue-text").css("color") === "rgb(0, 0, 255)", "Give your <code>h1</code> element with the text <code>I am blue!</code> the <code>color</code> blue.");'
- text: Use <code>rgb</code> para a cor azul.
testString: 'assert(code.match(/\.blue-text\s*?{\s*?color:\s*?rgb\(\s*?0\s*?,\s*?0\s*?,\s*?255\s*?\)\s*?;\s*?}/gi), "Use <code>rgb</code> for the color blue.");'
- text: Dê seu elemento <code>h1</code> com o texto <code>I am sienna!</code> a <code>color</code> sienna.
testString: 'assert($(".sienna-text").css("color") === "rgb(160, 82, 45)", "Give your <code>h1</code> element with the text <code>I am sienna!</code> the <code>color</code> sienna.");'
- text: Use <code>rgb</code> para a cor sienna.
testString: 'assert(code.match(/\.sienna-text\s*?{\s*?color:\s*?rgb\(\s*?160\s*?,\s*?82\s*?,\s*?45\s*?\)\s*?;\s*?}/gi), "Use <code>rgb</code> for the color sienna.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
.red-text {
color: #000000;
}
.orchid-text {
color: #000000;
}
.sienna-text {
color: #000000;
}
.blue-text {
color: #000000;
}
</style>
<h1 class="red-text">I am red!</h1>
<h1 class="orchid-text">I am orchid!</h1>
<h1 class="sienna-text">I am sienna!</h1>
<h1 class="blue-text">I am blue!</h1>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>

View File

@ -1,55 +0,0 @@
---
id: bad87fee1348bd9aede08718
title: Use RGB values to Color Elements
challengeType: 0
videoUrl: ''
localeTitle: Use valores RGB para elementos de cor
---
## Description
<section id="description"> Outra maneira de representar cores em CSS é usando valores <code>RGB</code> . O valor RGB para preto tem esta aparência: <code>rgb(0, 0, 0)</code> O valor RGB para branco é semelhante ao seguinte: <code>rgb(255, 255, 255)</code> Em vez de usar seis dígitos hexadecimais como você faz com o código hexadecimal, com <code>RGB</code> especifique o brilho de cada cor com um número entre 0 e 255. Se fizer as contas, os dois dígitos de uma cor são iguais a 16 vezes 16, o que nos dá 256 valores totais. Então <code>RGB</code> , que começa contando a partir de zero, tem exatamente o mesmo número de valores possíveis que o código hexadecimal. Veja um exemplo de como você alteraria o plano de fundo do corpo para laranja usando seu código RGB. <blockquote> body { <br> background-color: rgb (255, 165, 0); <br> } </blockquote></section>
## Instructions
<section id="instructions"> Vamos substituir o código hexadecimal na cor de fundo do nosso elemento <code>body</code> pelo valor RGB para black: <code>rgb(0, 0, 0)</code> </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Seu elemento <code>body</code> deve ter um fundo preto.
testString: 'assert($("body").css("background-color") === "rgb(0, 0, 0)", "Your <code>body</code> element should have a black background.");'
- text: Use <code>rgb</code> para dar ao seu <code>body</code> uma cor preta.
testString: 'assert(code.match(/rgb\s*\(\s*0\s*,\s*0\s*,\s*0\s*\)/ig), "Use <code>rgb</code> to give your <code>body</code> element a color of black.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
body {
background-color: #F00;
}
</style>
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>