chore: update lang tags on code blocks

This commit is contained in:
Oliver Eyton-Williams
2020-07-13 18:58:50 +02:00
committed by Mrugesh Mohapatra
parent 120bb342e8
commit d7dc1acb4a
113 changed files with 227 additions and 216 deletions

View File

@ -90,7 +90,7 @@ tests:
## Solution
<section id='solution'>
```js
```html
<style>
.injected-text {
margin-bottom: -25px;

View File

@ -85,7 +85,7 @@ tests:
## Solution
<section id='solution'>
```js
```html
<style>
.injected-text {
margin-bottom: -25px;

View File

@ -7,6 +7,7 @@ forumTopicId: 301084
---
## Description
<section id='description'>
When using your variable as a CSS property value, you can attach a fallback value that your browser will revert to if the given variable is invalid.
<strong>Note:</strong> This fallback is not used to increase browser compatibility, and it will not work on IE browsers. Rather, it is used so that the browser has a color to display if it cannot find your variable.
@ -18,14 +19,17 @@ background: var(--penguin-skin, black);
This will set background to black if your variable wasn't set.
Note that this can be useful for debugging.
</section>
## Instructions
<section id='instructions'>
It looks like there is a problem with the variables supplied to the <code>.penguin-top</code> and <code>.penguin-bottom</code> classes. Rather than fix the typo, add a fallback value of <code>black</code> to the <code>background</code> property of the <code>.penguin-top</code> and <code>.penguin-bottom</code> classes.
</section>
## Tests
<section id='tests'>
```yml
@ -34,12 +38,12 @@ tests:
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));
- text: The fallback value of <code>black</code> should be used in <code>background</code> property of the <code>penguin-bottom</code> class.
testString: assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}/gi));
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
@ -219,7 +223,7 @@ tests:
}
body {
background:#c6faf1;
background: #c6faf1;
}
.penguin * {
@ -253,16 +257,21 @@ tests:
</div>
</section>
## Solution
<section id='solution'>
```js
var code = ".penguin-top {background: var(--pengiun-skin, black);} .penguin-bottom {background: var(--pengiun-skin, black);}"
```html
<style>
.penguin-top {
background: var(--pengiun-skin, black);
}
.penguin-bottom {
background: var(--pengiun-skin, black);
}
</style>
```
</section>

View File

@ -249,8 +249,10 @@ tests:
<section id='solution'>
```js
var code = ".penguin {--penguin-belly: white;}"
```html
<style>
.penguin {--penguin-belly: white;}
</style>
```
</section>

View File

@ -249,8 +249,8 @@ tests:
<section id='solution'>
```js
var code = ".penguin {--penguin-skin: gray;}"
```html
<style>.penguin {--penguin-skin: gray;}</style>
```
</section>

View File

@ -249,8 +249,8 @@ tests:
<section id='solution'>
```js
var code = ":root {--penguin-belly: pink;}"
```html
<style>:root {--penguin-belly: pink;}</style>
```
</section>

View File

@ -60,7 +60,7 @@ tests:
## Solution
<section id='solution'>
```js
```html
<style>
body {
background-color: black;

View File

@ -104,7 +104,7 @@ tests:
## Solution
<section id='solution'>
```js
```html
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {

View File

@ -269,8 +269,8 @@ tests:
<section id='solution'>
```js
var code = ".penguin-top {background: var(--penguin-skin);} .penguin-bottom {background: var(--penguin-skin);} .right-hand {background: var(--penguin-skin);} .left-hand {background: var(--penguin-skin);}"
```html
<style>.penguin-top {background: var(--penguin-skin);} .penguin-bottom {background: var(--penguin-skin);} .right-hand {background: var(--penguin-skin);} .left-hand {background: var(--penguin-skin);}</style>
```
</section>

View File

@ -277,8 +277,8 @@ tests:
<section id='solution'>
```js
var code = "@media (max-width: 350px) {:root {--penguin-size: 200px; --penguin-skin: black;}}"
```html
<style>@media (max-width: 350px) {:root {--penguin-size: 200px; --penguin-skin: black;}}</style>
```
</section>

View File

@ -251,8 +251,8 @@ tests:
<section id='solution'>
```js
var code = ".penguin {--penguin-skin: gray; --penguin-belly: white; --penguin-beak: orange;}"
```html
<style>.penguin {--penguin-skin: gray; --penguin-belly: white; --penguin-beak: orange;}</style>
```
</section>

View File

@ -82,7 +82,7 @@ tests:
## Solution
<section id='solution'>
```js
```html
<style>
.red-text {
color: rgb(255, 0, 0);