css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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="min-width"></div>
<div class="height"></div>
<div class="device-aspect-ratio"></div>
<div class="portrait"></div>
<div class="landscape"></div>
<div class="color"></div>
<div class="color-9"></div>
<div class="monochrome"></div>
<div class="resolution-low"></div>
<div class="resolution-hi"></div>
<div class="scan"></div>
<div class="grid"></div>

<div class="all"></div>
<div class="braille"></div>
<div class="embossed"></div>
<div class="handheld"></div>
<div class="print"></div>
<div class="projection"></div>
<div class="screen"></div>
<div class="speech"></div>
<div class="tty"></div>
<div class="tv"></div>
            
          
!
            
              body { background: #444; }
div {
     background: #666;
     color: #fff;
     text-align: center;
     font:   2rem Helvetica;
     float: left;
     padding: 1rem;
     margin: 1rem;
     min-height: 3rem;
      &.min-width {
        @media ( min-width: 1200px)
        { &:before { content: "Width is more than 1200px"} }
      }
      &.height {
        @media ( min-height: 100px)
        { &:before { content: "Height is more than 100px"}}
      }
      &.portrait {
        @media (orientation: portrait)
        { &:before { content: "Portrait"}}
      }
      &.landscape {
        @media (orientation: landscape)
        { &:before { content: "Landscape"}}
      }
      &.device-aspect-ratio {
        @media ( device-aspect-ratio: 1680/1050)
          /* 32/18 or 1280/720 or 2560/1440 or 16/9 or 
          1680/1050 macbook pro  - this accepts min-max prefixes */
        { &:before { content: "Device Aspect Ratio is 1680/1050"}}
      }
      &.color {
        /* The ‘color’ media feature describes the number of bits 
        per color component of the output device. If the device
        is not a color device, the value is zero. */
        @media (min-color: 2)
        { &:before { content: "Has color"}}
      }
      &.color-9 {
        @media (min-color: 9)
        { &:before { content: "Most computers have 8 bits per color"}}
      }
      &.monochrome {
        /* The ‘monochrome’ media feature describes the number of bits
        per pixel in a monochrome frame buffer. If the device is not 
        a monochrome device, the output device value will be 0. 
        What is a monochrome device?
        https://en.wikipedia.org/wiki/Monochrome_monitor */
        @media not all and (min-monochrome: 2)
        { &:before { content: "Not monochrome"}}
      }
      &.resolution-low {
        /* The following @media rule uses Media Queries to assign 
        some special style rules to devices that use two or more 
        device pixels per CSS px unit 
        http://www.w3.org/TR/css3-values/#resolution */
        @media (min-resolution: 1dppx)
        { &:before { content: "Low-res"}}
      }
      &.resolution-hi {
        @media (min-resolution: 2dppx)
        { &:before { content: "High-res 'retina'"}}
      }
      &.scan {
        @media (scan: progresive)
        { &:before { content: "Scan"}}
      }
      &.grid {
        /* If the output device is grid-based -> e.g., a "tty" terminal, 
        or a phone display with only one fixed font - such as older flip phones */
        @media not all and (grid)
        { &:before { content: "Not grid"}}
      }
      /* all Suitable for all devices.*/
      &.all {  @media all { &:before { content: "All"}}  } 
      /* braille Intended for braille tactile feedback devices.*/
      &.braille {  @media not braille { &:before { content: "Not Braille"}}  } 
      /* embossed Intended for paged braille printers.*/
      &.embossed {  @media not embossed { &:before { content: "Not Embossed"}}  } 
      /* handheld Intended for handheld devices (typically small screen, limited bandwidth).*/
      &.handheld {  @media  not handheld { &:before { content: "Not Handheld"}}  } 
      /* print Intended for paged material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media.*/
      &.print {  @media not print { &:before { content: "Not Print"}}  } 
      /* projection Intended for projected presentations, for example projectors. Please consult the section on paged media for information about formatting issues that are specific to paged media.*/
      &.projection {  @media not projection { &:before { content: "Not Projection"}}  } 
      /* screen Intended primarily for color computer screens.*/
      &.screen {  @media screen { &:before { content: "Screen"}}  } 
      /* speech Intended for speech synthesizers. Note: CSS2 had a similar media type called 'aural' for this purpose. See the appendix on aural style sheets for details.*/
      &.speech {  @media not speech { &:before { content: "Not Speech"}}  } 
      /* tty Intended for media using a fixed-pitch character grid (such as teletypes, terminals, or portable devices with limited display capabilities). Authors should not use pixel units with the "tty" media type.*/
      &.tty {  @media not tty { &:before { content: "Not TTY"}}  }
      /* tv Intended for television-type devices (low resolution, color, limited-scrollability screens, sound available). Media type names are case-insensitive.*/
      &.tv {  @media not tv { &:before { content: "Not TV"}}  }
 }
            
          
!
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.
Loading ..................

Console