on master help sign in
markdown tables
commit1e684f43ef1b713dc3f7d1f19ed2e84c1964c309 authorGavin Atkinson <gvnatknsn@protonmail.com> dateThu 29 Jul 2021, 12:11 (5 years ago) parent60388b8
3 files changed+54−17
components/ContentArea.js+1−16 styles/markdown.module.css+52 styles/prism.css+1−1
components/ContentArea.js+1−16
@@ -12,7 +12,7 @@ export default function ContentArea(props) {
1212 e.stopPropagation();
1313 props.search.toggleSearch();
1414 }}
15− className="bg-wall text-gray flex px-4 py-1 rounded-lg type-ui"
15+ className="button-sm bg-wall text-gray"
1616 >
1717 Search<div className="ml-4 text-lightGray">⌘K</div>
1818 </button>
@@ -37,18 +37,3 @@ export default function ContentArea(props) {
3737 </div>
3838 );
3939}
40−
41−// <header className="w-full px-4 md:px-8 md:w-10/12 flex flex-row justify-between items-center pt-8 md:pt-10 lg:pt-12 pb-12">
42−// <div className="type-ui">{props.section}</div>
43−// {
44−// // <button
45−// // onClick={(e) => {
46−// // e.stopPropagation();
47−// // props.search.toggleSearch();
48−// // }}
49−// // className="button-sm bg-wall text-gray"
50−// // >
51−// // Search<div className="ml-4 text-lightGray">⌘K</div>
52−// // </button>
53−// }
54−// </header>
styles/markdown.module.css+52
@@ -107,3 +107,55 @@
107107.markdown blockquote cite {
108108 @apply not-italic font-semibold;
109109}
110+
111+.markdown table {
112+ border-collapse: separate;
113+ border-spacing: 0;
114+ min-width: 350px;
115+}
116+
117+.markdown table tr th,
118+.markdown table tr td {
119+ border-right-width: 2px;
120+ border-right-style: solid;
121+ border-bottom-width: 2px;
122+ border-bottom-style: solid;
123+ padding: 8px !important;
124+ @apply border-wall;
125+}
126+
127+.markdown table tr th:first-child,
128+.markdown table tr td:first-child {
129+ border-left-width: 2px;
130+ border-left-style: solid;
131+ @apply border-wall;
132+}
133+
134+.markdown table tr th {
135+ background: rgba(240, 239, 236, 0.33);
136+ border-top-width: 2px;
137+ border-top-style: solid;
138+ text-align: left;
139+ vertical-align: middle;
140+ @apply border-wall;
141+}
142+
143+/* top-left border-radius */
144+.markdown table tr:first-child th:first-child {
145+ border-top-left-radius: 8px;
146+}
147+
148+/* top-right border-radius */
149+.markdown table tr:first-child th:last-child {
150+ border-top-right-radius: 8px;
151+}
152+
153+/* bottom-left border-radius */
154+.markdown table tr:last-child td:first-child {
155+ border-bottom-left-radius: 8px;
156+}
157+
158+/* bottom-right border-radius */
159+.markdown table tr:last-child td:last-child {
160+ border-bottom-right-radius: 8px;
161+}
styles/prism.css+1−1
@@ -8,7 +8,7 @@ https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+ja
88
99code[class*="language-"],
1010pre[class*="language-"] {
11− @apply text-gray;
11+ @apply text-ultraDeepWall;
1212 background: none;
1313 font-family: "Source Code Pro", monospace;
1414 font-size: 1em;