0

Angular 2 with the CLI is not loading the default styles.css. Or maybe it is, but the styling does not work. I have to add styles in every component, which makes no sense.

For example, this works in my component css:

.qta-colors{    
  background-color: rgb( 5, 37, 65)
} 

But if I move it to styles.css then it does not work.

Style is defined in angular-cli.json:

  "styles": [
     "styles.css" 
  ],
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Tampa
  • 75,446
  • 119
  • 278
  • 425

1 Answers1

0

you can add your global css in index.html file like

 <style>
  .qta-colors{    
   background-color: rgb( 5, 37, 65)
  }   
  </style>

it will be accessible throughout you application

Ashutosh Jha
  • 15,451
  • 11
  • 52
  • 85