Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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

              
                <!-- You can change the text within #text -->
<div class="wrapper">
  <div class="container">
    <span id="text">Elegance</span>
  </div>
</div>
              
            
!

CSS

              
                @import "compass/css3";

//You can change the value of the variables below
@import url(https://fonts.googleapis.com/css?family=Monsieur+La+Doulaise);
$font-family: 'Monsieur La Doulaise';
$font-size: 150px;
$color: #141414;
$background-color: #ebeba2;

//Don't change anything from here on
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
}
body, html {
  width: 100%;
  height: 100%;
}
body {
  background-color: $background-color;
}

.wrapper {
  width: 100%;
  height: 100%;
  text-align: center;
  &:after {
    content: "";
    width: 1px;
    height: 100%;
    vertical-align: middle;
    display: inline-block;
    margin-right: -10px;
  }
  
  .container {
    vertical-align: middle;
    display: inline-block;
    white-space: normal;
    padding: 5px 5px 0px 5px;
    box-shadow: 0 0 0 1px $color, 0 0 0 5px $background-color, 0 0 0 8px $color;
  }
}
#text {
  font-family: $font-family;
  font-size: $font-size;
  color: $color; 
}
              
            
!

JS

              
                $(window).on('load', function() {
  //a equals dy and dx of the diagonal stripes. b equals dy and dx of the whitespace around the letters. c equals the distance of the text to the background circle.
  var a = 12, b = 5, c = 40;
  
  var width = $('#text').width()+a+b+2*c, height = $('#text').height()+a+b+2*c;
  var svg ='<svg width="'+width+'" height="'+height+'" version="1.1" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="pattern-stripe" width="3" height="3" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="0.2" height="4" transform="translate(0,0)" fill="white"></rect></pattern><pattern id="pattern-hor-stripe" width="3" height="3" patternUnits="userSpaceOnUse" patternTransform="rotate(90)"><rect width="0.2" height="4" transform="translate(0,0)" fill="white"></rect></pattern><mask id="mask-stripe"><rect x="0" y="0" width="100%" height="100%" fill="url(#pattern-stripe)" /></mask><mask id="mask-hor-stripe"><rect x="0" y="0" width="100%" height="100%" fill="url(#pattern-hor-stripe)" /></mask></defs><circle cx="50%" cy="50%" r="'+width/2+'" mask="url(#mask-hor-stripe)" /><g id="text">';
  
  for(var i=0; i<a; i++){
    svg += '<text mask="url(#mask-stripe)" x="'+ (i+c) +'" y="'+ (a+b+c-i) +'" dominant-baseline="text-before-edge">'+$('#text').html()+'</text>'; 
  }
  
  for(var j=0; j<b; j++){
    svg += '<text fill="'+$('body').css('background-color')+'" x="'+ (i+j+c) +'" y="'+ (b-j+c) +'" dominant-baseline="text-before-edge">'+$('#text').html()+'</text>'; 
  }
  
  svg += '<text x="'+ (a+b+c) +'" y="'+c+'" dominant-baseline="text-before-edge">'+$('#text').html()+'</text></g></svg>';

  $('#text').parent().html(svg);

});
              
            
!
999px

Console