Skip to content

Inclusion order of CSS is not guaranteed for global styling with "scss" format? #7267

@RGTGT

Description

@RGTGT

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.7
node: 6.11.2
os: win32 x64
@angular/animations: 4.3.3
@angular/common: 4.3.3
@angular/compiler: 4.3.3
@angular/core: 4.3.3
@angular/forms: 4.3.3
@angular/http: 4.3.3
@angular/platform-browser: 4.3.3
@angular/platform-browser-dynamic: 4.3.3
@angular/router: 4.3.3
@angular/cli: 1.2.7
@angular/compiler-cli: 4.3.3
@angular/language-service: 4.3.3

Repro steps.

  • Create angularcli project using scss as styling option.

  • Create a css file containing
    body { font-size: 120px; }

  • Include the previously created css file in styles.scss through @import

  • Import bootstrap CDN in styles through
    @import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css");
    Ensure the inclusion of bootstrap is the last inclusion of styles.scss

  • Launch
    ng serve
    and
    ng serve -ec -sm --port 3000

  • Visit localhost:4200 & localhost:3000 to see that CSS are not included in an order between the two instances.

(see: sample repository for more infos)

The log given by the failure.

N/A

Desired functionality.

It would be nice to have a garantee about the order of inclusion when importing external CSS through styles.scss. I didn't find much documentation about this aspect. So if it's not a bug I think it would be great if these kind or behavior were documented.

Mention any other details that might be useful.

sample repository

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions