Resume the min-width of the tables.
It was lost by mistake while fixing #85
This commit is contained in:
parent
0809e2b132
commit
188d8ffc69
5 changed files with 56 additions and 42 deletions
|
@ -1,12 +0,0 @@
|
||||||
<!--
|
|
||||||
Fixed kramdown code highlight rendering:
|
|
||||||
https://github.com/penibelst/jekyll-compress-html/issues/101
|
|
||||||
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
|
||||||
-->
|
|
||||||
{% if include.content contains '<pre class="highlight">' %}
|
|
||||||
{% assign content = include.content | replace: '<pre class="highlight"><code', '<code' %}
|
|
||||||
{% assign content = content | replace: '</code></pre>', '</code>' %}
|
|
||||||
{{ content }}
|
|
||||||
{% else %}
|
|
||||||
{{ include.content }}
|
|
||||||
{% endif %}
|
|
27
_includes/refactor-content.html
Normal file
27
_includes/refactor-content.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<!--
|
||||||
|
Refactor the HTML structure.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% assign _content = include.content %}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Suroundding the markdown table with '<div class="table-wrapper">. and '</div>'
|
||||||
|
-->
|
||||||
|
{% if _content contains '<table>' %}
|
||||||
|
{% assign _content = _content | replace: '<table>', '<div class="table-wrapper"><table>' %}
|
||||||
|
{% assign _content = _content | replace: '</table>', '</table></div>' %}
|
||||||
|
{% assign _content = _content | replace: '</table></div></code>', '</table></code>' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Fixed kramdown code highlight rendering:
|
||||||
|
https://github.com/penibelst/jekyll-compress-html/issues/101
|
||||||
|
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
||||||
|
-->
|
||||||
|
{% if _content contains '<pre class="highlight">' %}
|
||||||
|
{% assign _content = _content | replace: '<pre class="highlight"><code', '<code' %}
|
||||||
|
{% assign _content = _content | replace: '</code></pre>', '</code>' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ _content }}
|
|
@ -36,7 +36,7 @@ layout: compress
|
||||||
<div id="main-wrapper">
|
<div id="main-wrapper">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
{% include fixlinenos.html content=content %}
|
{% include refactor-content.html content=content %}
|
||||||
|
|
||||||
{% include footer.html %}
|
{% include footer.html %}
|
||||||
|
|
||||||
|
|
|
@ -750,22 +750,24 @@ a {
|
||||||
|
|
||||||
|
|
||||||
/*--- Begin of Markdown table style ---*/
|
/*--- Begin of Markdown table style ---*/
|
||||||
|
div.post-content .table-wrapper {
|
||||||
div.post-content {
|
overflow-x: auto;
|
||||||
>table, li>table {
|
|
||||||
min-width: 60%;
|
>table {
|
||||||
display: block;
|
min-width: 60%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
thead {
|
thead {
|
||||||
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
||||||
+tbody tr {
|
th {
|
||||||
|
@extend %table-cell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
&:nth-child(2n) {
|
&:nth-child(2n) {
|
||||||
background-color: var(--tb-even-bg);
|
background-color: var(--tb-even-bg);
|
||||||
}
|
}
|
||||||
|
@ -775,17 +777,14 @@ table {
|
||||||
& {
|
& {
|
||||||
border-bottom: 1px solid var(--tb-border-color);
|
border-bottom: 1px solid var(--tb-border-color);
|
||||||
}
|
}
|
||||||
}
|
td {
|
||||||
th {
|
|
||||||
@extend %table-cell;
|
@extend %table-cell;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody td {
|
|
||||||
@extend %table-cell;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // table
|
|
||||||
|
|
||||||
|
|
||||||
/*--- post ---*/
|
/*--- post ---*/
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
%table-cell {
|
%table-cell {
|
||||||
padding: .35rem .8rem;
|
padding: .4rem 1rem;
|
||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue