Skip to content

Commit 651f9c1

Browse files
committed
Fix the position of the table scroll bar
1 parent 1bff915 commit 651f9c1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

_includes/refactor-content.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
{% assign _content = include.content %}
66

7-
<!-- Suroundding the markdown table with '<div class="table-wrapper">. and '</div>' -->
7+
<!--
8+
In order to allow a wide table to scroll horizontally,
9+
we suround the markdown table with `<div class="table-wrapper">` and `</div>`
10+
-->
811
{% if _content contains '<table>' %}
912
{% assign _content = _content
1013
| replace: '<table>', '<div class="table-wrapper"><table>'

assets/css/_addon/main.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,14 +771,15 @@ img {
771771

772772

773773
/*--- Begin of Markdown table style ---*/
774-
div.post-content .table-wrapper {
774+
775+
.table-wrapper { // it will be created by Liquid
775776
overflow-x: auto;
777+
margin-bottom: 1.5rem;
776778

777779
> table {
778780
min-width: 100%;
779781
overflow-x: auto;
780782
border-spacing: 0;
781-
margin-bottom: 1.5rem;
782783

783784
thead {
784785
border-bottom: solid 2px rgba(210, 215, 217, 0.75);

0 commit comments

Comments
 (0)