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",
"version": "0.1.2",
"version": "0.1.4",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

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

View File

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

View File

@ -5,9 +5,15 @@ a {
text-decoration: none;
transition: border .3s ease-in-out;
code {
color: inherit;
color: var(--xm-c-deep);
}
&:hover {
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,
video {
width: 100%;
margin-top: 2rem;
margin-bottom: 2rem;
img {
display: block;
max-width: 92%;
margin: 1rem auto;
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;
line-height: 1.5rem;
quotes: '\201C''\201D''\2018''\2019';
opacity: .8;
opacity: .75;
p {
&:first-of-type::before {
content: open-quote;

View File

@ -1,17 +1,17 @@
table {
width: 100%;
overflow: auto;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
th,
td {
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;
}
tbody > tr {
tbody tr {
&:hover {
background-color: var(--xm-c-shallowest);
}

View File

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

View File

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