In an older, complex code base that uses Angular 4 with a custom Webpack, there were some components that imported a css file, in the same way that you would import a module for a side effect. An example (this is the complete file, with different variable names):
import { Component, OnInit } from '@angular/core';
import '../../assets/css/styles.css';
@Component({
selector: 'sidebar-app',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.css']
})
export class SidebarComponent implements OnInit {
ngOnInit() {
}
}
styles.css
.content_body {
padding: 0;
}
.basic_page_wrapper {
padding: 0;
}
I have never seen css being imported in typescript, and all other examples I've found use the styles in some way, for example
import * as s from './Button.css';
Why would a css file be imported like import '../../assets/css/styles.css'; inside an angular component?