Within my Angular application, I have various component pages such as <app-page-home>
, <app-page-login>
, <app-page-documentation>
, etc. that are displayed when needed in the <router-outlet>
.
I am facing a challenge where I want to style all these components collectively from a global stylesheet (./src/styles.styl
), which is applied throughout the entire application. However, CSS does not support using wildcards for custom tags.
Instead of manually listing each tag one by one, I would prefer to use a wildcard approach like
app-page-* { border : blue solid 1px; }
app-page-* {
border : blue solid 1px;
}
<app-page-login>Login stuff</app-page-login>
<br>
<app-page-documentation>Documentation</app-page-documentation>
Unfortunately, I cannot assign classes (or can I?) since these components are dynamically mounted by the router. If adding classes was an option, I could easily use something like class="page"
.
Does anyone have suggestions on how to target custom tags with a wildcard? Thank you