diff --git a/docs/classless.html b/docs/classless.html
index 41d3143f..459c7192 100644
--- a/docs/classless.html
+++ b/docs/classless.html
@@ -1,5 +1,29 @@
-
Class-less version • Pico.css Class-less version For wild HTML purists! Pico provides a .classless
version (example ).
In this version, <header >
, <main >
, and <footer >
act as containers to define a centered or a fluid viewport.
Usage:
Use the default .classless
version if you need centered viewports:
<link rel ="stylesheet " href ="css/pico.classless.min.css" >
Or use the .fluid.classless
version if you need a fluid container:
<link rel ="stylesheet " href ="css/pico.fluid.classless.min.css" >
These .classless
versions are also available on unpkg CDN :
// Centered viewport
+Class-less version • Pico.css Class-less version For wild HTML purists! Pico provides a .classless
version (example ).
In this version, <header >
, <main >
, and <footer >
act as containers to define a centered or a fluid viewport.
// Containers
+body > header ,
+body > main ,
+body > footer {
+ …
+}
+
Usage:
Use the default .classless
version if you need centered viewports:
<link rel ="stylesheet " href ="css/pico.classless.min.css" >
Or use the .fluid.classless
version if you need a fluid container:
<link rel ="stylesheet " href ="css/pico.fluid.classless.min.css" >
These .classless
versions are also available on unpkg CDN :
// Centered viewport
<link rel ="stylesheet" href ="https://unpkg.com/@picocss/pico@latest/css/pico.classless.min.css" >
// Fluid viewport
<link rel ="stylesheet" href ="https://unpkg.com/@picocss/pico@latest/css/pico.fluid.classless.min.css" >
-
\ No newline at end of file
+
If you need to customize the default parent (<body >
) for <header >
, <main >
, and <footer >
, you can recompile Pico by defining another CSS selector.
Useful for React , Gatsby or Next.js .
/* Custom Class-less version for React */
+
+// Set the root element
+$semantic-root-element : "#root" ;
+
+// Enable <header>, <main>, <footer> inside $semantic-root-element as containers
+$enable-semantic-container : true ;
+
+// Enable .classes
+$enable-classes : false ;
+
+// Import Pico
+@import "@picocss/pico/scss/pico" ;
The code above will compile Pico with the containers defined like this:
// Containers
+#root > header ,
+#root > main ,
+#root > footer {
+ …
+}
+
\ No newline at end of file
diff --git a/docs/src/classless.html b/docs/src/classless.html
index f9e494e1..6b854041 100644
--- a/docs/src/classless.html
+++ b/docs/src/classless.html
@@ -22,6 +22,15 @@
Pico provides a .classless
version (example ).
In this version, <header >
, <main >
, and <footer >
act as containers to define a centered or a fluid viewport.
+
+// Containers
+body > header ,
+body > main ,
+body > footer {
+ …
+}
+
+
Usage:
Use the default .classless
version if you need centered viewports:
<link rel ="stylesheet " href ="css/pico.classless.min.css" >
@@ -37,8 +46,35 @@
<link rel ="stylesheet" href ="https://unpkg.com/@picocss/pico@latest/css/pico.fluid.classless.min.css" >
+ If you need to customize the default parent (<body >
) for <header >
, <main >
, and <footer >
, you can recompile Pico by defining another CSS selector.
+ Useful for React , Gatsby or Next.js .
+
+/* Custom Class-less version for React */
+
+// Set the root element
+$semantic-root-element : "#root" ;
+
+// Enable <header>, <main>, <footer> inside $semantic-root-element as containers
+$enable-semantic-container : true ;
+
+// Enable .classes
+$enable-classes : false ;
+
+// Import Pico
+@import "@picocss/pico/scss/pico" ;
+
+ The code above will compile Pico with the containers defined like this:
+
+// Containers
+#root > header ,
+#root > main ,
+#root > footer {
+ …
+}
+
+
${require('./_footer.html')}
diff --git a/scss/_variables.scss b/scss/_variables.scss
index 1a3c9015..e2f653e1 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -1,13 +1,16 @@
// Config
// ––––––––––––––––––––
-// Enable , , inside as a container
+// Set the root element for $enable-semantic-container and $enable-responsive-spacings
+$semantic-root-element: "body" !default;
+
+// Enable , , inside $semantic-root-element as containers
$enable-semantic-container: false !default;
// Enable .container and .container-fluid
$enable-class-container: true !default;
-// Enable a centered viewport for , , inside
+// Enable a centered viewport for , , inside $enable-semantic-container
// Fluid layout if disabled
$enable-viewport: true !default;
@@ -32,9 +35,6 @@ $enable-transitions: true !default;
// Enable overriding with !important
$enable-important: true !default;
-// Set the root element for $enable-semantic-container and $enable-responsive-spacings
-$semantic-root-element: "body" !default;
-
// Responsive
// ––––––––––––––––––––
diff --git a/scss/pico.classless.scss b/scss/pico.classless.scss
index 16e8053d..c5ea8320 100644
--- a/scss/pico.classless.scss
+++ b/scss/pico.classless.scss
@@ -1,7 +1,7 @@
// Config
// --------------------
-// Enable , , inside as a container
+// Enable , , inside $semantic-root-element as containers
$enable-semantic-container: true;
// Enable .classes
diff --git a/scss/pico.fluid.classless.scss b/scss/pico.fluid.classless.scss
index 35bde2b5..ef6af042 100644
--- a/scss/pico.fluid.classless.scss
+++ b/scss/pico.fluid.classless.scss
@@ -1,10 +1,10 @@
// Config
// --------------------
-// Enable , , inside as a container
+// Enable , , inside $semantic-root-element as containers
$enable-semantic-container: true;
-// Enable a centered viewport for , , inside
+// Enable a centered viewport for , , inside $enable-semantic-container
$enable-viewport: false;
// Enable .classes