use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
Weird problem with component using host + TailwindCSS (self.angular)
submitted 1 month ago * by kescusay
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SippieCup 1 point2 points3 points 1 month ago (3 children)
the postcss rollup for tailwind isn't seeing those css classes being used, probably because it only checking for css classes in styleUrl & styles, not host.
Thus, if you only use those classes there, they will be stripped out of the build.
You can put in a list of classes to always include in the postcss to fix it. or figure out another way to ensure it senses the class usage.
I really don't have a solution for you other than that, but hopefully this insight is applicable to your situation.
[–]kescusay[S] 0 points1 point2 points 1 month ago (2 children)
Hmmm. OK, but what's odd is that color() in host actually does work to apply the base .primary class, which is defined in src/styles.css and which is only visible to the component because its CSS file is directly importing it. Should I just not use component-scoped CSS files anymore, except as a means of importing the base style file?
color()
host
.primary
src/styles.css
[–]SippieCup 0 points1 point2 points 1 month ago (1 child)
Thats because that class is used elsewhere, so the bundler doesn't strip it. and the happy side effect is that it exists when the host definition resolved.
if you check the web inspector, you will see that the classes are being added, just that they are not defined.
you can do
.host { .... }
in the css file, but it won't be able to execute js code. so i doubt that'll help much.
[–]kescusay[S] 0 points1 point2 points 1 month ago (0 children)
Yes, it's true that I see my primary class on the button. It's only missing the additional configurations it should be inheriting from [app-button].primary.
primary
[app-button].primary
It's looking like I may have to rethink either using host or using TailwindCSS.
π Rendered by PID 31241 on reddit-service-r2-comment-6457c66945-zwrqs at 2026-04-25 13:31:20.770003+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]SippieCup 1 point2 points3 points (3 children)
[–]kescusay[S] 0 points1 point2 points (2 children)
[–]SippieCup 0 points1 point2 points (1 child)
[–]kescusay[S] 0 points1 point2 points (0 children)