@@ -17,7 +17,7 @@ Gutenberg.css is the base stylesheet but there are themes available in the `them
1717
1818Example with Gutenberg and "old style" theme :
1919
20- ``` HTML
20+ ``` html
2121<link rel =" stylesheet" href =" dist/gutenberg.css" media =" print" >
2222<link rel =" stylesheet" href =" dist/themes/oldstyle.css" media =" print" > <!-- optional -->
2323```
@@ -40,7 +40,7 @@ npm install gutenberg-css
4040
4141You can also use the unpkg service as a * CDN* .
4242
43- ``` HTML
43+ ``` html
4444<link rel =" stylesheet" href =" https://unpkg.com/gutenberg-css@0.6" media =" print" >
4545<link rel =" stylesheet" href =" https://unpkg.com/gutenberg-css@0.6/dist/themes/oldstyle.min.css" media =" print" >
4646```
@@ -54,29 +54,42 @@ To hide elements to be printed you can simply add the class `no-print`.
5454
5555### Force break page
5656
57- Gutenberg provides two ways to break a page, the class ` page- break-before` will to break before and ` page- break-after` to break after.
57+ Gutenberg provides two ways to break a page, the class ` break-before ` will to break before and ` break-after ` to break after.
5858
5959Example:
6060
61- ``` HTML
61+ ``` html
6262<!-- The title will be on a new page -->
63- <h1 class =" page- break-before" >My title</h1 >
63+ <h1 class =" break-before" >My title</h1 >
6464
65- <p class =" page- break-after" >I will break after this paragraph</p >
65+ <p class =" break-after" >I will break after this paragraph</p >
6666<!-- Break here, the next paragraph will be on a new page -->
6767<p >I am on a new page</p >
6868```
6969
70+ ### Avoid break inside
71+
72+ To avoid the page to break "inside" an element, you can use the ` avoid-break-inside ` class.
73+
74+ Example:
75+
76+ ``` html
77+ <div class =" avoid-break-inside" >
78+ <img src =" gutenberg.png" />
79+
80+ <p >I really don't want this part to be cut</p >
81+ </div >
82+ ```
83+
7084### Not reformat links or acronym
7185
72- If you do not want to reformat the links, acronym or abbreviation to show the full url or title, you
73- can use the class ` no-reformat ` .
86+ If you do not want to reformat the links, acronym or abbreviation to show the full url or title, you can use the class ` no-reformat ` .
7487
7588### Force to print background
7689
77- To force backgrounds to be printed (can be useful when you "print" a pdf), add this CSS (compatible with Safari and Chrome) :
90+ To force backgrounds to be printed (can be useful when you "print" a pdf), add this CSS (compatible with Safari and Chrome):
7891
79- ``` CSS
92+ ``` css
8093-webkit-print-color-adjust: exact;
8194 print-color-adjust : exact;
8295```
0 commit comments