Skip to content

The Open Standard for Generative UI

4.9 KB
Raw Blame
/* Devices.css v0.2.0 by Yan Zhu, MIT. Source: github.com/picturepan2/devices.css.
   Only the iPhone 14 Pro and Pixel 2 XL shells are included. */
.devices :global(.device) {
  position: relative;
  box-sizing: border-box;
}
.devices :global(.device-frame),
.devices :global(.device-screen) {
  box-sizing: border-box;
}
.devices :global(.device-iphone-14-pro) {
  height: 868px;
  width: 428px;
}
.devices :global(.device-iphone-14-pro .device-frame) {
  background: #010101;
  border: 1px solid #252525;
  border-radius: 68px;
  box-shadow:
    inset 0 0 4px 2px #898989,
    inset 0 0 0 6px #242424;
  height: 868px;
  padding: 19px;
  width: 428px;
}
.devices :global(.device-iphone-14-pro .device-screen) {
  border-radius: 49px;
  height: 830px;
  width: 390px;
}
.devices :global(.device-iphone-14-pro .device-stripe::after),
.devices :global(.device-iphone-14-pro .device-stripe::before) {
  border: solid rgba(1, 1, 1, 0.25);
  border-width: 0 7px;
  content: "";
  height: 7px;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 9;
}
.devices :global(.device-iphone-14-pro .device-stripe::after) {
  top: 85px;
}
.devices :global(.device-iphone-14-pro .device-stripe::before) {
  bottom: 85px;
}
.devices :global(.device-iphone-14-pro .device-header) {
  background: #010101;
  border-radius: 20px;
  height: 35px;
  left: 50%;
  margin-left: -60px;
  position: absolute;
  top: 29px;
  width: 120px;
}
.devices :global(.device-iphone-14-pro .device-sensors::after),
.devices :global(.device-iphone-14-pro .device-sensors::before) {
  content: "";
  position: absolute;
}
.devices :global(.device-iphone-14-pro .device-sensors::after) {
  background: #010101;
  border-radius: 17px;
  height: 33px;
  left: 50%;
  margin-left: -60px;
  top: 30px;
  width: 74px;
}
.devices :global(.device-iphone-14-pro .device-sensors::before) {
  background:
    radial-gradient(farthest-corner at 20% 20%, #6074bf 0, transparent 40%),
    radial-gradient(farthest-corner at 80% 80%, #513785 0, #24555e 20%, transparent 50%);
  border-radius: 50%;
  box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.05);
  height: 9px;
  left: 50%;
  margin-left: 36px;
  top: 42px;
  width: 9px;
}
.devices :global(.device-iphone-14-pro .device-btns) {
  background: #252525;
  border-radius: 2px;
  height: 32px;
  left: -2px;
  position: absolute;
  top: 115px;
  width: 3px;
}
.devices :global(.device-iphone-14-pro .device-btns::after),
.devices :global(.device-iphone-14-pro .device-btns::before) {
  background: #252525;
  border-radius: 2px;
  content: "";
  height: 62px;
  left: 0;
  position: absolute;
  width: 3px;
}
.devices :global(.device-iphone-14-pro .device-btns::after) {
  top: 60px;
}
.devices :global(.device-iphone-14-pro .device-btns::before) {
  top: 140px;
}
.devices :global(.device-iphone-14-pro .device-power) {
  background: #252525;
  border-radius: 2px;
  height: 100px;
  position: absolute;
  right: -2px;
  top: 200px;
  width: 3px;
}
.devices :global(.device-iphone-14-pro .device-home::after),
.devices :global(.device-iphone-14-pro .device-home::before) {
  border: solid rgba(1, 1, 1, 0.25);
  border-width: 6px 0;
  content: "";
  height: 6px;
  position: absolute;
  width: 6px;
  z-index: 9;
}
.devices :global(.device-iphone-14-pro .device-home::after) {
  right: 86px;
  top: 0;
}
.devices :global(.device-iphone-14-pro .device-home::before) {
  bottom: 0;
  left: 86px;
}
.devices :global(.device-google-pixel-2-xl) {
  height: 832px;
  width: 404px;
}
.devices :global(.device-google-pixel-2-xl .device-frame) {
  background: #121212;
  border-radius: 36px;
  box-shadow:
    inset 0 0 0 2px #cfcfcf,
    inset 0 0 0 7px #9c9c9c;
  height: 832px;
  padding: 56px 22px;
  width: 404px;
}
.devices :global(.device-google-pixel-2-xl .device-screen) {
  border-radius: 27px;
  height: 720px;
  width: 360px;
}
.devices :global(.device-google-pixel-2-xl .device-header) {
  height: 832px;
  left: 50%;
  margin-left: -150px;
  position: absolute;
  top: 0;
  width: 300px;
}
.devices :global(.device-google-pixel-2-xl .device-header::after),
.devices :global(.device-google-pixel-2-xl .device-header::before) {
  background: #333;
  border-radius: 3px;
  content: "";
  height: 6px;
  left: 50%;
  margin-left: -73px;
  margin-top: -3px;
  position: absolute;
  width: 146px;
}
.devices :global(.device-google-pixel-2-xl .device-header::after) {
  top: 24px;
}
.devices :global(.device-google-pixel-2-xl .device-header::before) {
  bottom: 28px;
}
.devices :global(.device-google-pixel-2-xl .device-sensors) {
  background: #333;
  border-radius: 7px;
  height: 14px;
  left: 54px;
  margin-top: -7px;
  position: absolute;
  top: 36px;
  width: 14px;
}
.devices :global(.device-google-pixel-2-xl .device-btns) {
  background: #cfcfcf;
  height: 102px;
  position: absolute;
  right: -3px;
  top: 306px;
  width: 3px;
}
.devices :global(.device-google-pixel-2-xl .device-power) {
  background: #cfcfcf;
  height: 58px;
  position: absolute;
  right: -3px;
  top: 194px;
  width: 3px;
}