Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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='slanted'>
    <p>I was updating my portfolio and wanted to use the forward <span class='no-break'>slash ( / )</span> as a graphic element in the site's main layout. It seemed like it would be easy at first glance, but as I began digging into it actually presented a few very interesting challenges.</p>
    <p>I started by looking around for examples of non-rectangular containers that allowed text to flow naturally inside of them. I assumed it'd be possible with CSS since programs like Adobe Illustrator and Microsoft Word have been doing it for years. I found the CSS Shapes Module and that works very well for simple text content. It can even full justify the text. However it doesn’t allow content to scroll within the container so as the user scrolls down, the entire slanted container appears to move left, which wasn’t the effect I wanted. Instead I took a simpler approach and simply added a transform: skew to the container:</p>
    <img class="normal" src="" />
    <p class="normal">That was a good start, scrolling worked as expected and resizing was handled with only CSS, but the obvious problem is that now the text and images are slanted as well. I made a few attempts to solve this with CSS but eventually came up with an even simpler solution: create a new font with the reverse slant using FontForge, an open-source font editor.</p>
    <p>I'd chosen Roboto Condensed Light for the site's main content so I opened the .ttf file in FontForge, selected all the glyphs, and applied a skew of 14 degrees to compensate for the container’s slant, and saved it out as Roboto-Rev-Italic.ttf.
    <p>That worked great for text, even selecting functioned normally. For images and video, which are display:block elements I was able to simply apply the reverse slant to their transform property. Pseudoelements background give them to span the entire width of the container as well.
    <img src="" />
    <p>See it in action at <a href="" target="_blank"></a> and use the comments section to suggest other methods, I’m curious to see other way of achieving the same effect. </p>


                @import url('');

@import url('');

@font-face {
  font-family: 'Roboto Condensed Light';
  src: url('') format('truetype');

$skew-amount: -14deg;

body, html {
  font-size: 14px;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Roboto Condensed Light';
  font-variant-ligatures: none;
  background: gray;
  line-height: 1.5rem;

.no-break {
  white-space: nowrap;

.slanted {
  background: white;
  width: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) skew($skew-amount);
  text-align: justify;
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100% - 2rem);
  padding: 1rem;
  font-family: 'Roboto Condensed Light';
  .normal {
    transform: none;
    font-family: 'Roboto Condensed', sans-serif;
  img {
    width: 100%;
    transform: skew(-$skew-amount);
    position: relative;
    &:after {
      display: block;
      content: '1';
      background: red;
      position: absolute;
      top: 0;
      left: 0;
      width: 200%;
      height: 100%;