Skip to content

Component CSS loads before angular material CSS #15702

@qmarquez

Description

@qmarquez

What is the expected behavior?

the CSS rules defined on component CSS have to have more priority than material rules

What is the current behavior?

Material CSS rules override component CSS rules

What are the steps to reproduce?

Using material, icons for example, declared CSS rule don't override the material CSS

Result
image

Component CSS
image

To fix it i need to declare the CSS rules as !important
image
image

when a CSS rule it's declared on the component CSS it wont must be priority over anothers CSS rules?

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 7.3.7
Node: 10.13.0
OS: win32 x64
Angular: 7.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.7
@angular-devkit/build-angular     0.13.7
@angular-devkit/build-optimizer   0.13.7
@angular-devkit/build-webpack     0.13.7
@angular-devkit/core              7.3.7
@angular-devkit/schematics        7.3.7
@angular/cdk                      7.3.6
@angular/cli                      7.3.7
@angular/material                 7.3.6
@angular/pwa                      0.13.7
@ngtools/webpack                  7.3.7
@schematics/angular               7.3.7
@schematics/update                0.13.7
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0

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