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.

              - var density = 12 //Be sure to change $depth on line 1 in the CSS - smaller number gives better performance but worse corners
- var text = "2000" //Change to whatever, but it may not fit - change $size on line 2 in the CSS to make it fit
	for val in text
		div #{val}
			for _ in Array(density)
				div #{val}
$size: 35vmin;
body {
	display: grid;
	place-items: center;
	height: 100vh;
	background: #323133;
	font-family: "Quicksand", sans-serif;
	perspective: 60rem;
	perspective-origin: 50% 50%;
	overflow: hidden;
	#user-button {
		--user-button-background: #434A54;
	.text {
		user-select: none;
		> div {
			display: inline-block;
			position: relative;
			font-size: $size;
			transform-origin: center center;
			transform-style: preserve-3d;
			animation: float 4s infinite;
			@for $i from 1 through 4 {
				&:nth-child(#{$i}) {
					animation-delay: (-$i + 4)*-0.5s;
			> div {
				position: absolute;
				color: white;
				text-shadow:0 0 1px white; //Fill in gaps a little
				$thickness:3; //Thickness of ends
				//&:last-child, &:first-child //Just does first and last
				&:not(:nth-child(n+#{$thickness})), &:not(:nth-last-child(n+#{$thickness}))
					color: #ed5565;
					text-shadow:0 0 1px #ed5565;
				@for $i from 1 through $density {
					&:nth-child(#{$i}) {
						transform: translateZ(($i - ($density/2)) * ($size / ($density * 5)));

//Modified, original from
$pi: 3.14159265359;
$_precision: 10;

@function pow($base, $exp) {
  $value: $base;
  @if $exp > 1 {
    @for $i from 2 through $exp {
      $value: $value * $base;
  @if $exp < 1{
    @for $i from 0 through -$exp {
      $value: $value / $base;
  @return $value;

@function fact($num) {
  $fact: 1;
  @if $num > 0{
    @for $i from 1 through $num {
      $fact: $fact * $i;
  @return $fact;

@function sin($a){
  $sin: $a;
  @for $n from 1 through $_precision {
    $sin: $sin + (pow(-1, $n) / fact(2 * $n + 1) ) * pow($a, (2 * $n + 1));
  @return $sin;

@function cos($a){
  $cos: 1;
  @for $n from 1 through $_precision {
    $cos: $cos + ( pow(-1,$n) / fact(2*$n) ) * pow($a,2*$n);
  @return $cos;

@keyframes float {
	@for $i from 0 through 100 {
		#{$i*1%} {
			transform: rotate3d(sin($i*$pi/50), cos($i*$pi/50), 0, 30deg);
🕑 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.