<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sergiu Mironescu</title>
    <description>The latest articles on Forem by Sergiu Mironescu (@xexiu).</description>
    <link>https://forem.com/xexiu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1165172%2F2df5dad7-0f42-4b66-ae74-446e61578a37.png</url>
      <title>Forem: Sergiu Mironescu</title>
      <link>https://forem.com/xexiu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/xexiu"/>
    <language>en</language>
    <item>
      <title>Nested CSS was detected, but CSS nesting has not been configured correctly - Astro</title>
      <dc:creator>Sergiu Mironescu</dc:creator>
      <pubDate>Tue, 19 Sep 2023 13:06:10 +0000</pubDate>
      <link>https://forem.com/xexiu/nested-css-was-detected-but-css-nesting-has-not-been-configured-correctly-astro-392k</link>
      <guid>https://forem.com/xexiu/nested-css-was-detected-but-css-nesting-has-not-been-configured-correctly-astro-392k</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;After following the steps from the Atros Docs, I get the error on the console (check screenshots).&lt;br&gt;
Seems that somehow PostCSS config has some conflicts with Tailwind, following the Astro Doc.&lt;/p&gt;

&lt;p&gt;MacOSX Ventura 13.5.1&lt;br&gt;
VSCode&lt;br&gt;
"astro": "^3.1.0",&lt;br&gt;
package.json:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

{
  "name": "sm_astro",
  "type": "module",
  "version": "0.0.1",
  "browserslist": [
    "defaults"
  ],
  "scripts": {
    "dev": "bun --bun astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "@astrojs/partytown": "^2.0.0",
    "@astrojs/sitemap": "^3.0.0",
    "@astrojs/tailwind": "^5.0.0",
    "@typescript-eslint/parser": "^6.7.0",
    "astro": "^3.1.0",
    "astro-icon": "^0.8.1",
    "autoprefixer": "^10.4.15",
    "eslint-plugin-astro": "^0.29.0",
    "eslint-plugin-jsx-a11y": "^6.7.1",
    "tailwindcss": "^3.3.3"
  },
  "devDependencies": {
    "bun-types": "^1.0.2",
    "eslint": "^8.49.0"
  }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Changed from:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const autoprefixer = require('autoprefixer');

module.exports = {
   plugins: [
      autoprefixer(),
   ]
};


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

module.exports = {
   plugins: {
      'tailwindcss/nesting': {}, &amp;lt;--- Needs this
      tailwindcss: {},
      autoprefixer: {},
   }
};


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can check the reproducible error here and the fix commented on &lt;code&gt;postcss.confic.jsc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackblitz.com/edit/github-elgzfe-pwwt3m?file=src%2Flayouts%2FLayout.astro,postcss.config.cjs,package.json" rel="noopener noreferrer"&gt;https://stackblitz.com/edit/github-elgzfe-pwwt3m?file=src%2Flayouts%2FLayout.astro,postcss.config.cjs,package.json&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Error console:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb15klbeqv79tgchhbt55.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb15klbeqv79tgchhbt55.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fix:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqwu49mo2uavkpv4hx4eu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqwu49mo2uavkpv4hx4eu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>astro</category>
      <category>postcss</category>
      <category>tailwindcss</category>
      <category>plugins</category>
    </item>
  </channel>
</rss>
