* chore(learn): audit files for crowdin Audits the challenge text in the Responsive Web Design superblock to account for words/phrases that should not be translated because they refer to code. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> * fix: remove quotes from code Removes instances of quoted code blocks, or code blocked quotes. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> * fix: additional uncaught quote-codes Thanks Oliver :) Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * fix: so many quotes Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * fix: missing punctuation Noted in a Crowdin comment. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> * fix: remove more quotes Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
		
			
				
	
	
		
			90 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			90 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| id: 587d78a6367417b2b2512add
 | |
| title: Create a Graphic Using CSS
 | |
| challengeType: 0
 | |
| videoUrl: 'https://scrimba.com/c/cEDWPs6'
 | |
| forumTopicId: 301048
 | |
| dashedName: create-a-graphic-using-css
 | |
| ---
 | |
| 
 | |
| # --description--
 | |
| 
 | |
| By manipulating different selectors and properties, you can make interesting shapes. One of the easier ones to try is a crescent moon shape. For this challenge you need to work with the `box-shadow` property that sets the shadow of an element, along with the `border-radius` property that controls the roundness of the element's corners.
 | |
| 
 | |
| You will create a round, transparent object with a crisp shadow that is slightly offset to the side - the shadow is actually going to be the moon shape you see.
 | |
| 
 | |
| In order to create a round object, the `border-radius` property should be set to a value of 50%.
 | |
| 
 | |
| You may recall from an earlier challenge that the `box-shadow` property takes values for `offset-x`, `offset-y`, `blur-radius`, `spread-radius` and a color value in that order. The `blur-radius` and `spread-radius` values are optional.
 | |
| 
 | |
| # --instructions--
 | |
| 
 | |
| Manipulate the square element in the editor to create the moon shape. First, change the `background-color` to `transparent`, then set the `border-radius` property to 50% to make the circular shape. Finally, change the `box-shadow` property to set the `offset-x` to 25px, the `offset-y` to 10px, `blur-radius` to 0, `spread-radius` to 0, and color to `blue`.
 | |
| 
 | |
| # --hints--
 | |
| 
 | |
| The value of the `background-color` property should be set to `transparent`.
 | |
| 
 | |
| ```js
 | |
| assert(code.match(/background-color:\s*?transparent;/gi));
 | |
| ```
 | |
| 
 | |
| The value of the `border-radius` property should be set to `50%`.
 | |
| 
 | |
| ```js
 | |
| assert(code.match(/border-radius:\s*?50%;/gi));
 | |
| ```
 | |
| 
 | |
| The value of the `box-shadow` property should be set to 25px for `offset-x`, 10px for `offset-y`, 0 for `blur-radius`, 0 for `spread-radius`, and finally `blue` for the color.
 | |
| 
 | |
| ```js
 | |
| assert(
 | |
|   code.match(/box-shadow:\s*?25px\s+?10px\s+?0(px)?\s+?0(px)?\s+?blue\s*?;/gi)
 | |
| );
 | |
| ```
 | |
| 
 | |
| # --seed--
 | |
| 
 | |
| ## --seed-contents--
 | |
| 
 | |
| ```html
 | |
| <style>
 | |
|   .center {
 | |
|     position: absolute;
 | |
|     margin: auto;
 | |
|     top: 0;
 | |
|     right: 0;
 | |
|     bottom: 0;
 | |
|     left: 0;
 | |
|     width: 100px;
 | |
|     height: 100px;
 | |
|     background-color: blue;
 | |
|     border-radius: 0px;
 | |
|     box-shadow: 25px 10px 10px 10px green;
 | |
|   }
 | |
| 
 | |
| </style>
 | |
| <div class="center"></div>
 | |
| ```
 | |
| 
 | |
| # --solutions--
 | |
| 
 | |
| ```html
 | |
| <style>
 | |
|   .center {
 | |
|     position: absolute;
 | |
|     margin: auto;
 | |
|     top: 0;
 | |
|     right: 0;
 | |
|     bottom: 0;
 | |
|     left: 0;
 | |
|     width: 100px;
 | |
|     height: 100px;
 | |
|     background-color: transparent;
 | |
|     border-radius: 50%;
 | |
|     box-shadow: 25px 10px 0 0 blue;
 | |
|   }
 | |
| </style>
 | |
| <div class="center"></div>
 | |
| ```
 |