Skip to content

The Open Standard for Generative UI

1.5 KB
Raw Blame
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

table {
  border-collapse: collapse;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: transparent;
  cursor: pointer;
}

html,
body {
  margin: 0;
  height: 100%;
}

/* Default text takes the theme's Regular weight ("wght" 440 light / 420 dark,
   font-weight 400 as the fallback) and -1% tracking, like the react-ui
   typography tokens. Grayscale smoothing (Tailwind's `antialiased`,
   as shadcn uses) keeps macOS from rendering text a shade heavier. */
body {
  font-weight: var(--openui-font-weight-regular);
  font-variation-settings: var(--openui-font-variation-regular);
  letter-spacing: var(--openui-letter-spacing-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bold set by the browser (b, strong) would otherwise inherit the Regular
   "wght" axis and render at Regular. */
b,
strong {
  font-variation-settings: var(--openui-font-variation-medium);
}

/* The devtools overlay sets its own weights; keep the body's axis out of it. */
[data-openui-devtools-root] {
  font-variation-settings: normal;
}