Configs2026年5月18日·1 分钟阅读

Pure.css — Lightweight Responsive CSS Framework

A set of small, responsive CSS modules that provide clean defaults for layouts, grids, forms, buttons, tables, and menus with a total weight under 4KB gzipped.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Pure.css
通用 CLI 安装命令
npx tokrepo install fee27287-524e-11f1-9bc6-00163e2b0d79

Introduction

Pure.css is a minimal set of responsive CSS modules created by Yahoo. At under 4KB gzipped for the complete framework, it provides clean default styling for grids, forms, buttons, tables, and menus without JavaScript dependencies or opinionated design patterns.

What Pure.css Does

  • Provides a 24-column responsive grid system using flexbox with mobile-first breakpoints
  • Styles HTML forms with consistent cross-browser appearance and stacked or inline layouts
  • Offers button classes with primary, disabled, and active states
  • Normalizes table rendering with bordered, striped, and horizontal variations
  • Includes dropdown and horizontal menu components with pure CSS

Architecture Overview

Pure.css is organized as independent CSS modules (Base, Grids, Forms, Buttons, Tables, Menus) built on top of Normalize.css. Each module is a standalone file that can be loaded individually to minimize payload. The grid uses display: inline-block with a flexbox option and fraction-based class names like pure-u-1-3. Media query breakpoints at sm, md, lg, and xl control responsive column widths.

Self-Hosting & Configuration

  • Include the full bundle from a CDN or install via npm with npm install purecss
  • Import individual modules for smaller bundles: purecss/build/grids-min.css
  • Use responsive grid classes like pure-u-md-1-2 for medium-screen half-width columns
  • Customize colors and spacing by writing CSS that overrides Pure's minimal defaults
  • Combine with a utility CSS approach or preprocessor for project-specific theming

Key Features

  • Under 4KB gzipped for the complete framework with all modules
  • No JavaScript required; every component is pure CSS
  • Modular design lets you load only the pieces your project needs
  • Mobile-first responsive grid with five configurable breakpoints
  • Built on Normalize.css for consistent cross-browser baseline rendering

Comparison with Similar Tools

  • Tailwind CSS — Utility-first with thousands of classes; Pure.css is a pre-built component set under 4KB
  • Bootstrap — Full-featured with JS components and heavy bundle; Pure.css is minimal and CSS-only
  • Bulma — Flexbox-based with more components; Pure.css is significantly smaller
  • Milligram — Similar minimalist philosophy; Pure.css includes more modules like menus and tables
  • Water.css — Classless styling for semantic HTML; Pure.css provides explicit utility classes

FAQ

Q: Is Pure.css still maintained? A: Yes. Pure.css receives periodic updates on GitHub and remains a stable, production-ready framework.

Q: Can I use only the grid module? A: Yes. Import purecss/build/grids-min.css and purecss/build/grids-responsive-min.css individually to get just the grid at under 1KB.

Q: Does Pure.css include JavaScript components? A: No. Pure.css is 100% CSS. For interactive components like dropdowns with toggle behavior, you add minimal JavaScript yourself.

Q: How does Pure.css compare to no framework at all? A: Pure.css gives you a responsive grid, normalized form elements, and consistent button styles out of the box, saving time on cross-browser basics while staying close to raw CSS in weight.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产