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


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


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 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.


		th Name
		th Pieces Needed
		th Sets That You Can Use


                @import url('');

body {
	font-family: 'Roboto', sans-serif;
	background: black;
	color: white;
	font-size: 14px;

table {
	border-collapse: collapse;

tr {
	&:not(:last-child) {
		border-bottom: 1px solid hsla(0, 0%, 100%, 0.2);

td, th {
	vertical-align: top;
	padding: 4px;
	&:not(:last-child) {
		border-right: 1px solid hsla(0, 0%, 100%, 0.2);
	div {
		padding: 3px 4px;
		&:hover {
			background-color: hsla(0, 0%, 100%, 0.05);
		&:not(:last-child) {
			border-bottom: 1px solid hsla(0, 0%, 100%, 0.075);


                let data;

function preload() {
	data = loadJSON('');

function makeName(key, count) {
	let name = key.split('_')
		.reduce((p, n) => `${p} ${n[0].toUpperCase() + n.slice(1)}`, '');
	if(count > 1) {
		name += (name[name.length - 1] === 's' ? 'e' : '') + 's';
	return name;

function setup() {
	// Select the implicit tbody inside of the table
	let table = select('tbody');
	// Loop over the models
	data.models.forEach(model => {
		// Set up our elements
		let tr = createElement('tr').parent(table);
		let tdName = createElement('td',;
		let tdPieces = createElement('td').parent(tr);
		let tdSets = createElement('td').parent(tr);
		// Loop over the model's key
		Object.keys(model).forEach(key => {
			// Avoid the 'name' key, this causes trouble
			if(key === 'name') {
			// Get the count for this key
			let count = model[key];
			// Check the the key is not 0
			if(!count) {
			// Make a readable version of the key
			let piece = makeName(key, count);
			// Add the data to the second column
			createDiv(`${piece}: ${count}`).parent(tdPieces);
		// Loop over the sets for each model
		data.sets.forEach(set => {
			// Check if the set can be used to create the model, automatically
			// return true if the key is 'name'
			let canUse = Object.keys(set)
					.every(key => key === 'name' || model[key] <= set[key]);
			if(canUse) {
				// Add the set to the third column