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.
<!-- TODO clean up names; identify abstractions -->
<h1>Top Brace</h1>
<div style="width: 10em; height: 10em; ">
<p style="text-align: center; margin: 0">Hello</p>
<div class="brace-container">
<div class="brace top left"></div>
<div class="brace top right"></div>
</div>
<p style="text-align: center; margin: 1em">world</p>
</div>
<h1>Bottom Brace</h1>
<div style="width: 10em; height: 10em; ">
<p style="text-align: center; margin: 0">Hello</p>
<div class="brace-container">
<div class="brace bottom left"></div>
<div class="brace bottom right"></div>
</div>
<p style="text-align: center; margin: 1em">world</p>
</div>
<h2>For fun: asymmetric bottom brace</h2>
<div style="width: 10em; height: 10em; ">
<p style="text-align: center; margin: 0">Hello</p>
<div class="brace-container">
<div class="brace bottom left d"></div>
<div class="brace bottom right d"></div>
</div>
<p style="text-align: center; margin: 1em">world</p>
</div>
<h1>Left Brace</h1>
<div style="display: flex; width: 10em; justify-content: center; height: 10em">
<p style=" align-self: center;">Hello</p>
<div class="brace-container side">
<div class="brace l t"></div>
<div class="brace l b"></div>
</div>
<p style="align-self: center;">World</p>
</div>
<h1>Right Brace</h1>
<div style="display: flex; width: 10em; justify-content: center; height: 10em">
<p style=" align-self: center;">Hello</p>
<div class="brace-container side">
<div class="brace r t"></div>
<div class="brace r b"></div>
</div>
<p style="align-self: center;">World</p>
</div>
$radius: 1em;
$thickness: 0.25em;
$height: 0.5em;
body {
background-color: #39F;
color: #FF3;
}
.brace-container {
position: relative;
width: 100%;
display: flex;
}
.brace
{
border-bottom: $thickness solid;
margin: 0 10%;
width: 30%;
height: $height;
}
.brace:before,
.brace:after
{
content: "";
width: 10%;
height: (2*$height);
position: absolute;
}
.bottom.left:before
{
border-bottom: $thickness solid;
border-bottom-left-radius: $radius;
margin-left: -10%;
margin-top: -$height;
}
.bottom.left:after
{
border-top: $thickness solid;
border-top-right-radius: $radius;
margin-left: 30%;
margin-top: $height;
}
.top.left:before
{
border-top: $thickness solid;
border-top-left-radius: $radius;
margin-left: -10%;
margin-top: $height;
}
.top.left:after
{
border-bottom: $thickness solid;
border-bottom-right-radius: $radius;
margin-left: 30%;
margin-top: -$height;
}
.bottom.right:before
{
border-top: $thickness solid;
border-top-left-radius: $radius;
margin-left: -10%;
margin-top: $height;
}
.bottom.right:after
{
border-bottom: $thickness solid;
border-bottom-right-radius: $radius;
margin-left: 30%;
margin-top: -$height;
}
.top.right:before
{
border-bottom: $thickness solid;
border-bottom-left-radius: $radius;
margin-left: -10%;
margin-top: -$height;
}
.top.right:after
{
border-top: $thickness solid;
border-top-right-radius: $radius;
margin-left: 30%;
margin-top: $height;
}
// a simple twist that's difficult elswhere
.brace.left.d
{
width: 20%;
}
.left.d:after
{
margin-left: 20%;
}
.brace.right.d
{
width: 40%;
}
.brace.right.d:after
{
margin-left: 40%;
}
.brace-container.side {
width: 3*$height;
flex-direction: column;
}
.side .brace
{
border-right: $thickness solid;
border-bottom: 0;
margin: 10% 0;
height: 30%;
width: $height;
}
.side .brace:before,
.side .brace:after
{
content: "";
height: 10%;
width: (2*$height);
position: absolute;
}
.l.t:before
{
border-right: $thickness solid;
border-top-right-radius: $radius;
margin-top: -10%;
margin-left: -$height;
}
.l.t:after
{
border-left: $thickness solid;
border-bottom-left-radius: $radius;
margin-top: 30%;
margin-left: $height;
}
.l.b:before
{
border-left: $thickness solid;
border-top-left-radius: $radius;
margin-top: -10%;
margin-left: $height;
}
.l.b:after
{
border-right: $thickness solid;
border-bottom-right-radius: $radius;
margin-left:-$height;
margin-top: 30%;
}
.r.t:before
{
border-left: $thickness solid;
border-top-left-radius: $radius;
margin-top: -10%;
margin-left: $height;
}
.r.t:after
{
border-right: $thickness solid;
border-bottom-right-radius: $radius;
margin-top: 30%;
margin-left: -$height;
}
.r.b:before
{
border-right: $thickness solid;
border-top-right-radius: $radius;
margin-top: -10%;
margin-left: -$height;
}
.r.b:after
{
border-left: $thickness solid;
border-bottom-left-radius: $radius;
margin-left: $height;
margin-top: 30%;
}
//
// chrome fix
//
.brace-container.side {
width: 1.5em;
flex-direction: column;
}
.side .brace {
border-right: 0.25em solid;
border-bottom: 0;
margin: 1em 0;
height: 60%;
width: 0.5em;
}
.side .brace:before,
.side .brace:after {
content: "";
height: 10%;
width: 1em;
position: absolute;
}
.l.t:before {
border-right: 0.25em solid;
border-top-right-radius: 1em;
margin-top: -1em;
margin-left: -0.5em;
}
.l.t:after {
border-left: 0.25em solid;
border-bottom-left-radius: 1em;
margin-top: 3em;
margin-left: 0.5em;
}
.l.b:before {
border-left: 0.25em solid;
border-top-left-radius: 1em;
margin-top: -1em;
margin-left: 0.5em;
}
.l.b:after {
border-right: 0.25em solid;
border-bottom-right-radius: 1em;
margin-left: -0.5em;
margin-top: 3em;
}
.r.t:before
{
border-left: $thickness solid;
border-top-left-radius: $radius;
margin-top: -1em;
margin-left: $height;
}
.r.t:after
{
border-right: $thickness solid;
border-bottom-right-radius: $radius;
margin-top: 3em;
margin-left: -$height;
}
.r.b:before
{
border-right: $thickness solid;
border-top-right-radius: $radius;
margin-top: -1em;
margin-left: -$height;
}
.r.b:after
{
border-left: $thickness solid;
border-bottom-left-radius: $radius;
margin-left: $height;
margin-top: 3em;
}
Also see: Tab Triggers