Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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 class="version">
  <h2>SignWriting Character Viewer v1</h2>
  <a href="https://slevinski.github.io/SignWriting_Character_Viewer/SignWriting_Character_Viewer.html"  target="_blank">
    Symbol Key names with plane 16 codepoints
    <br>Based on Private Use Area codepoints
    <br>100,000 ligatures to support ASCII, Unicode 8, and Plane 15
  </a>
</div>

<div class="version">
  <h2>SignWriting Character Viewer v2</h2>
  <a href="https://slevinski.github.io/SignWriting_Character_Viewer/SignWriting_Character_Viewer_2.html" target="_blank">
    Symbol Key names with plane 4 codepoints
    <br>No private use area and no ligatures
    <br>Proposed for Unicode 10
  </a>
</div>

<div>
  <p>Formal SignWriting</p>
  <input type="fsw" class="form-control" id="fsw" placeholder="enter Formal SignWriting" oninput="fswChange();" value="M528x518S15a07472x487S1f010490x503S26507515x483 M516x515S1e020493x485S21901485x493 S38800464x496 R518x518S2ff00482x483S15a10494x432S22a04494x464S32107482x483 S38700463x496 M571x518S32107482x483S15a37548x494S15a37522x494 M543x546S15008457x503S15000518x503S34400482x483S26a16484x519S26a02502x519 M521x518S2ff00482x483S10612495x457S22f04488x477 S38700463x496 R571x518S32107482x483S15a37548x494S15a37522x494 R534x532S14c30508x468S14c38468x468S2a204511x504S2a21c466x504 R510x537S20302494x463S2030a490x480S20340495x505S20348490x522 R526x548S30124482x477S26500512x519S10010486x518 M527x524S18741490x477S18706498x501S2e834474x492 M526x536S15a50474x465S15a31479x513S24103494x482 M541x518S2ff00482x483S15a11518x485 M571x518S32107482x483S15a37548x494S15a37522x494 M524x525S26501482x476S14c19477x496S15a01501x502 M538x529S22a14484x500S1150a463x472S20500485x518S20500504x518S20500486x486S20500504x485S22a04502x500S11502508x472 M521x518S2ff00482x483S10612495x457S22f04488x477 S38900464x493 L528x534S1ce40506x472S1ce48473x494S2b711481x467S2c604499x508 L544x516S18217519x485S1821f465x485S20500456x505S2d600487x488S20500534x505 L546x518S2ff00482x483S19a10518x469S19a18453x471S22f03508x484S22f15470x486 L554x518S2ff00482x483S1ce17527x491S26b00523x469 M571x518S32107482x483S15a37548x494S15a37522x494 M521x524S1150a491x509S11520506x476S2e50c479x479 M540x520S10011519x490S2ff00482x483S2df08518x462 M551x524S20337504x482S20331476x484S3770b488x497S37713490x498S2891f451x497S28907525x497S20326536x478S20326450x477 M529x538S2e74c472x513S14220498x462S2e700514x497S14228471x478 M518x534S1e141470x506S34600482x483S2ff00482x483 M538x568S2ff00482x483S10011517x488S22a04518x525S15d39493x542S15d51501x545 S38800464x496">
  <br>
  <input type="button" class="form-control" id="dozenhours"  onclick="cssChange();" value="CSS" />
  <input type="range" class="form-control" id="zoom" oninput="zoomChange();" value="30" min="0" max="100" />
</div>

<div id="signtext" class="signtext"></div>

            
          
