Skip to content

Nested styles on html tags dosen't work in inline style #53013

@viniciusschuelter

Description

@viniciusschuelter

Which @angular/* package(s) are the source of the bug?

common, compiler, core

Is this a regression?

Yes

Description

When I try to style nested html tags it's not working when I use the inline style(independs if string or array), for example:

styles: `
:host {
  display: block;
  a {
    color: red
  }
}`

Weirdly, when I put the same styles in a separated file and use the stylesUrl it's work fine. The same happens and works fine when I use a class name instead tag name

Please provide a link to a minimal reproduction of the bug

https://stackblitz-starters-q2t2hm.stackblitz.io

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

The bug either happens in v16 but in v15 dont

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilercore: CSS encapsulationstate: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions