I installed Pico CSS into my npm workspace for my HTML project.
npm i -D @picocss/pico
"@picocss/pico": "^2.0.6",
@use "../../node_modules/@picocss/pico/scss/index" with (
$enable-semantic-container: true,
$semantic-root-element: "#nffaac",
$enable-classes: true,
$modules: (
"themes/default": true,
"content/code": false,
"forms/input-color": false,
"forms/input-date": false,
"forms/input-file": false,
"forms/input-range": false,
"forms/input-search": false,
"components/accordion": false,
"components/card": false,
"components/dropdown": false,
"components/loading": false,
"components/modal": false,
"components/nav": false,
"components/progress": false,
"components/tooltip": true,
"utilities/accessibility": false,
"utilities/reduce-motion": false));
input, select, textarea {....}
#nffaac input, #nffaac select, #nffaac textarea {....}
What am I missing in order to apply a parent element onto Pico CSS _basics.scss selectors?
Just in case anyone runs into this challenge and simply wants a parent selector around pico's styling, the following resource on conditional styling has helped me out.
Adding that variable into my pico css setup now displays my parent id in the DOM.
// Pico lightweight version
@use "../../node_modules/@picocss/pico/scss/index" with (
$enable-semantic-container: true,
$semantic-root-element: "#nffaac",
$parent-selector: "#nffaac", //this is making all the difference
$enable-classes: true,
$modules: (
"themes/default": true,
"content/code": false,
"forms/input-color": false,
"forms/input-date": false,
"forms/input-file": false,
"forms/input-range": false,
"forms/input-search": false,
"components/accordion": false,
"components/card": false,
"components/dropdown": false,
"components/loading": false,
"components/modal": false,
"components/nav": false,
"components/progress": false,
"components/tooltip": true,
"utilities/accessibility": false,
"utilities/reduce-motion": false));
I now see the following loaded...
#nffaac input, #nffaac select, #nffaac textarea {....}