cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              .container#app
	input(type='text', maxlength='11', placeholder='Enter Text', v-model='message')
	ul
		each val in ['{{firstMessage}}','{{secondMessage}}','{{thirdMessage}}','{{fourthMessage}}','{{fifthMessage}}','{{sixthMessage}}','{{seventhMessage}}',]
			li.rainbow= val

            
          
!
            
              //variables
$yellow: #FFF168;
$blue: #2284C0;
$orange: #FF6531;
$green: #00BB58;
$gold: #F8B240;
$red: #EB2526;
$lightBlue: #AEEAF4;
//list of albumColors
$albumColors: ($yellow, $blue, $orange, $green, $gold, $red, $lightBlue);

@import url('https://fonts.googleapis.com/css?family=Libre+Franklin:400,500,600');

body {
	font-family: 'Libre Franklin', sans-serif;
	background-color: #111;
	//background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1362379/inRainbowsBackground.jpg');
}

//layout
.container {
	width: 350px;
	margin: 50px auto;
	@media screen and (min-width: 768px) {
		width: 615px;
	}
}

//text styles

ul {
	padding: 0 0 0 10px;
}

ul, li, .rainbow {
	list-style: none;
	font-weight: 500;
	color: white;
	letter-spacing: 10px;
	text-transform: uppercase;
	font-size: 28px;
	@media screen and (min-width: 768px) {
		font-size: 54px;
	}
}
//Add corresponding text color to each li:nth-child

@for $i from 1 through length($albumColors) {
	li:nth-child(#{length($albumColors)}n + #{$i}) {
		color: nth($albumColors, $i);
	}
}

//input styles
input[type="text"] {
	display: block;
	margin: auto;
	width: 150px;
	height: 10px;
	padding: 15px;
	background: transparent;
	border: 1px solid white;
	outline: none;
	color: white;
	font-size: 18px;
	&::placeholder {
		color: #ECECEC;
		opacity: .8;
	}
	@media screen and (min-width: 768px) {
		width: 250px;
		height: 20px;
	}
}

            
          
!
            
              new Vue({
	el: "#app",
	data: {
		message: "",
		underscore: "_",
		slash: "/"
	},
	methods: {
		randomNumber() {
			return Math.floor(Math.random() * (11 - 1 + 1)) + 1;
		},
		addCharacter(random, character) {
			return (
				this.message.slice(0, random) + character + this.message.slice(random, 11)
			);
		}
	},
	computed: {
		firstMessage() {
			return this.addCharacter(this.randomNumber(), this.slash);
		},
		secondMessage() {
			return this.addCharacter(this.randomNumber(), this.slash);
		},
		thirdMessage() {
			return this.addCharacter(this.randomNumber(), this.slash);
		},
		fourthMessage() {
			return this.addCharacter(this.randomNumber(), this.slash);
		},
		fifthMessage() {
			return this.addCharacter(this.randomNumber(), this.slash);
		},
		sixthMessage() {
			return this.addCharacter(this.randomNumber(), this.underscore);
		},
		seventhMessage() {
			return this.addCharacter(this.randomNumber(), this.underscore);
		}
	}
});

            
          
!
999px
Loading ..................

Console