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.
<p>By winning <a href="https://blog.codepen.io/rodeo/season-two/#week-three">week three of seasons 2</a> of the CodePen rodeo, I've won one year of PRO membership. As I already am a PRO member I don't have much need for this. But the guys at CodePen were kind enough to let me give it to another user. So I figured I'd do a little challenge of my own for you to take part in.</p>
<p>The objective is to create a nice looking colour palette that could be part of a styleguide, something like in <a href="http://dribbble.com/shots/1114017-Color-Palette" title="'Color Palette' by Bill S Kenney">this awesome Dribbble shot</a>.</p>
<ul class="palette">
<li class="swatch" title="#4cadeb"></li>
<li class="swatch" title="#7ac2f0"></li>
<li class="swatch" title="#a8d7f5"></li>
<li class="swatch" title="#eb8a4c"></li>
<li class="swatch" title="#f0a87a"></li>
<li class="swatch" title="#f5c6a8"></li>
<li class="swatch" title="#9b9b9b"></li>
<li class="swatch" title="#b5b5b5"></li>
</ul>
<p>Make it pretty, make it playful, make it awesome. You can use whatever you want; CSS, JS, jQuery, use what fits you best.</p>
<p>There are some requirements as to what must be included:</p>
<ul class="requirements">
<li class="requirement">The colours #4cadeb, #7ac2f0, #a8d7f5, #eb8a4c, #f0a87a, #f5c6a8, #9b9b9b, #b5b5b5 (shown above) must be included.</li>
<li class="requirement">For each colour, the respective RGB, HSL and HEX value must be visible.</li>
</ul>
<p>Responsive behaviour and fancy animations are entirely optional, but they might give you a little bonus.</p>
<p>Be sure to tag your entry with <b><a href="https://codepen.io/tag/pro-007">pro-007</a></b>. I will pick the winner myself, so it doesn't really matter how many views or hearts you get. You may only have <b>one entry</b> at a time. The challenge <b>ends June 28, 2013</b>.</p>
<p>If you have any questions you can contact me <a href="https://twitter.com/sachaschmid">on Twitter</a>. Good luck to all of you!</p>
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700);
@mixin keyframes ($name) {
@-webkit-keyframes $name { @content; }
@-moz-keyframes $name { @content; }
@-ms-keyframes $name { @content; }
@keyframes $name { @content; }
}
@mixin animation ($value) {
-webkit-animation: $value;
-moz-animation: $value;
-ms-animation: $value;
animation: $value;
}
@mixin animation-delay ($value) {
-webkit-animation-delay: $value;
-moz-animation-delay: $value;
-ms-animation-delay: $value;
animation-delay: $value;
}
* {
@include box-sizing(border-box);
}
%clearfix::after {
content: "";
display: table;
clear: both;
}
body {
max-width: 40em;
padding: 0 3em;
margin: 3em auto;
font: 100%/1.5 Roboto Condensed, sans-serif;
color: #333;
background-color: #fafafa;
}
p,
ul {
margin-top: 0;
margin-bottom: 1.5em;
}
a {
@include transition(color 0.25s ease-in-out, border-bottom-color 0.25s ease-in-out);
color: #4cadeb;
border-bottom: 1px solid transparent;
text-decoration: none;
&:hover,
&:focus {
color: lighten(#4cadeb, 10%);
border-bottom-color: lighten(#4cadeb, 10%);
}
}
.palette {
@extend %clearfix;
padding: 1.5em;
margin: 0 -1.5em 1.5em;
list-style: none;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 3px;
}
.swatch {
@include transition(transform 0.25s ease-in-out);
@include animation(popup 0.5s ease-in-out);
float: left;
width: 11.625%;
padding-bottom: 11.625%;
margin-right: 1%;
border-radius: 50%;
-webkit-backface-visibility: hidden;
&:last-child {
margin-right: 0;
}
&:hover {
@include transform(translateY(-10%));
}
}
.swatch:nth-child(1) {
background-color: #4cadeb;
}
.swatch:nth-child(2) {
@include animation-delay(0.1s);
background-color: lighten(#4cadeb, 10%);
}
.swatch:nth-child(3) {
@include animation-delay(0.2s);
background-color: lighten(#4cadeb, 20%);
}
.swatch:nth-child(4) {
@include animation-delay(0.3s);
background-color: adjust_hue(#4cadeb, -180deg);
}
.swatch:nth-child(5) {
@include animation-delay(0.4s);
background-color: lighten(adjust_hue(#4cadeb, -180deg), 10%);
}
.swatch:nth-child(6) {
@include animation-delay(0.5s);
background-color: lighten(adjust_hue(#4cadeb, -180deg), 20%);
}
.swatch:nth-child(7) {
@include animation-delay(0.6s);
background-color: desaturate(#4cadeb, 80%);
}
.swatch:nth-child(8) {
@include animation-delay(0.7s);
background-color: lighten(desaturate(#4cadeb, 80%), 10%);
}
.requirements {
padding: 0;
list-style: none;
}
.requirement {
@include background-image(linear-gradient(#fff, #fafafa));
@include transition(border 0.25s ease-in-out);
padding: 1em;
margin-bottom: 0.75em;
border: 1px solid #e8e8e8;
border-left-width: 5px;
border-radius: 3px;
&:hover {
border-left-width: 10px;
}
}
@include keyframes(popup) {
50% { @include transform(translateY(-10%)); }
100% { @include transform(translateY(0)); }
}
Also see: Tab Triggers