Skip to content

Commit df88a34

Browse files
committedAug 4, 2020
Make tables responsive in purecss theme
1 parent 4b2548d commit df88a34

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎plugins/table-styler.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import re
22

33
def style_tables(output_content, page, config):
4-
output_content = re.sub(r'<table>', '<table class="pure-table pure-table-striped">', output_content)
4+
output_content = re.sub(r'<table>', '<div class="responsive-table"><table class="pure-table pure-table-striped">', output_content)
5+
output_content = re.sub(r'</table>', '</table></div>', output_content)
56
return output_content

‎purecss_theme/css/site.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ a {
7878
#home-link {
7979
padding-top: 8px;
8080
}
81-
81+
.responsive-table {
82+
overflow-x: auto;
83+
}
8284
@media screen and (min-width: 64em) {
8385
#top-nav {
8486
max-width: 200px;

‎purecss_theme/css/site.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.