Skip to content

Styling the :host with  #6202

@kasperpeulen

Description

@kasperpeulen

I have the following component:

@Component(
    selector: 'login',
    templateUrl: 'login.component.html',
    directives: const [CORE_DIRECTIVES, FORM_DIRECTIVES, DROPDOWN_DIRECTIVES],
    styleUrls: const ['login.component.css'],
    encapsulation: ViewEncapsulation.None
    )

With the following style:

:host {
  position: fixed;
  display: block;
  right: 10px;
  top: 10px;
  z-index: 1;
}

I assumed that this would turn into a global css style like:

login {
  position: fixed;
  display: block;
  right: 10px;
  top: 10px;
  z-index: 1;
}

But it is actually puts this .host selector as global style:
image

I'm not sure what the expected behaviour would be here, but I think this makes not much sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions