Pico.css

Minimal CSS Framework for semantic HTML

README

Pico.css

Minimal CSS Framework for semantic HTML
Elegant styles for all native HTML elements without .classes and dark mode automatically enabled.

Examples · Documentation


Pico.css Standard gzipped CSS Classless gzipped CSS Github release npm version License Twitter URL


https://user-images.githubusercontent.com/23470684/126863110-94061cf1-36ea-4697-94bd-2e1071a95a2f.mp4

Class-light and semantic  
Pico uses simple native HTML tags as much as possible. Less than 10 .classes are used in Pico.

Great styles with just one CSS file  
No dependencies, package manager, external files, or JavaScript.

Responsive everything  
Elegant and consistent adaptive spacings and typography on all devices.

Light or Dark mode  
Shipped with two beautiful color themes, automatically enabled according to the user preference.

Table of contents



Usage


There are 4 ways to get started with pico.css:

Install manually

[Download Pico](https://github.com/picocss/pico/archive/refs/heads/master.zip) and link `/css/pico.min.css` in the `` of your website.

  1. ``` html
  2. <link rel="stylesheet" href="css/pico.min.css">
  3. ```

Install from CDN

Alternatively, you can use unpkg CDN to link pico.css.

  1. ``` html
  2. <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
  3. ```

Install with NPM

  1. ``` sh
  2. npm install @picocss/pico
  3. ```

Install with Composer

  1. ``` sh
  2. composer require picocss/pico
  3. ```

Class-less version


Pico provides a .classless version (example).

In this version, header, main and footer act as containers.

Use the default .classless version if you need centered viewports:

  1. ``` html
  2. <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.classless.min.css">
  3. ```

Or use the .fluid.classless version if you need a fluid container:

  1. ``` html
  2. <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.fluid.classless.min.css">
  3. ```

Then just write pure HTML, and it should look great:

  1. ``` html
  2. <!doctype html>
  3. <html lang="en">
  4.   <head>
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.classless.min.css">
  8.     <title>Hello, world!</title>
  9.   </head>
  10.   <body>
  11.     <main>
  12.       <h1>Hello, world!</h1>
  13.     </main>
  14.   </body>
  15. </html>
  16. ```

Examples


Minimalist templates to discover Pico in action:
Examples

- Preview  
  A starter example with all elements and components used in Pico

A starter example in Arabic with all the elements and components used in Pico

  Just a pure semantic HTML markup, without .classes

  A basic custom template for Pico using only CSS custom properties (variables)

- Company  
  A classic company or blog layout with a sidebar

- Google Amp  
  A simple layout for Google Amp, with inlined CSS

- Sign in  
  A minimalist layout for Login pages

  Custom CSS build with the Bootstrap grid system to manage complex grid layouts in Pico

All examples are open-sourced in picocss/examples.

Limitations


Pico can be used without custom CSS for quick or small projects. However, it’s designed as a starting point, like a “reset CSS on steroids”. As Pico does not integrate any helpers or utilities .classes, this minimal CSS framework requires SCSS or CSS knowledge to build large projects.

Documentation


Getting started
- RTL

Layout

Elements

Components

Utilities

Browser Support


Pico is designed and tested for the latest stable Chrome, Firefox, Edge, and Safari releases. It does not support any version of IE, including IE 11.

Contributing


If you are interested in contributing to Pico CSS, please read our contributing guidelines.

Copyright and license


Licensed under the MIT License.

Relevant third-party tools and resources we depend on:

Website and docs:
- TypeIt: JavaScript animated typing utility (Licensed GPL-3.0)
- Font Awesome: Icons (Licensed CC BY 4.0)

Pico Library:
- Feather Icons (Licensed MIT)
- Normalize.css: CSS reset (Licensed MIT)
- Sanitize.css: Cross-browser default styling (Licensed CC0 1.0 Universal)