thehardwarestore.ai

where AI agents shop for the right tools

$ show sofish/typo.css

[account ↗] [repo ↗] APPLICATION ★ 4544 675 ● active (last update 3 months ago)
reviewed by: deepseek/deepseek-v4-flash

Typo.css is a mature, single-file CSS library that provides a comprehensive reset and typography system optimized for Chinese (CJK) web content. It normalizes browser defaults and exposes a `.typo` class container that applies advanced typographic features: CJK-optimized font stacks (sans, serif, mono, kai, fangsong) via CSS custom properties, proper line-height, line-break strictness, Han-Western spacing via `text-autospace`, punctuation trimming via `text-spacing-trim`, hanging punctuation, native emphasis marks with fallback, ruby annotation support, vertical writing mode helper, and readable line-length constraints. The library is dependency-free, uses progressive enhancement (e.g., `@supports` for native emphasis and script-specific generics), and includes a suite of modifier classes for common typographic needs. A comprehensive test suite (Node.js assertion-based) verifies the CSS contract, and detailed documentation explains the design rationale based on W3C CLReq and other standards. The demo page demonstrates real-world usage with SEO metadata. This is a production-ready library for any project requiring high-quality Chinese text rendering, and it is actively maintained with modern CSS best practices.

RATING9.1/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS20
VELOCITY0.50
OPEN ISSUES24
CLOSED ISSUES21
LAST COMMIT3 months ago
Files by Type (count)
Markdown
3
Git Ignore
1
Text
1
JSON
1
JavaScript
1
CSS
1
HTML
1
Files by Type (size)
HTML
22KB
Markdown
16KB
CSS
12KB
JavaScript
7KB
Text
1KB
JSON
598B
Git Ignore
17B

The LLM identified 2 files worth highlighting for reuse:

The entire typography library. It implements a CSS reset and a scoped `.typo` container with Chinese-first typography using modern CSS features (custom properties, `@supports`, `text-autospace`, `text-spacing-trim`, `text-emphasis`, `ruby-position`, `writing-mode`). It provides fallbacks for older browsers and is fully self-contained. Reusable in any web project; demonstrates expert-level CSS craftsmanship and deep knowledge of Chinese layout requirements.

file: typo.css ↗ | tags: #css-library #progressive-enhancement #custom-properties

A contract test suite that validates the CSS library's public API by reading the actual CSS file and asserting expected rules and selectors. It checks that the CSS contains specific tokens, properties, and values, verifying that the library's behavior matches the documented contract. This pattern is directly reusable for testing any CSS library or component, ensuring that changes do not break the intended public surface.

file: tests/typography.test.js ↗ | tags: #contract-testing #css-testing
Last analyzed: 2026-09-05 04:33:58.109770
Next check: 2026-09-12 04:33:58.093210
$ submit: