In my Angular project, I am utilizing Angular Material and material table components.
One issue I have encountered is that all the text in my table seems to have a 10px margin applied at the top and bottom due to classes like .ng-tns-c5-1 or .ng-tns-c6-1, etc.
I have been unable to find a straightforward way to adjust these margins without manually inspecting elements, identifying the specific class, and then modifying it with CSS.
The problem escalates when other changes in the application alter the class names, requiring me to repeatedly update them. This tedious process has resulted in excessive white space within the table, negatively impacting the overall aesthetics.
How can I ensure that the margin remains consistent at the desired 2-3px without constantly adjusting these classes?
My current approach in CSS involves setting the margins as follows:
.ng-tns-c5-1 {
margin-top: 2px !important;
margin-bottom: 2px !important;
}
.ng-tns-c5-0 {
margin-top: 2px !important;
margin-bottom: 2px !important;
}
.ng-tns-c6-1 {
margin-top: 2px !important;
margin-bottom: 2px !important;
}
.ng-tns-c4-0 {
margin-top: 2px !important;
margin-bottom: 2px !important;
}