123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="ufo">
	<div class="lano1"></div>
	<div class="lano2"></div>
	<div class="lano3"></div>
	<div class="lano4"></div>
	<div class="mostovka"></div>
	<div class="podperaX"></div>
	<div class="podperaY"></div>
	<div class="parallelo"></div>
	<div class="paralleloPoschodie"></div>
	<div class="polgulaUp"></div>
	<div class="polgulaDown"></div>
	<table class="okna">
		<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
	</table>

</div>

            
          
!
            
              @import compass

$w: 520px
$h: 3/4 *$w

$betonColor: #666
$lanoColor: darken($betonColor, 3%)
$mostovkaColor: darken($betonColor, 8%)
$polgulaColor: darken($betonColor, 6%)

$nasobic : 1.3

$wCesta: $w * $nasobic
$hCesta: 0.05*$h * $nasobic
$wParallelo: 0.029*$w * $nasobic
$hParallelo: 0.04*$h * $nasobic

$wPolgulaDown: 0.20*$w * $nasobic
$hPolgulaDown: 0.024*$h * $nasobic
$hOkna: $hPolgulaDown

$stredTanierX: 0.15 * $w
$stredTanierY: 0.2 * $h
$wPolgula: (0.20 * $w) * $nasobic
$hPolgula: (0.03 * $h + $hOkna) * $nasobic

$stredLanaY: $stredTanierY + 0.1*$h
$stredLanaX: $stredTanierX

$wLano1: 0.008 * $w
$wLano2: $wLano1
$wLano3: $wLano2
$wLano4: $wLano3

$hLano1: 1.25 * $h
$hLano2: 0.98 * $h
$hLano3: 0.76 * $h
$hLano4: 0.64 * $h

$wPodpera: 0.03*$w * $nasobic

=rotate( $val: -2deg )
	-webkit-transform: rotate($val)
	-moz-transform: rotate($val)
	-ms-transform: rotate($val)
	-o-transform: rotate($val)
	transform: rotate($val)
=transform-origin($val)
	-webkit-transform-origin: $val
	-moz-transform-origin: $val
	-ms-transform-origin: $val
	transform-origin: $val
=skew($x:0, $y:0)
	-webkit-transform: skew($x + deg, $y + deg) 
	-moz-transform   : skew($x + deg, $y + deg) 
	-o-transform     : skew($x + deg, $y + deg) 
	-ms-transform    : skew($x + deg, $y + deg) 
	transform        : skew($x + deg, $y + deg) 
=border-top-left-radius($r1, $r2)
	-webkit-border-top-left-radius: $r1 $r2
	border-top-left-radius: $r1 $r2
	background-clip: padding-box
=border-top-right-radius($r1, $r2)
	-webkit-border-top-right-radius: $r1 $r2
	border-top-right-radius: $r1 $r2
	background-clip: padding-box
=border-bottom-left-radius($r1, $r2)
	-webkit-border-bottom-left-radius: $r1 $r2
	border-bottom-left-radius: $r1 $r2
	background-clip: padding-box
=border-bottom-right-radius($r1, $r2) 
	-webkit-border-bottom-right-radius: $r1 $r2
	border-bottom-right-radius: $r1 $r2
	background-clip: padding-box

.basic
	width: 0px
	height: 0px
	overflow: hidden
	position: absolute

.ufo
	width: $w
	height: $h
	overflow: hidden
	position: absolute
	.mostovka
		@extend .basic
		width: $wCesta
		height: $hCesta
		left: 0
		top: 0.9*$h
		background: $mostovkaColor
	.podperaX
		@extend .basic
		+rotate(18deg)
		+transform-origin(top)
		width: $wPodpera
		height: $h
		right: $stredTanierX - ($wPodpera)
		top: $stredTanierY
		background: $betonColor
	.podperaY
		@extend .podperaX
		+rotate(16deg)
	.polgulaUp
		@extend .basic
		top: $stredTanierY - $hPolgula
		right: $stredTanierX - ($wPolgula / 2)
		background: $polgulaColor
		width: $wPolgula
		height: $hPolgula
		+border-top-left-radius(40*$wPolgula,10*$wPolgula)
		+border-top-right-radius(40*$wPolgula,10*$wPolgula)
	.polgulaDown
		@extend .basic
		top: $stredTanierY 
		right: $stredTanierX - ($wPolgulaDown / 2)
		background: $polgulaColor
		width: $wPolgulaDown
		height: $hPolgulaDown
		+border-bottom-left-radius(40*$wPolgula,10*$wPolgula)
		+border-bottom-right-radius(40*$wPolgula,10*$wPolgula)
	.parallelo
		@extend .basic
		+skew(18,0)
		width: $wParallelo
		height: $hParallelo 
		top: $stredTanierY - (1.5*$hPolgula)
		right: $stredTanierX  - ($wPolgula / 4)
		background: $betonColor
	.paralleloPoschodie
		@extend .basic
		width: $wParallelo
		height: $hParallelo
		top: $stredTanierY - (1.5*$hPolgula)
		right: $stredTanierX - ($wPolgulaDown / 6)
		background: $betonColor
	.okna
		background: transparent
		@extend .basic
		width: $wPolgulaDown
		height: $hOkna
		top: $stredTanierY - $hOkna
		right: $stredTanierX - ($wPolgulaDown / 2)
		border-top: 0
		margin-top: 0
		padding-top: 0
		tr
			border-top: 0
			margin-top: 0
			padding-top: 0
		td
			background: yellow
			border-top: 0
			margin-top: 0
			padding-top: 0
	.lano1
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano1
		height: $hLano1
		background: $lanoColor
		+rotate(60deg)
	.lano2
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano2
		height: $hLano2
		background: $lanoColor
		+rotate(49deg)
	.lano3
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano3
		height: $hLano3
		background: $lanoColor
		+rotate(37deg)
	.lano4
		@extend .basic
		top: $stredLanaY
		right: $stredLanaX
		+transform-origin(top)
		width: $wLano4
		height: $hLano4
		background: $lanoColor
		+rotate(-15deg)

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console