Skip to content

Support @page css rule into component styles #11860

@ocombe

Description

@ocombe

I'm submitting a ... (check one with "x")

[x] bug report

Current behavior
When I use the @page css rule in my component style, it gets encapsulated but it shouldn't.

For example the following css:

@page {
    size: 1500px 2048px;
}

is transformed into

@page[_ngcontent-tue-10] {
  size: 1500px 2048px;
}

It works fine with @media rules:

@media print {
    :host {
        margin: 0 auto;
        padding: 0 1rem;
    }
}

is transformed into:

@media print {
  [_nghost-tue-10] {
    margin: 0 auto;
    padding: 0 1rem;
  }
}

which works just as expected.

Expected behavior
The @page css rule should have the same behavior as @media and shouldn't be encapsulated.

What is the motivation / use case for changing the behavior?
The @page css rule doesn't work in component styles right now

Please tell us about your environment:

  • Angular version: 2.0.0
  • Browser: all
  • Language: all

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions