Skip to content
Luna UI
Luna UI
frame webcore y2k

readme.txt

Completely automated public test to tell computers and humans apart.

Put anything in this window: text, a form, a guestbook or an iframe. It scrolls when it overflows.

Best viewed at 800 × 600.

HTML
<section class="tv-webcore-window">
  <header class="tv-webcore-window-bar">
    <h3 class="tv-webcore-window-title">readme.txt</h3>
    <span class="tv-webcore-window-controls" aria-hidden="true">
      <span class="tv-webcore-window-min"></span>
      <span class="tv-webcore-window-max"></span>
      <span class="tv-webcore-window-close"></span>
    </span>
  </header>
  <div class="tv-webcore-window-body" tabindex="0">
    <p>Completely automated public test to tell computers and humans apart.</p>
    <p>Put anything in this window: text, a form, a guestbook or an iframe. It scrolls when it overflows.</p>
    <p>Best viewed at 800 × 600.</p>
  </div>
</section>
CSS
/* A pastel retro OS window: dotted frame, title bar controls and a scrolling white page. */
.tv-webcore-window {
  --tv-webcore-window-face: var(--tv-webcore-pink, #f7b5e4);
  box-sizing: border-box;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0 6px 6px;
  border: 1px solid var(--tv-webcore-navy, #2c2b9f);
  background-color: var(--tv-webcore-window-face, #f7b5e4);
  background-image: radial-gradient(color-mix(in srgb, var(--tv-webcore-paper, #ffffff) 75%, transparent) 1px, transparent 1.3px);
  background-size: 4px 4px;
  color: var(--tv-webcore-navy, #2c2b9f);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--tv-webcore-navy, #2c2b9f) 25%, transparent);
}

.tv-webcore-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

/* A solid chip keeps the title clear of the dotted frame. */
.tv-webcore-window-title {
  min-width: 0;
  margin: 0;
  padding: 1px 6px;
  overflow: hidden;
  background: var(--tv-webcore-window-face, #f7b5e4);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tv-webcore-window-controls {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

.tv-webcore-window-controls > span {
  position: relative;
  box-sizing: border-box;
  width: 22px;
  height: 18px;
  border: 1px solid var(--tv-webcore-navy, #2c2b9f);
  background: var(--tv-webcore-paper, #ffffff);
}

.tv-webcore-window-min::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 3px;
  left: 5px;
  height: 2px;
  background: var(--tv-webcore-navy, #2c2b9f);
}

.tv-webcore-window-max::after {
  content: "";
  position: absolute;
  inset: 3px 5px;
  border: 1px solid var(--tv-webcore-navy, #2c2b9f);
  border-top-width: 3px;
}

/* Close: a wide navy key with a white cross. */
.tv-webcore-window-controls > .tv-webcore-window-close {
  width: 34px;
  background: var(--tv-webcore-navy, #2c2b9f);
}

.tv-webcore-window-close::before,
.tv-webcore-window-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: var(--tv-webcore-paper, #ffffff);
  transform: translate(-50%, -50%) rotate(45deg);
}

.tv-webcore-window-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tv-webcore-window-body {
  max-height: 11rem;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--tv-webcore-navy, #2c2b9f);
  background: var(--tv-webcore-paper, #ffffff);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* Browsers without the chunky scrollbar below still get it in the window's colours. */
@supports not selector(::-webkit-scrollbar) {
  .tv-webcore-window-body {
    scrollbar-color: var(--tv-webcore-window-face, #f7b5e4) var(--tv-webcore-paper, #ffffff);
  }
}

.tv-webcore-window-body p {
  margin: 0 0 0.8em;
}

.tv-webcore-window-body p:last-child {
  margin-bottom: 0;
}

.tv-webcore-window-body:focus-visible {
  outline: 2px dashed var(--tv-webcore-navy, #2c2b9f);
  outline-offset: -5px;
}

/* A chunky scrollbar on a dithered track, where the browser allows it. */
.tv-webcore-window-body::-webkit-scrollbar {
  width: 14px;
}

.tv-webcore-window-body::-webkit-scrollbar-track {
  border-left: 1px solid var(--tv-webcore-navy, #2c2b9f);
  background: repeating-conic-gradient(var(--tv-webcore-window-face, #f7b5e4) 0 25%, var(--tv-webcore-paper, #ffffff) 0 50%) 0 0 / 4px 4px;
}

.tv-webcore-window-body::-webkit-scrollbar-thumb {
  border: 1px solid var(--tv-webcore-navy, #2c2b9f);
  background: var(--tv-webcore-window-face, #f7b5e4);
}

.tv-webcore-window--lilac {
  --tv-webcore-window-face: var(--tv-webcore-lilac, #a49bf3);
}

.tv-webcore-window--grey {
  --tv-webcore-window-face: var(--tv-webcore-grey, #d9d9e5);
}
Markdown MIT License
Usage & credits
Use when
Y2K and webcore pages, guestbooks, about-me boxes, framed text or an embedded demo.
Avoid when
Dense app screens, or nesting windows inside windows.
Requires
The title bar controls are decorative; wire your own buttons if they should act.