Responsive Web Design: Added hint to Create a Custom CSS Variable (#19605)
Added hint to Create a Custom CSS Variable (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/create-a-custom-css-variable)
This commit is contained in:
@ -3,8 +3,19 @@ title: Create a custom CSS Variable
|
|||||||
---
|
---
|
||||||
## Create a custom CSS Variable
|
## Create a custom CSS Variable
|
||||||
|
|
||||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/responsive-web-design/basic-css/create-a-custom-css-variable/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
|
||||||
|
|
||||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
|
||||||
|
|
||||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||||
|
We need to create a variable name ```--penguin-skin``` and give it a value of ```gray``` in the ```penguin``` class.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```css
|
||||||
|
--variable-name: value;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Solution
|
||||||
|
|
||||||
|
In the ```penguin``` class we create a variable name ```--penguin-skin``` and give it a value of ```gray```:
|
||||||
|
|
||||||
|
```css
|
||||||
|
--penguin-skin: gray;
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user