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. 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

JavaScript

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              .wrapper
  .ext-buttons
  .case
    .glass
    .button
            
          
!

CSS

            
              $color-background: #f3f4f6
$color-cover: #a7a6ab
$color-phone: #080808
$color-screen: #d9d9d9
$color-inset: #424242

=size($width, $height)
  width: percentage($width / 100)
  height: percentage($height / 100)

=position($top, $left)
  position: absolute
  top: percentage($top / 100)
  left: percentage($left / 100)

%pseudo-init
  content: ''
  display: block

body
  margin: 0
  padding: 0
  background-color: $color-background

  >.wrapper
    position: relative
    margin: auto
    width: 70vw
    height: 70vw

.case
  +size(45, 90)
  +position(5, 27.5)
  background-color: $color-phone
  border-radius: 5vw
  border: 0.3vw solid $color-cover

  &::after, &::before
    @extend %pseudo-init
    background-color: $color-inset
    box-shadow: inset 0 0 0.8vw 0 rgba(black, 0.5)

  &::after
    +size(4, 4 * 45 / 90)
    +position(5, 35)
    border-radius: 50%

  &::before
    +size(22, 1)
    +position(5.5, 44)
    border-radius: 1vw

  .glass
    +size(92, 75)
    +position(12.5, 4)
    background-color: $color-screen
    overflow: hidden

    &::after
      @extend %pseudo-init
      +size(100, 50)
      background: linear-gradient(to top, rgba(white, 0.5), rgba(white, 0))
      transform-origin: top left
      transform: skewY(-25deg)

  .button
    +size(18, 18 * 45 / 90)
    +position(89, 41)
    background-color: $color-phone
    border-radius: 50%
    border: 0.25vw solid darken($color-cover, 40%)

    &::after
      @extend %pseudo-init
      +size(130, 80)
      +position(10, -15)
      background: radial-gradient($color-phone 50%, transparent)
      border-radius: 50%
      transform: rotate(-30deg)

.ext-buttons
  +size(1, 5)
  +position(20, 26.8)
  background-color: darken($color-cover, 10%)
  border-radius: 50% 0 0 50% / 10%
  box-shadow: inset 0.1vw 0 0.2vw 0 $color-cover

  &::after, &::before
    @extend %pseudo-init
    background-color: darken($color-cover, 10%)

  &::after
    +size(100, 150)
    +position(140, 0)
    border-radius: 50% 0 0 50% / 10%
    box-shadow: inset 0.1vw 0 0.2vw 0 $color-cover

  &::before
    +size(100, 100)
    +position(0, 4600)
    border-radius: 0 50% 50% 0 / 10%
    box-shadow: inset -0.1vw 0 0.2vw 0 $color-cover

            
          
!

JS

            
              // https://www.neckersbox.eu
            
          
!
999px

Console