Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- 
***************************
*   Good to see you here! *
*     Enjoy the code...   *
***************************
-->

<html>
	<head>
		<meta charset="utf-8"/>
		<title>Lego Emojis</title>
		<link rel="stylesheet" href="style.css">
	</head>
	<body>
		<div class="text">
			<h1>Lego Emoji - Pure CSS</h1>
		</div>
			
		<div class="structure">
			<!-- Face With Tongue -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					    </div>
					    <div class="mouth tongue-out"></div>
					</div>
				</div>
			</div>

			<!-- Winking Face With Tongue -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow up"></div>
						        <div class="eye cute"></div>
					        </div>
					    </div>
					    <div class="mouth shadow-tongue-out"></div>
					</div>
				</div>
			</div>

			<!-- Astonished Face -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					    </div>
					    <div class="mouth open-mouth"></div>
					</div>
				</div>
			</div>

			<!-- Angry Face -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow angry"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow angry"></div>
						        <div class="eye rounded"></div>
					        </div>
					    </div>
					    <div class="mouth sad"></div>
					</div>
				</div>
			</div>

			<!-- Grinning Face -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow"></div>
						        <div class="eye rounded"></div>
					        </div>
					    </div>
					    <div class="mouth grimacing"></div>
					</div>
				</div>
			</div>

			<!-- Worried Face -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow worried"></div>
						        <div class="eye rounded"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow worried"></div>
						        <div class="eye rounded"></div>
					        </div>
					    </div>
					    <div class="mouth worried"></div>
					</div>
				</div>
			</div>

			<!-- Grinning Face With Sweat -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye cute"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow"></div>
						        <div class="eye cute"></div>
					        </div>
					    </div>
					    <div class="mouth smile-tongue"></div>
					</div>
					<div class="drop"></div>
				</div>
			</div>

			<!-- Unamused Face -->
			<div class="box">
				<div class="head">
					<div class="top-head"></div>
					<div class="face">
					    <div class="eyes">
					    	<div class="eye-left">
						    	<div class="eyebrow"></div>
						        <div class="eye side-look"></div>
					        </div>
					        <div class="eye-right">
						    	<div class="eyebrow"></div>
						        <div class="eye side-look"></div>
					        </div>
					    </div>
					    <div class="mouth sad"></div>
					</div>
				</div>
			</div>
		</div>
		<div class="text text-bottom">
			<p>Emoji collection created and designed by <a href="https://dribbble.com/shots/4844865-LEGO-Emoji" target="_blank">Justas Galaburda</a></p>
			<p>Developed by <a href="https://quevenribeiro.com.br?lego" target="_blank">Quéven Ribeiro</a></p>
		</div>
	</body>
</html>
              
            
!

CSS

              
                /*General*/
html,
body {
  width: 100%;
  padding: 0;
  margin: 0;
  position: relative;
}
body {
  background: #f7f7f5;
}
.structure * {
  position: absolute;
}
*:before, *:after {
  position: absolute;
  content: '';
}
/*Grid*/
.box {
  position: relative;
  width: 25%;
  height: 90px;
  margin: 50px 0;
  float: left;
}
/*Head*/
.head {
  width: 72px;
  height: 64px;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  border-radius: 17px;
  background-color: #ffbe2c;
  box-shadow: inset -4px 0px #ff9a00,
              inset -16px 0px #ffb01a,
              inset 4px 0px #fdeab2,
              inset 16px 0px #fed148;
  border: solid 4px #e27513;
}
.head:before {
  height: 12px;
  width: 32px;
  top: -20px;
  left: calc(50% - 20px);
  background-color: #ffbe2c;
  box-shadow: inset -4px 0px #ff9a00,
              inset -10px 0px #ffb01a,
              inset 4px 0px #fdeab2,
              inset 10px 0px #fed148;
  border: solid 4px #e27513;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.face {
  width: 72px;
  height: 64px;
}
.mouth {
  top: 40px;
  left: calc(50% - 14px);
  overflow: hidden;
  width: 20px;
}
.mouth:after {
}
.eyes {
  width: 100%;
}
.eye {
  background-color: #1b2244;
  top: 26px;
}
.eye-left {
  left: 20px;
}
.eye-right {
  right: 28px;
}
.eyebrow {
  width: 9px;
  height: 4px;
  border-radius: 5px;
  top: 14px;
  background-color: #1b2244;
}
.eye-right .eyebrow:after {
  width: 3px;
  height: 4px;
  left: 5px;
  box-shadow: 1px 4px #1b2244, 
              3px 5px #1b2244, 
              5px 6px #1b2244, 
              7px 7px #1b2244, 
              8px 8px #1b2244;
  top: -4px;
  border-radius: 5px;
}
.eye-left .eyebrow:after {
  width: 3px;
  height: 4px;
  left: 0;
  box-shadow: -1px 4px #1b2244, 
              -3px 5px #1b2244, 
              -5px 6px #1b2244, 
              -7px 7px #1b2244, 
              -8px 8px #1b2244;
  top: -4px;
  border-radius: 5px;
}

