mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
Fixes #9: print styles and page breaks
This commit is contained in:
parent
f800dc3286
commit
04d1b2eff8
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
@media all {
|
@media all {
|
||||||
|
|
||||||
/* Never show page break in normal view */
|
/* Never show page breaks in normal view */
|
||||||
.page-break {
|
.page-break-after,
|
||||||
|
.page-break-before {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,22 +14,30 @@
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
|
|
||||||
/* Page Styles */
|
/* html and body tweaks */
|
||||||
@page {
|
html, body {
|
||||||
//margin: 0.5cm;
|
height: auto !important;
|
||||||
|
overflow: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Page break */
|
/* Page breaks */
|
||||||
.page-break {
|
.page-break-after {
|
||||||
display: block;
|
display: block;
|
||||||
break-after: always;
|
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-break-before {
|
||||||
|
display: block;
|
||||||
|
page-break-before: always;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* General styles */
|
/* General styles */
|
||||||
fuse-root {
|
fuse-root {
|
||||||
|
|
||||||
fuse-navbar,
|
fuse-navbar-vertical,
|
||||||
|
fuse-navbar-horizontal,
|
||||||
fuse-toolbar,
|
fuse-toolbar,
|
||||||
fuse-footer,
|
fuse-footer,
|
||||||
fuse-quick-panel,
|
fuse-quick-panel,
|
||||||
|
@ -41,11 +50,16 @@
|
||||||
.ps {
|
.ps {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Printable page specific styles */
|
.mat-drawer-container,
|
||||||
.printable {
|
.mat-sidenav-container {
|
||||||
overflow: visible !important;
|
background-color: white !important;
|
||||||
height: auto !important;
|
|
||||||
|
.mat-drawer-content,
|
||||||
|
.mat-sidenav-content {
|
||||||
|
overflow: initial !important;
|
||||||
|
height: auto !important
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -136,12 +136,44 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Use the following elements to add breaks to your pages. This will make sure that the section in between
|
||||||
|
these elements will be printed on a new page. The following two elements must be used before and after the
|
||||||
|
page content that you want to show as a new page. So, you have to wrap your content with them.
|
||||||
|
|
||||||
|
Elements:
|
||||||
|
---------
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Example:
|
||||||
|
--------
|
||||||
|
|
||||||
|
Initial page content!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
This is the second page!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
This is the third page!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- / INVOICE -->
|
<!-- / INVOICE -->
|
||||||
|
|
||||||
<!-- Use the following element to add breaks to your pages -->
|
|
||||||
<!-- This will make sure that the section after this element will be printed on a new page -->
|
|
||||||
<div class="page-break"></div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -158,13 +158,45 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Use the following elements to add breaks to your pages. This will make sure that the section in between
|
||||||
|
these elements will be printed on a new page. The following two elements must be used before and after the
|
||||||
|
page content that you want to show as a new page. So, you have to wrap your content with them.
|
||||||
|
|
||||||
|
Elements:
|
||||||
|
---------
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Example:
|
||||||
|
--------
|
||||||
|
|
||||||
|
Initial page content!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
This is the second page!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
This is the third page!
|
||||||
|
|
||||||
|
<div class="page-break-after"></div>
|
||||||
|
<div class="page-break-before"></div>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- / INVOICE -->
|
<!-- / INVOICE -->
|
||||||
|
|
||||||
<!-- Use the following element to add breaks to your pages -->
|
|
||||||
<!-- This will make sure that the section after this element will be printed on a new page -->
|
|
||||||
<div class="page-break"></div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user