nercone.devaboutlinkscontactsitemap
aboutlinkssitemap82ffc6419

Nercone Design

The design system of nercone.dev: one stylesheet, one script, and a theme. Write plain HTML, and add classes only where needed.

Getting started

Load style.css, a theme, and script.js. noscript.css is loaded only when JavaScript is disabled.

<link rel="stylesheet" href="https://assets.nercone.dev/style.css">
<link rel="stylesheet" href="https://assets.nercone.dev/styles/themes/auto-stark.css">
<noscript>
    <link rel="stylesheet" href="https://assets.nercone.dev/styles/noscript.css">
</noscript>
<script src="https://assets.nercone.dev/script.js" defer></script>
Important

style.css defines the palette, but not the colors by purpose such as --color-foreground and --color-background. They come from the theme, so always load one. See Themes.

Most elements need no class. <button>, <input>, <select>, <textarea>, <table>, <details>, and <dialog> are styled as they are. Classes such as button and table give the same look to other elements.

<main>
    <div class="hero">
        <h1>Title</h1>
        <p>Subtitle</p>
    </div>
    <p>Text</p>
    <button class="button-primary" type="button">Save</button>
</main>

Files

style.css and script.js are bundles. The server joins the files below in the order of their entry files, styles/index.css and scripts/index.js. Each theme in styles/themes/ is a separate stylesheet.

PathContents
styles/color.cssPalette, brightness, opacity, JIS safety colors, and color utility classes
styles/font.cssFonts, inline elements, and font utility classes
styles/layout.cssSpacing and flex utility classes
styles/main.css<html>, <body>, <header>, <main>, headings, and lists
styles/misc.cssBorder, selection, and overflow utility classes
styles/responsive-design.csshide, show, and the small:, medium:, and large: variants
styles/components/*.cssOne file for each component
styles/themes/*.cssColors by purpose. Not part of style.css
styles/noscript.cssRules for pages without JavaScript. Not part of style.css
scripts/initializer.jswindow.nercone, which the other scripts use
scripts/theme.jsChanges the theme while the page is open
scripts/components/*.jsOne file for each component that needs a script

Principles

Pages

Colors

Palette, brightness, opacity, JIS safety colors, colors by purpose, utility classes, and swatches.

Themes

Dark, light, black, white, their UD variants, the automatic themes, and theme.js.

Typography

Font families, text elements, code, and font utility classes.

Layout

Page structure, sidebar, hero, block, layer, details, grid, and layout utility classes.

Forms

Button, text field, dropdown, slider, and segmented control.

Tables

Tables, variants, numeric cells, and horizontal scrolling.

Progress

Linear, circular, and logo progress indicators.

Data Display

Stat, gauge, chart, heatmap, stack bar, badge, description list, and binding data to elements.

Overlays

Popup and toast.

Scripts

window.nercone, features and their options, cursor, loading overlay, and page transitions.