The issue you're experiencing might be due to the way CSS and Astro handle styles. In Astro, HTML attributes like class do not automatically pass through to child components. Instead, you need to accept a class prop in the child component and apply it to the root element.
However, in your case, the blogPost class is being applied directly in the Astro component, so it should work as expected.
One possible issue could be the use of the :first pseudo-class in your CSS. In your CSS, you're using .blogPost:first, which is not a valid selector. If you want to select the first .blogPost element, you should use .blogPost:first-child.
Here's how you can correct it:
@layer components {
.blogPost:first-child {
@apply col-span-2;
}
}
Another potential issue could be the specificity of your CSS rules. In Astro 1.0, scoped CSS styles preserve their specificity, which means that most scoped styles will take precedence over global styles. This behavior is not explicitly guaranteed, though. Source (https://docs.astro.build/en/guides/upgrade-to/v1#changed-scoped-css-specificity)
If none of these solutions work, you might want to check if your Tailwind CSS is being correctly processed and if the blogPost class is correctly generated in your final CSS file.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: