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.


                <div class="cols">
		<div id="settings">
			<div><strong>Colors :</strong> <input type="text" id="ColOne" class="color" value="#d94135"> + <input type="text" id="ColTwo" class="color" value="#FFEF00"></div>
			<div><strong>SVG :</strong> <div id="code" class="code"></div></div>
			<div><strong>CSS :</strong> <div class="code">.msduotone{ -webkit-filter: url("#msduotone"); filter: url('#msduotone'); }</div></div>
			<div><strong>IMG class :</strong> <div class="code">&lt;img class=&quot;<strong>msduotone</strong>&quot; src='...' alt=''&gt;</div></div>
	<div><img class="msduotone" src='' alt=''></div>
	<div><img class="msduotone" src='' alt=''></div>
	<div><img class="msduotone" src='' alt=''></div>	

<div id="svg"><svg xmlns=""><filter id="msduotone"><feColorMatrix type="matrix" result="grayscale" values="1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0" ></feColorMatrix><feComponentTransfer color-interpolation-filters="sRGB" result="msduotone"><feFuncR type="table" tableValues="0.7411764706 0.9882352941"></feFuncR><feFuncG type="table" tableValues="0.0431372549 0.7333333333"></feFuncG><feFuncB type="table" tableValues="0.568627451 0.05098039216"></feFuncB><feFuncA type="table" tableValues="0 1"></feFuncA></feComponentTransfer></filter></svg></div>


                * { -o-box-sizing: border-box; box-sizing: border-box;  }
body{font-family: 'Source Sans Pro', sans-serif; color:#ffffff;font-weight:400; font-size:30px; background:#212121;}

.cols{ display:flex; position:absolute; top:10px; left:10px; right:10px; bottom:10px; }
.cols>*{ margin:10px; flex:1; }
.cols>*:first-child{ background:rgba(0,0,0,0.2); border-radius:10px; width:470px; flex:none; }

#settings{ width:100%; height:100%; overflow: auto; position:relative; padding:20px; }
#settings .scroll-content>*{ margin:20px 0;}
input{font-family: 'Source Sans Pro', sans-serif; display:inline-block; text-transform:uppercase;  width:110px; text-align:center; background:none; display:inline-block; color:#ffffff; border:none; margin:0; padding:0;font-weight:400; font-size:30px; border-bottom:3px solid #ffffff; cursor:pointer; }

.code{ position:relative;  font-family: 'Source Sans Pro', sans-serif; display:block; border:1px dashed rgba(255,255,255,0.1); background:none;  vertical-align:bottom; color:#ffffff; margin:0; font-size:12px; padding:10px; }
.code strong{ color:greenyellow;}

img{ display:block; width:100%; height:100%; object-fit:cover; object-position:center;border-radius:10px; }
.msduotone{ -webkit-filter: url("#msduotone"); filter: url('#msduotone'); }

.scrollbar-track{ overflow:hidden; background:none !important; }
.scrollbar-track-y {
top: 10px !important;
right: 6px !important;
width: 4px !important;
height: calc(100% - 20px) !important;
.scrollbar-thumb{ width:4px !important; border-radius:0 !important; background:rgba(255,255,255,0.3) !important;}



var Scrollbar = window.Scrollbar;

$('.color').colorPicker({opacity:false,doRender:false,animationSpeed:0,renderCallback: function($elm, toggled) {
	CheckColors(); if(toggled==true){ $('img').removeClass('msduotone'); }else if(toggled==false){ UpdateColors(); }

function CheckColors(){
	$ColorOneHex = $('#ColOne').val();
	$ColorOneRGB = hexToRGB( $ColorOneHex );
	$ColorTwoHex = $('#ColTwo').val();
	$ColorTwoRGB = hexToRGB( $ColorTwoHex );

function UpdateColors(){
	$('feFuncR').attr('tableValues',$ColorOneRGB[0]+" "+$ColorTwoRGB[0]);
	$('feFuncG').attr('tableValues',$ColorOneRGB[1]+" "+$ColorTwoRGB[1]);
	$('feFuncB').attr('tableValues',$ColorOneRGB[2]+" "+$ColorTwoRGB[2]);
	$("#code").html( EscapeTags($("#svg").html()));
	$('img').addClass('msduotone'); //for chrome

function EscapeTags(str) { return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;') ; }

function hexToRGB(h){
	tmparray = [parseInt((cutHex(h)).substring(0,2),16)/255,parseInt((cutHex(h)).substring(2,4),16)/255,parseInt((cutHex(h)).substring(4,6),16)/255];
	return tmparray;
function cutHex(h){
	return (h.charAt(0)=="#") ? h.substring(1,7):h;