!
            
                div.version {
    float: left;
    width: 50%;
    text-align: center;
    padding-bottom: 3%;
  }

  @font-face {
    font-family: "SignWriting 2010";
    src: 
      local('SignWriting 2010'),
      local('SignWriting_2010'),
      url('https://cdn.rawgit.com/Slevinski/signwriting_2010_fonts/master/fonts/SignWriting%202010.ttf') format('truetype');
  }
  @font-face {
    font-family: "SignWriting 2010 Filling";
    src: 
      local('SignWriting 2010 Filling'),
      local('SignWriting_2010_Filling'),
      url('https://cdn.rawgit.com/Slevinski/signwriting_2010_fonts/master/fonts/SignWriting%202010%20Filling.ttf') format('truetype');
  }
  svg {
    overflow: visible !important;
  }
  div.signtext {
    -webkit-writing-mode: vertical-lr;
    -moz-writing-mode: vertical-lr;
    -ms-writing-mode: tb-lr;
    writing-mode: vertical-lr;
    font-size: 0%;
    border-left: 1px solid blue;
    height: 93%;
  }
  div#signtext {
    transform-origin: top left;
    -ms-transform-origin: top left;
    -moz-transform-origin: top left;
    -webkit-transform-origin: top left;
    bottom': '0';
    right': '0';
    overflow: hidden;
    background-color: white;
  }
  span.outside {
    border-left: 1px solid blue;
    vertical-align: top;
  }

  span.middle {
    vertical-align: bottom;
  }

  span.inside {
    border-left: 1px dashed transparent;
  }

  div.sign {
    writing-mode: horizontal-tb;
    display: inline-block;
    vertical-align: middle;
    padding: 20px;
  }
  #fsw {
    width:98%;
    margin-bottom: 1%;
  }
  #zoom {
    width: 88%;
    valign: top;
    margin-bottom: 1%;
    display: inline-block;
    vertical-align: top;
  }

  #dozenhours {
    width: 7%;
    valign: top;
    display: inline-block;
    vertical-align: top;
  }

  div#signtext.midnight {
    background-color: black;
  }
  
  div#signtext.midnight div.sign svg g text.sym-line {
    fill: white !important;
  }

  div#signtext.midnight div.sign svg g text.sym-fill {
    fill: black !important;
  }

  div#signtext.midnight {
    border-left: 1px solid yellow;
  }

  div#signtext.midnight span.outside {
    border-left: 1px solid yellow;
  }

  div#signtext.midnight span.inside {
    border-left: 1px dashed white;
  }

            
          
!
            
              function zoomChange() {
  document.getElementById("zoom").scrollIntoView();
  var zoom =  (2.5*document.getElementById("zoom").value+25);
//  if (document.getElementById("signtext").style.zoom) {
//    document.getElementById("signtext").style.zoom = zoom + "%";
//  } else {
    var height = zoom*.98;
    height = (100/zoom) * 98;
    document.getElementById("signtext").style.height = height + "%";
    zoom = zoom/100;
    document.getElementById("signtext").style.transform = 'scale(' + zoom + ')';
//  }
}

function fswChange(){
  var signtext = document.getElementById("fsw").value;
  var signs = sw10.signtext(signtext).map(function(fsw) {
    var bbox = sw10.bbox(fsw).split(' ');
    var w = bbox[1]-bbox[0];
    var h = bbox[3]-bbox[2];
    var adj = 1000 - bbox[0] - bbox[1];
    adj += 2; //adjust for center dotted line
    if (fsw.indexOf('L')>-1) adj += 150;
    if (fsw.indexOf('R')>-1) adj -= 150;
    var style = 'width: ' + w + 'px;height: ' + h + 'px;'
    if (adj>0) {
      style += 'margin-right: ' + adj + 'px;'
    } else if (adj<0) {
      adj = -adj;
      style += 'border-left: ' + adj + 'px solid transparent;';
    }
    return '<div class="sign" style="' + style + '">' + sw10.svg(fsw + '-C') + '</div>';
  });
  document.getElementById("signtext").innerHTML = '<span class="outside"><span class="middle"><span class="inside">' + signs.join('') + '</span></span></span>';
}

function cssChange(){
  //document.getElementById("zoom").scrollIntoView();
  document.getElementById("signtext").classList.toggle("midnight")
}

fswChange();
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console