colouredFunk
colouredFunk

Reputation: 788

Bootstrap and Angular 4 - Ng overriding CSS

I've imported bootstrap CSS into the Angular global style.css, however, the bootstrap styles are being overridden by Angular. For example, my markup renders as this -

<div _ngcontent-c0="" class="container">

but because of the _ngcontent the following CSS gets applied:

margin: 0;
padding: 0;
border: 0;
font-family: inherit

Upvotes: 0

Views: 2602

Answers (1)

krezus
krezus

Reputation: 1451

you can change the order of styles that defined in angular-cli.json file.

"styles": [
    "../node_modules/bootstrap/dist/css/bootstrap.min.css",
    "styles.css"
  ],

you should restart your server since angular-cli does not looks for changes in angular.cli.json

Upvotes: 4

Related Questions