styles

tcmts.examples.notes.styles · #7zypb5ww · css file

/* The notes page's look: monospace, one accent. Everything is under .notes, the app's root element. */
.notes { display: flex; min-height: 100vh; margin: -8px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #222; }
.notes aside { width: 300px; border-right: 1px solid #ddd; padding: 16px; box-sizing: border-box; }
.notes main { flex: 1; padding: 16px 32px; max-width: 900px; }
/* the next note is on its way: dimmed only if it takes a moment, so a quick one doesn't flicker */
.notes main.navigating { opacity: .6; transition: opacity .15s .2s; }
.notes header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes h1 { font-size: 18px; margin: 0; }
.notes button { font: inherit; background: none; border: 1px solid #222; padding: 2px 10px; cursor: pointer; }
.notes button:disabled { opacity: .5; }
.notes input, .notes textarea { font: inherit; border: 1px solid #ccc; padding: 6px; width: 100%; box-sizing: border-box; }
.notes .search { margin: 12px 0; }
.notes .list { list-style: none; padding: 0; margin: 0; }
.notes .entry { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eee; padding: 8px 4px; }
.notes .entry.selected { background: #f0f4ff; }
.notes .entry small { float: right; color: #888; }
.notes .entry span { display: block; color: #666; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notes .none { color: #888; }
.notes article small { color: #888; }
.notes .markdown pre { background: #f6f6f6; padding: 8px; }
.notes .editor { display: flex; gap: 24px; }
.notes .editor > * { flex: 1; }
.notes .fields { display: flex; flex-direction: column; gap: 8px; }
.notes textarea { min-height: 300px; }
.notes .actions { display: flex; gap: 8px; }
.notes .preview { border-left: 1px solid #eee; padding-left: 24px; }
/* <ViewTransition> cross-fades between notes, unless motion is turned down */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

used by