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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


<div class="instructions">
  Add <em>Super Duper App</em> to your iPhone: tap <span class="ios-icon">􀈂</span> then 
  <div class="ios-ui">
  <span class="ios-ui__menu-caption">
    Add to Home Screen
  <span class="ios-icon  ios-ui__menu-icon">􀑍</span>





This was a test to see if we couldn't use the San Francisco font to display icons on iOS and Mac…

The fact of the matter is:
- This test works fine on macOS.
- Does not work on iOS, because the San Francisco font is not available for use by the browser.

In addition:

> [...]you may use the Apple Font solely for creating mock-ups of user interfaces to be used in software products running on Apple’s iOS, macOS or tvOS operating systems, as applicable. The foregoing right includes the right to show the Apple Font in screen shots, images, mock-ups or other depictions, digital and/or print, of such software products running solely on iOS, macOS or tvOS.[...]

So in the end, better off producing a PNG (or possibly an SVG) rather than going full HTML/CSS on this. Too bad.


This illustrates how we can use iOS' system font to render iOS icons. In this case, comes in handy to tell the user how to add a PWA to the phone's Home Screen.

This is a super basic example. Could build on it to try and imitate pixel-perfect imiations of the iOS menu. (Beware, differents UI for "Add to Home Screen" in iOS 12 ad 13.)


$font-ios: 'SF Pro Text', 'SF Pro Rounded', 'SF Pro Display', 'SF Compact Text', 'SF Compact Rounded', 'SF Compact Display';

.instructions {
  font-size: 1.5rem;

.ios-icon {
    font-family: $font-ios;
    font-size: 133.333%; // e.g. 48*1.333=64

.ios-ui {
  display: inline-block;

  font-family: $font-ios;
  font-size: 24px;
  vertical-align: middle;
  line-height: 1;
  color: #000;
  &__menu-caption {
    display: inline-block;
    vertical-align: middle;

  &__menu-icon {
    vertical-align: middle;