Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

[QUESTION] Angular2 template migration to per-component styles #326

Closed

Description

@rbasniak

I saw the last update on Angular2 changed to per-component scoped styles, and completely removed the global styles.

Doesn't it make sense to have a application wide style like it was before, and also some per-component styles just to exemplify how to do it?

Please correct if I'm wrong, but as it is now, I understand that if I create a global stylesheet it won't be included in the bundle anymore. This way if I have some styles that are used in more than one component, I'll have to duplicate the code...

Activity

  1. SteveSandersonMS commented on Sep 21, 2016

    @SteveSandersonMS
    Member

    If you do want a global stylesheet, there are various ways to add one, e.g., as documented at https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#example-a-simple-webpack-setup-that-builds-less

    Or even just by adding a .css file to wwwroot/ and then referencing it using a <link rel=stylesheet> tag in your layout :)

    So yes, you're right, it does make sense. For the template we're just trying to minimise concept count (with additional concepts covered by docs or at least standard practices) rather than putting all features in the out-of-the-box set of files. Hope that seems reasonable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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