I'm trying to print an html form within my Angular7 App with minimal margins. I've attempted different solutions such as adjusting the margins manually in Chrome's print preview box and adding @media print styles & @page styles in both the component css file and global stylesheet. Even changing the background color of the html and body tags didn't show any visible effects.
I've tested these changes in both the component.css and styles.css files without success:
@page {
size: auto;
margin: 0;
}
html, body {
margin: 0;
background: green;
}
@media print{
html, body {
margin: 0;
background: green;
}
}
The green background was just a test. I'll remove it once the issue is resolved.
My expectation was to see the html and body tags turn green when rendering the print styles, but unfortunately, I still see no color change or adjustment in margins.