JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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 id="padding">
<div id="addToCartModal">
<div id="simplemodal-container">
<div class="modalTop">
<h1 class="left modalHeader">Added to Cart</h1>
<div class="modalTextTop">
<strong>Number of items in cart:</strong>
25
|
<strong>Subtotal: </strong> $48,564.45
<div class="clear"> </div>
</div>
<div class="product-image left"> </div>
<h2>Lisbon Sofa</h2>
<strong>Item Number:</strong> 8302 <br/>
<strong>Dimension:</strong> 88"L X 36"D X 34"H
<div class="price">
<span class="main">$979.95</span>
<strong>List Price:</strong>
<span class="strikethrough"> $1232.50
</span>
</div>
<div class="clear"> </div>
</div>
</div>
</div>
</div>
@import "compass/css3";
/** MIXINS **/
/* from style guide */
@mixin serif {
font-family: "bitter",serif;
}
@mixin sans {
font-family: "PT Sans",sans-serif;
}
@mixin icon {
font-family: "icomoon";
}
@font-face {
font-family: 'icomoon';
src:url('http://ftsblueprint.com/fonts/fonts/icomoon.eot');
src:url('http://ftsblueprint.com/fonts/fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('http://ftsblueprint.com/fonts/fonts/icomoon.woff') format('woff'),
url('http://ftsblueprint.com/fonts/fonts/icomoon.ttf') format('truetype'),
url('http://ftsblueprint.com/fonts/fonts/icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
/** END MIXINS **/
#simplemodal-overlay {
background-color:#000;
}
#simplemodal-container {
background-color:#f9fafc;
padding:20px;
width: 690px;
@include box-shadow(
0 0 40px 0px #888);
}
#addToCartModal .modalHeader {
margin-top: 0;
margin-right: 40px;
}
#addToCartModal .modalTop {
margin-bottom: 50px;
}
#addToCartModal .modalTextTop {
@include sans;
padding-top: 17px;
color: #414242;
}
#padding {
width: 800px;
margin: 0 auto;
}
/* already existing styles */
.product-image {
width: 270px;
height: 170px;
border: 1px solid #ddd;
border-bottom: 3px solid #ddd;
background-color: #efefef;
}
.product-image.left {
margin-right: 20px;
}
.left { float: left; }
.clear { clear: both; }
/* Use the following CSS code if you want to use data attributes for inserting your icons */
[data-icon]:before {
font-family: 'icomoon';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
$primary: #0370b1;
$primaryShadow: #015183;
$accent: #feb717;
$accentShadow: #d47900;
$money: #98C06D;
$darkGray: #414242;
$midGray: #acacac;
$midGray2: #7b7b79;
$lightGray: #ebebeb;
.color1 {
background: $primary;
}
.color2 {
background: $primaryShadow;
}
.color3 {
background: $accent;
}
.color4 {
background: $accentShadow;
}
.color5 {
background: $lightGray;
}
.color6 {
background: $midGray;
}
.color7 {
background: $darkGray;
}
.color8 {
background: $money;
}
h1 {
@include serif;
color: $darkGray;
font-size: 30px;
font-weight: 700;
}
h2 {
@include serif;
color: $primary;
font-size: 18px;
font-weight: 400;
}
h3 {
@include sans;
color: $midGray;
font-size: 18px;
font-weight: 400;
}
h4 {
@include serif;
color: $darkGray;
font-size: 14px;
font-weight: 700;
}
h5 {
@include sans;
color: $darkGray;
font-size: 12px;
font-weight: 700;
}
h6{
@include sans;
color: $midGray;
font-size: 12px;
font-weight: 400;
}
p {
@include sans;
color: $darkGray;
font-size: 14px;
}
.secondary p {
@include serif;
}
a {
color: $primary;
}
small {
@include sans;
font-size: 12px;
font-weight: 700;
}
li {
@include sans;
font-size: 18px;
color: $midGray;
}
.callout {
padding: 20px;
border: 1px solid $lightGray;
@include background-image(linear-gradient(white, #F4F5FA));
}
hr {
background-color: lighten($midGray, 20%);
border: 0;
height: 1px;
margin: 40px 0;
}
.container {
margin: 0 7.14286%;
}
.header {
padding: 40px 0;
@include background-image(linear-gradient(white, #F4F5FA));
}
section {
padding: 40px 0;
}
.swatch {
@include border-radius(500px);
@include box-sizing(border-box);
padding: 66px;
position: relative;
display: inline-block;
width: 10px;
height: 10px;
margin-right: 20px;
@include box-shadow(0 3px 20px lighten($midGray,10%), 0 2px 2px $midGray);
border: 5px solid white;
text-indent: -9999px;
&:hover{
text-indent: -30px;
}
}
input[type="text"], textarea, input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], input[type="date"], input[type="datetime"], input[type="month"], input[type="week"], input[type="datetime-local"], input[type="color"] {
@include sans;
display: block;
outline: 0;
font-weight: 400;
@include box-sizing(border-box);
padding: 8px 16px;
font-size: 14px;
line-height: 1.6;
@include border-radius(5px);
border: 1px solid $midGray;
background: white;
width: 217px;
position: relative;
}
input[type="number"] {
@include sans;
display: block;
outline: 0;
font-weight: 400;
@include box-sizing(border-box);
padding: 8px 16px;
font-size: 14px;
line-height: 1.6;
@include border-radius(5px);
border: 1px solid $midGray;
background: white;
width: 80px;
}
label {
@include sans;
font-size: 14px;
font-weight: 700;
float: left;
padding-right: 10px;
padding-top: 10px;
width: 100%;
margin-bottom: 10px;
}
label[for="file"]{
padding-top: 0px;
}
.error {
color: $accent;
}
.btnLarge {
position: relative;
display: inline-block;
padding: .6em;
color: #fff;
text-shadow: 0 1px 2px $accentShadow;
font-size: .875em;
font-weight: 500;
line-height: 1;
text-align: center;
text-decoration: none;
background-color: $accent;
border: 1px solid $accentShadow;
border-radius: 5px;
@include box-shadow(
0 2px 0px 0px $accentShadow);
@include transition(all .1s ease-in-out);
&:before, &:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
}
&:before {
height: 1px;
background: rgba(white, 0.4);
}
&:hover {
background-color: lighten($accent, 2%);
}
&:active {
top: .15em;
background-color: lighten($accent, 6%);
@include box-shadow(
none);
}
}
.btnSmall {
position: relative;
display: inline-block;
padding: 7px 15px;
color: #fff;
font-size: .750em;
font-weight: 500;
line-height: 1;
text-align: center;
text-decoration: none;
background-color: $primary;
border: 1px solid $primaryShadow;
border-radius: 5px;
@include box-shadow(
0 2px 0px 0px $primaryShadow);
@include transition(all .1s ease-in-out);
&:before, &:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
}
&:before {
height: 1px;
background: rgba(white, 0.4);
}
&:hover {
background-color: lighten($primary, 2%);
}
&:active {
top: .15em;
background-color: lighten($primary, 6%);
@include box-shadow(
none);
}
}
.btnNeutral {
position: relative;
display: inline-block;
padding: 7px 15px;
color: $darkGray;
font-size: .750em;
font-weight: 500;
line-height: 1;
text-align: center;
text-decoration: none;
@include background-image(linear-gradient(#fcfcfd,$lightGray));
border: 1px solid darken($lightGray, 20%);
border-radius: 5px;
@include box-shadow(
0 2px 0px 0px darken($lightGray, 20%));
@include transition(all .1s ease-in-out);
&:before, &:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
}
&:before {
height: 1px;
background: rgba(white, 0.4);
}
&:hover {
background-color: lighten($lightGray, 1%);
}
&:active {
top: .15em;
background-color: lighten($lightGray, 3%);
@include box-shadow(
none);
}
}
.field {
padding: 20px 0px;
}
fieldset {
margin: 40px 0;
}
.liveChat {
display: inline-block;
padding: 2px 15px 10px;
border: 2px solid white;
background: $lightGray;
color: $midGray2;
@include box-shadow(0 0 10px lighten($midGray,10%));
@include transition(all .1s ease-in-out);
&:hover{
background: darken($lightGray,5%);
}
}
.chat {
font-size: 25px;
color: $midGray2;
padding-right: 5px;
position: relative;
top: 4px;
}
.arrow {
font-size: 30px;
color: $primary;
&:hover{
color: darken($primary,10%);
}
}
.search {
font-size: 40px;
color: $midGray;
padding: 20px 0px;
}
.cart {
color:$primary;
font-size: 14px;
display: inline-block;
@include transition(all .1s ease-in-out);
}
Also see: Tab Triggers