@codemirror/lang-css

CSS language support for the CodeMirror 6 code editor, with highlighting, indentation, and autocompletion

Library
npm
v6.3.1
18stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
25/100Needs Attention
Development Activity12
Maintenance0
Community16
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
73/100Good
Architecture78
Code Quality74
Innovation60
Learning Curve80

@codemirror/lang-css implements CSS language support for the CodeMirror code editor. It is built on the Lezer CSS parser and extends it with syntax highlighting, indentation rules, and a completion source for CSS properties, variables, and value keywords.

Beyond plain CSS, the package exposes defineCSSCompletionSource, letting related CodeMirror language modes (such as Sass and Less) reuse its completion logic by supplying their own predicate for what counts as a completable variable in their dialect.

What You Get

  • A css() extension that adds full CSS LanguageSupport to a CodeMirror editor instance
  • A cssLanguage provider built on the Lezer CSS parser with highlighting and indentation baked in
  • A cssCompletionSource for autocompleting CSS properties, variables, and value keywords
  • A reusable defineCSSCompletionSource factory that CSS-dialect packages (Sass, Less) build their own completion sources on top of

Common Use Cases

  • Adding CSS syntax highlighting and autocomplete to an in-browser code editor built on CodeMirror 6
  • Building a live CSS playground or style editor with real-time property/value suggestions
  • Powering CSS-in-JS or theme editors that need a lightweight, embeddable CSS editing surface
  • Serving as the base completion logic for other CodeMirror CSS-dialect language packages (Sass, Less)

Under The Hood

Architecture - The package is intentionally small: src/css.ts (31 lines) wires the Lezer CSS parser into a CodeMirror LRLanguage and exposes the css() LanguageSupport extension, while src/complete.ts (229 lines) implements the completion logic, including the generic defineCSSCompletionSource factory that parameterizes what counts as a completable variable so other CSS-dialect packages can reuse it. Tech Stack - TypeScript, built against @codemirror/language, @codemirror/autocomplete, @codemirror/state, and @lezer/css/@lezer/common as peer building blocks, compiled via the shared @codemirror/buildhelper tooling used across the CodeMirror 6 package family. Code Quality - tests run through the shared cm-runtests CodeMirror test runner rather than an in-repo test suite; the code is compact and narrowly scoped, which limits surface area for bugs, but the low development_activity and maintenance_consistency health signals reflect that active development has moved to the project’s own Forgejo instance rather than GitHub. API Design - the public surface is minimal and composable: a single css() call for editor consumers, plus cssLanguage and cssCompletionSource as named exports for anyone customizing behavior, following the same small-surface convention as the rest of the @codemirror/lang-* package family.

Used by 20 apps in this directory

TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
Python
54%
Other

authentik

Authentication · Security

24,980

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
68
Dependency
Built with
Python54%
TypeScript33%
Updated today
TypeScript
99%
Other

Dokploy

Devops · Hosting Control Panel · Security

36,702

Self-hosted PaaS that deploys apps and databases on your own VPS using Docker, Traefik, and multi-build-system orchestration

View details
89
Repo Health
76
Technical
65
Dependency
Built with
TypeScript99%
Updated yesterday
TypeScript
72%
Other

Epicenter

Knowledge Management · Note Taking · Developer Tools

4,761

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
68
Dependency
Built with
TypeScript72%
Svelte15%
Updated today
JavaScript
51%
MIT

Ghost

CMS · Blogging

54,795

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
69
Dependency
Built with
JavaScript51%
TypeScript43%
Updated today
Rust
69%
Other

GitButler

Developer Tools · Devops · AI Development

21,531

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Rust69%
TypeScript18%
Svelte12%
Updated today
TypeScript
89%
Apache 2.0

HyperFrames

AI Development · AI Design Tools

41,625

Turn plain HTML and CSS into deterministic, pixel-perfect MP4 videos — authored by humans or AI agents, rendered by headless Chrome and FFmpeg.

View details
82
Repo Health
83
Technical
65
Dependency
Built with
TypeScript89%
Updated today
Svelte
49%

Kener

Monitoring · Devops

5,114

Stunning, self-hosted status pages with real-time uptime monitoring, incident management, and multi-channel notifications in a single Docker container.

View details
85
Repo Health
76
Technical
68
Dependency
Built with
Svelte49%
TypeScript47%
Updated 2 weeks ago
Go
41%
AGPL 3.0

listmonk

Marketing · Blogging

22,989

High-performance, self-hosted newsletter and mailing list manager packaged as a single binary with built-in analytics, transactional messaging, and multi-channel delivery.

View details
90
Repo Health
74
Technical
68
Dependency
Built with
Go41%
Vue24%
JavaScript19%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search