Pico provides a .classless version (example).
In this version, <header>, <main>, and <footer> inside <body> act as containers to define a centered or a fluid viewport.
These 2 pages have the same style:
See the version picker to easily select the ideal Pico CSS version variant to match your project's needs.
Usage#
Use the default .classless version if you need centered viewports:
Or use the .fluid.classless version if you need a fluid container:
These .classless versions are also available on jsDelivr CDN:
Root container#
If you need to customize the default root container for <header>, <main>, and <footer>, you can recompile Pico with another CSS selector.
Useful for React, Gatsby, or Next.js.
/* Custom Class-less version for React */ @use "pico" with ( // Define the root element used to target <header>, <main>, <footer> // with $enable-semantic-container and $enable-responsive-spacings $semantic-root-element: "#root", // Enable <header>, <main>, <footer> inside $semantic-root-element as containers $enable-semantic-container: true, // Enable .classes $enable-classes: false )The code above will compile Pico with the containers defined like this:
Learn more about compiling a custom version of Pico with SASS.