Pico CSS
repository·main·Indexed 41 days ago
https://github.com/yohn/picocssA minimalist, lightweight CSS framework version 2.2.10 that prioritizes semantic HTML. It acts as a 'superpowered reset' to provide a responsive design system without requiring heavy use of custom classes. Offers a standard version and a .classless version for pure HTML projects, with support for SASS customization and automatic light/dark mode switching.
What's inside Pico CSS
- Pico CSS is a minimalist framework designed as a "superpowered HTML reset." It prioritizes semantic HTML and does not provide a large library of utility classes (like Tailwind CSS). For large-scale projects, you should use the SASS integration to customize the framework via SCSS or standard CSS to build complex layouts.
Install Pico CSS manually
mainYou can download the Pico CSS source files directly from GitHub and link the local path to
pico.min.cssin your HTML<head>.<link rel="stylesheet" href="css/pico.min.css" />Use the Pico CSS Class-less version
mainPico CSS offers a
.classlessversion designed for pure HTML projects where you want to avoid adding custom classes. In this mode, semantic elements like<header>,<main>, and<footer>act as containers to define the viewport.There are two variants:
- Default
.classless: Provides centered viewports. .fluid.classless: Provides a fluid (full-width) container.
Note: Ensure you include
<meta name="color-scheme" content="light dark" />in your<head>to support automatic light/dark mode switching.<!-- Centered Viewport --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yohns/picocss@2.2.10/css/pico.classless.min.css" /> <!-- Fluid Viewport --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yohns/picocss@2.2.10/css/pico.fluid.classless.min.css" />- Default
Install Pico CSS via NPM
mainTo use Pico CSS in a modern web development workflow, install the
@yohns/picocsspackage via npm. After installation, you can import it into your SCSS files using the@userule to enable easy customization via SASS.npm i @yohns/picocss@use "pico";Starter HTML template for Pico CSS
mainUse this boilerplate to ensure proper responsive behavior, color scheme support, and container layout when starting a new project.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="color-scheme" content="light dark" /> <link rel="stylesheet" href="css/pico.min.css"> <title>Hello world!</title> </head> <body> <main class="container"> <h1>Hello world!</h1> </main> </body> </html>Use Pico CSS via CDN
mainFor quick prototyping or projects without a build step, you can link directly to the precompiled Pico CSS file hosted on jsDelivr. This is the fastest way to get started.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yohns/picocss@2.2.10/css/pico.min.css" />