Could not override css classes
See original GitHub issueReproduction link
https://stackblitz.com/edit/angular-md42sr?file=src/app/app.component.ts
Steps to reproduce
1- trying to add label float to left in component css based on simple form
What is expected?
label will be floated to left
What is actually happening?
css and other css rules are not reflected in the code
| Environment | Info |
|---|---|
| ng-zorro-antd | 7.2.0 |
| Browser | chrome |
it happens with all CSS ruled I trying to override, for example, ant-alerts-warning … and a lot of class that are not be overridden and I don’t see them in the console
How do I affect generaly on child component of ant
my angular json
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/favicon.png",
"src/favicon.icns",
"src/favicon.256x256.png",
"src/favicon.512x512.png",
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
],
"styles": [
"src/theme.less",
"src/styles.scss"
],
"scripts": []
},
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Can't override css of element
A rule that has the !important property will always be applied no matter where that rule appears in the CSS document.
Read more >How to Edit, Customize, and Override Bootstrap CSS ...
Learn how to override Bootstrap CSS using simple CSS overrides or Sass variables and maps to customize your site.
Read more >Css override not working
Hello,. I'm trying to override (display: inline-block; ) in Basic.css file by creating a class in my own css file:
Read more >Techniques to prevent CSS override by base application
And then, I'll talk about what are the chances that base application(s) will use these methods of styling that can possibly override your...
Read more >How to Override CSS Styles
Example of overriding CSS style with the Class selector: ... Here, the Class selector overrode the ID selector because it was the last...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can override CSS class by using the deep selector example:
Source: https://stackoverflow.com/questions/58181488/how-to-change-styles-of-nz-table-in-ng-zorro
Thank you so much Bro DepickereSven +1: