1
0
mirror of https://github.com/kuohuanhuan/x-markdown-css.git synced 2024-11-25 06:18:19 +00:00

Compare commits

...

12 Commits

9 changed files with 40 additions and 21 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "x-markdown-css", "name": "x-markdown-css",
"version": "0.1.2", "version": "0.1.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {

View File

@ -1,6 +1,6 @@
{ {
"name": "x-markdown-css", "name": "x-markdown-css",
"version": "0.1.2", "version": "0.1.4",
"description": "A simple and customizable markdown CSS stylesheet for everyone.", "description": "A simple and customizable markdown CSS stylesheet for everyone.",
"keywords": [ "keywords": [
"markdown", "markdown",

View File

@ -3,7 +3,7 @@ figure {
margin-bottom: 2rem; margin-bottom: 2rem;
figcaption { figcaption {
margin-top: .875rem; margin-top: .875rem;
color: var(--xm-c-border-rev); color: var(--xm-c-shallow);
font-size: .875rem; font-size: .875rem;
line-height: 1.45; line-height: 1.45;
} }

View File

@ -5,9 +5,15 @@ a {
text-decoration: none; text-decoration: none;
transition: border .3s ease-in-out; transition: border .3s ease-in-out;
code { code {
color: inherit; color: var(--xm-c-deep);
} }
&:hover { &:hover {
border-bottom: 1px solid var(--xm-c-regular); border-bottom: 1px solid var(--xm-c-regular);
} }
&:not([href]) {
border-bottom: none;
color: inherit;
font-weight: normal;
transition: none;
}
} }

View File

@ -1,6 +1,17 @@
img, img {
video { display: block;
width: 100%; max-width: 92%;
margin-top: 2rem; margin: 1rem auto;
margin-bottom: 2rem; border-radius: .2rem;
}
video {
margin: auto;
}
iframe {
display: flex;
width: 92%;
margin: auto;
border-radius: .2rem;
} }

View File

@ -9,7 +9,7 @@ q {
font-style: italic; font-style: italic;
line-height: 1.5rem; line-height: 1.5rem;
quotes: '\201C''\201D''\2018''\2019'; quotes: '\201C''\201D''\2018''\2019';
opacity: .8; opacity: .75;
p { p {
&:first-of-type::before { &:first-of-type::before {
content: open-quote; content: open-quote;

View File

@ -1,17 +1,17 @@
table { table {
width: 100%;
overflow: auto; overflow: auto;
width: 100%;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse; border-collapse: collapse;
th, th,
td { td {
padding: 6px 13px; padding: 6px 13px;
border: 1.5px solid var(--xm-c-border-rev); border: 1.5px solid var(--xm-c-border-table);
} }
thead > tr > th { thead th {
font-weight: 700; font-weight: 700;
} }
tbody > tr { tbody tr {
&:hover { &:hover {
background-color: var(--xm-c-shallowest); background-color: var(--xm-c-shallowest);
} }

View File

@ -1,9 +1,10 @@
// Dark mode
$shallowest: #212121; $shallowest: #212121;
$shallower: #555; $shallower: #555;
$shallow: #777; $shallow: #777;
$regular: #bbb; $regular: #bbb;
$deep: #ddd; $deep: #ddd;
$deeper: #fff; $deeper: #fff;
$border: hsla(0deg 0% 75% / .35);
$border: hsla(0deg 0 75% / .3); $border-table: hsla(0deg 0% 40% / .75);
$border-rev: hsla(0deg 0 40% / .75);

View File

@ -1,9 +1,10 @@
$shallowest: #f0f0f0; // Light mode
$shallowest: #f8f8f8;
$shallower: #ddd; $shallower: #ddd;
$shallow: #bbb; $shallow: #bbb;
$regular: #555; $regular: #555;
$deep: #222; $deep: #222;
$deeper: #000; $deeper: #000;
$border: hsla(0deg 0% 50% / .35);
$border: hsla(0deg 0 25% / .3); $border-table: hsla(0deg 0% 50% / .5);
$border-rev: hsla(0deg 0 50% / .5);