/*Mouths Types*/
/*Rever estrutura da boca única (grimacing)*/
.grimacing.mouth {
  height: 4px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 4px solid #20184E;
}
.worried.mouth {
  height: 4px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 4px solid #20184E;
  width: 26px;
  left: calc(50% - 17px);
}
.sad.mouth {
  width: 26px;
  height: 10px;
  background: #ffbe2c;
  overflow: hidden;
  border-radius: 10px / 4px;
  left: calc(50% - 13px);
  top: 42px;
}
.sad.mouth:after {
  width: 26px;
  height: 20px;
  top: 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #1b2244;
}
.tongue-out,
.shadow-tongue-out,
.smile-tongue {
  height: 16px;
  background-color: #1b2244;
  width: 30px;
  border-radius: 6px 6px 30px 30px / 6px 6px 26px 26px;
  overflow: inherit;
}
.tongue-out:before {
  width: 20px;
  height: 18px;
  background-color: #ff665c;
  left: 5px;
  top: 4px;
  border-radius: 2px 2px 10px 10px;
}
.tongue-out:after {
  width: 4px;
  height: 10px;
  background-color: #f44e4e;
  left: 13px;
  top: 6px;
  border-radius: 5px;
}
.shadow-tongue-out:before {
  width: 12px;
  height: 11px;
  background-color: #ff665c;
  left: 5px;
  top: 4px;
  border-radius: 2px 2px 10px 10px;
  border: solid 4px #f44e4e;
}
.shadow-tongue-out:after {
  width: 4px;
  height: 10px;
  background-color: #f44e4e;
  left: 13px;
  top: 5px;
  border-radius: 5px;
}
.open-mouth {
  width: 22px;
  height: 20px;
  background-color: #1c2344;
  border-radius: 10px/12px 12px 8px 8px;
  left: calc(50% - 11px);
  top: 38px;
}
.open-mouth:after,
.smile-tongue:after {
  width: 12px;
  height: 6px;
  background-color: #f44e4e;
  left: 5px;
  top: 10px;
  border-radius: 50%;
}
.smile-tongue {
  border-radius: 6px 6px 30px 30px / 6px 6px 26px 26px;
}
.smile-tongue:after {
  left: 9px;
  top: 7px;
}
/*Eyes Types*/
.eye.rounded {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.eye.side-look {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  left: 4px;
}
.eye.side-look:before {
  width: 15px;
  height: 4px;
  background-color: #1c2344;
  left: -8px;
  border-top-right-radius: 5px;
}
.eye.cute {
  height: 3px;
  width: 6px;
  background-color: transparent;
  border: 4px solid #1c2344;
  border-bottom: 4px solid transparent;
  border-radius: 50% 50% 3px 3px;
  left: -3px;
  top: 23px;
}
.eye.cute::before {
  width: 4px;
  height: 4px;
  background-color: #1b2244;
  border-radius: 50px;
  top: 2px;
  left: -4px;
} 
.eye.cute::after {
  width: 4px;
  height: 4px;
  background-color: #1b2244;
  border-radius: 50px;
  top: 2px;
  left: 6px;
}
/*Eyebrow Types*/
.worried.eyebrow {
  transform: scale(-1);
  top: 18px;
}
.eye-left .worried.eyebrow {
  left: -8px;
}
.eye-right .worried.eyebrow {
  right: -16px;
}
.angry.eyebrow {
  width: 20px;
  height: 4px;
}
.angry.eyebrow:after {
  display: none;
}
.eye-right .angry.eyebrow {
  transform: rotate(-15deg);
  right: -16px;
}
.eye-left .angry.eyebrow {
  transform: rotate(15deg);
  left: -8px;
}
.up.eyebrow {
  top: 8px;
}
/*Drop*/
.drop {
  background: #1abbc9;
  width: 13px;
  height: 14px;
  border-radius: 50%;
  right: -6px;
  top: 24px;
  box-shadow: 3px -1px 0px 1px #2bd2d6;
}
.drop:before {
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: 11px solid #1abbc9;
  z-index: 1;
}
.drop:after {
  top: -18px;
  left: 2px;
  border: 7px solid transparent;
  border-bottom: 13px solid #2bd2d6;
}
/*Text*/
.text {
  text-align: center;
  margin: 20px 0;
  color: #1b2244;
  font-family: monospace;
  padding: 0 15px;
  clear: both;
}
.text h1 {
  margin: 0;
  margin-bottom: 25px;
  font-size: 36px;
}
.text p {
  font-size: 20px;
}
.text p a {
  color: #ffb01a;
}
.text-bottom {
  margin-top: 30px;
}
@media (max-width: 730px) {
  .box {
    width: 33.333333333%;
  }
}
@media (max-width: 500px) {
  .box {
    width: 50%;
  }
}
              
            
!

JS

              
                // Nothing here
              
            
!
999px

Console