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
  • 107,083
  • 22
  • 201
  • 376
Tampa
  • 69,424
  • 111
  • 266
  • 409

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
  • 13,573
  • 9
  • 48
  • 77