From 40026fbf53f73df6534a7173c325c868dbc80110 Mon Sep 17 00:00:00 2001
From: Geometrically <18202329+Geometrically@users.noreply.github.com>
Date: Fri, 31 Mar 2023 10:54:04 -0700
Subject: [PATCH] Markdown table styling (#32)
---
docs/.vitepress/config.js | 2 +-
docs/components/markdown.md | 38 +++++++++++++++++++++++
docs/components/nav-row.md | 47 ----------------------------
lib/assets/styles/classes.scss | 54 ++++++++++++++++-----------------
lib/assets/styles/defaults.scss | 15 +++++++++
package.json | 2 +-
6 files changed, 82 insertions(+), 76 deletions(-)
create mode 100644 docs/components/markdown.md
delete mode 100644 docs/components/nav-row.md
diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js
index 0693e692..9c341558 100644
--- a/docs/.vitepress/config.js
+++ b/docs/.vitepress/config.js
@@ -38,7 +38,7 @@ export default {
{ text: 'Search Filter', link: '/components/search-filter' },
{ text: 'Toggle', link: '/components/toggle' },
{ text: 'Promotion', link: '/components/promotion' },
- { text: 'Navigation Row', link: '/components/nav-row' },
+ { text: 'Markdown', link: '/components/markdown' },
],
},
],
diff --git a/docs/components/markdown.md b/docs/components/markdown.md
new file mode 100644
index 00000000..b45cc325
--- /dev/null
+++ b/docs/components/markdown.md
@@ -0,0 +1,38 @@
+# Markdown
+
+
+
+:::raw
+
+
+
+:::
+
+
diff --git a/docs/components/nav-row.md b/docs/components/nav-row.md
deleted file mode 100644
index 3e7d9c58..00000000
--- a/docs/components/nav-row.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# NavRow
-
-Note: the links and animation do not work in the documentation as Vue Router is not used for routing
-
-
-
-
-
-```vue
-
-```
diff --git a/lib/assets/styles/classes.scss b/lib/assets/styles/classes.scss
index 8807e493..a7905453 100644
--- a/lib/assets/styles/classes.scss
+++ b/lib/assets/styles/classes.scss
@@ -587,7 +587,7 @@ a,
h1,
h2 {
padding: 10px 0 5px;
- border-bottom: 1px solid var(--color-header-underline);
+ border-bottom: 1px solid var(--color-gray);
}
h1,
@@ -604,21 +604,23 @@ a,
blockquote {
padding: 0 1em;
- color: var(--color-text);
- border-left: 0.25em solid var(--color-block-quote);
+ color: var(--color-base);
+ border-left: 0.25em solid var(--color-button-bg);
}
a {
cursor: pointer;
- color: var(--color-link);
+ color: var(--color-blue);
&:focus-visible,
&:hover {
- color: var(--color-link-hover);
+ filter: brightness(1.2);
+ text-decoration: none;
}
&:active {
- color: var(--color-link-active);
+ filter: brightness(1.1);
+ text-decoration: none;
}
}
@@ -638,8 +640,8 @@ a,
pre {
margin-top: 1rem;
padding: 14px;
- border-radius: var(--size-rounded-sm);
- background-color: var(--color-code-bg);
+ border-radius: var(--radius-sm);
+ background-color: var(--color-button-bg);
overflow-x: auto;
code {
@@ -652,14 +654,14 @@ a,
code {
padding: 0.2em 0.4em;
font-size: 80%;
- border-radius: var(--size-rounded-sm);
- background-color: var(--color-code-bg);
- color: var(--color-code-text);
+ border-radius: var(--radius-sm);
+ background-color: var(--color-button-bg);
+ color: var(--color-contrast);
}
hr {
margin: 20px 0;
- color: var(--color-divider);
+ color: var(--color-button-bg);
}
table {
@@ -670,8 +672,8 @@ a,
border-collapse: separate;
border-spacing: 0;
line-height: 1.5;
- border: 0.05rem solid var(--color-table-border);
- border-radius: var(--size-rounded-sm);
+ border: 0.05rem solid var(--color-button-bg);
+ border-radius: var(--radius-sm);
th {
font-weight: 600;
@@ -680,33 +682,33 @@ a,
td,
th {
padding: 0.4rem 0.85rem;
- border: 0.05rem solid var(--color-table-border);
+ border: 0.05rem solid var(--color-button-bg);
}
tr:nth-child(2n) {
- background-color: var(--color-table-alternate-row);
+ background-color: var(--color-accent-contrast);
}
th:first-of-type {
- border-top-left-radius: var(--size-rounded-sm);
+ border-top-left-radius: var(--radius-sm);
}
th:last-of-type {
- border-top-right-radius: var(--size-rounded-sm);
+ border-top-right-radius: var(--radius-sm);
}
tr:last-of-type td:first-of-type {
- border-bottom-left-radius: var(--size-rounded-sm);
+ border-bottom-left-radius: var(--radius-sm);
}
tr:last-of-type td:last-of-type {
- border-bottom-right-radius: var(--size-rounded-sm);
+ border-bottom-right-radius: var(--radius-sm);
}
}
details {
border: 0.15rem solid var(--color-button-bg);
- border-radius: var(--size-rounded-sm);
+ border-radius: var(--radius-sm);
padding: 0.5rem 0.5rem 0;
summary {
@@ -715,10 +717,10 @@ a,
padding: 0.5rem 0.8rem;
cursor: pointer;
background-color: var(--color-button-bg);
- border-radius: var(--size-rounded-xs);
+ border-radius: var(--radius-xs);
&:hover {
- background-color: var(--color-button-bg-hover);
+ filter: brightness(0.85);
}
}
@@ -727,7 +729,7 @@ a,
summary {
margin-bottom: 0.5rem;
- border-radius: var(--size-rounded-xs) var(--size-rounded-xs) 0 0;
+ border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}
> :last-child:not(summary) {
@@ -763,9 +765,7 @@ select {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
- background: url(http://dropdown/arrow/url/) no-repeat;
- background-position: right center;
- background-color: #cccccc;
+ background: #cccccc url(http://dropdown/arrow/url/) no-repeat right center;
color: #000000;
border: 1px solid #000000;
}
diff --git a/lib/assets/styles/defaults.scss b/lib/assets/styles/defaults.scss
index 297a307e..2a429269 100644
--- a/lib/assets/styles/defaults.scss
+++ b/lib/assets/styles/defaults.scss
@@ -172,3 +172,18 @@ button {
transform: none !important;
}
}
+
+h1 {
+ color: var(--color-contrast);
+}
+
+h2 {
+ margin-top: 0;
+ margin-bottom: 1rem;
+ color: var(--color-contrast);
+}
+
+h3 {
+ margin-block: var(--gap-md) var(--gap-md);
+ color: var(--color-contrast);
+}
diff --git a/package.json b/package.json
index 5ea52f4b..6f2cafe8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "omorphia",
"type": "module",
- "version": "0.4.2",
+ "version": "0.4.3",
"files": [
"dist"
],