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

Compare commits

...

10 Commits

11 changed files with 33 additions and 25 deletions

View File

@ -33,7 +33,7 @@ jobs:
uses: TheDoctor0/zip-release@0.7.1
with:
type: tar
path: dist/*
path: dist/
filename: build.tar.gz
# Step VI
- name: Publish to NPM Registry

View File

@ -20,12 +20,10 @@ You can use `x-markdown-css` with:
1. A CDN service:
- UNPKG: `https://unpkg.com/x-markdown-css@latest/dist/bundle.min.css`
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css@latest/dist/bundle.min.css`
- UNPKG: `https://unpkg.com/x-markdown-css@latest`
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css@latest`
- CDNJS: *Coming soon. **Waiting for you to make `x-markdown-css` [popular enough](https://github.com/cdnjs/packages/blob/master/CONTRIBUTING.md#policy-rules-and-guidelines)**!*
> *ps. Note that `bundle.css` without `.min` stands for unminified version.*
2. A CSS (with Node.js) / Sass / SCSS project:
First, install it with NPM ([PNPM](https://pnpm.io) or [Yarn](https://yarnpkg.com) also works):

2
package-lock.json generated
View File

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

View File

@ -1,6 +1,6 @@
{
"name": "x-markdown-css",
"version": "0.0.2",
"version": "0.0.5",
"description": "A simple and customizable markdown CSS stylesheet for everyone.",
"keywords": [
"markdown",
@ -16,8 +16,9 @@
"article",
"documentation"
],
"sass": "src/index.scss",
"main": "dist/bundle.min.css",
"style": "dist/bundle.min.css",
"sass": "src/index.scss",
"repository": {
"type": "git",
"url": "git+https://github.com/kuohuanhuan/x-markdown-css.git"

View File

@ -1,4 +1,4 @@
@use 'scss/vars' as *;
@use 'scss/vars';
@import 'scss/markdown';
@import 'scss/prose';
@use 'scss/markdown';
@use 'scss/prose';

View File

@ -1,13 +1,12 @@
.markdown-body {
color: var(--xm-c-regular);
font-family: var(--xm-font-display) !important;
pre:not(.shiki, .highlight) {
pre:not(.shiki) {
margin: 0;
padding: 0;
background: transparent;
}
.shiki,
.highlight {
.shiki {
margin: .5rem 0;
font-size: 1.05rem;
font-family: var(--xm-font-code) !important;

View File

@ -1 +1,9 @@
@import 'title', 'text', 'link', 'code', 'quote', 'figure', 'list', 'table', 'media';
@use 'title';
@use 'text';
@use 'link';
@use 'code';
@use 'quote';
@use 'figure';
@use 'list';
@use 'table';
@use 'media';

View File

@ -1,6 +1,8 @@
@use 'partials/container' as *;
@use 'sass:meta';
@use 'partials/container';
.prose {
@include container;
@import 'partials/all';
@include container.container;
@include meta.load-css('partials/all');
}

View File

@ -13,6 +13,6 @@ $quote-border: hsla(0deg 0% 50% / .3);
$thead-border: #d1d5db;
$tr-border: #e5e7eb;
// Shiki (code highlight)
// Shiki (code highlighting)
$shiki-light: #f8f8f8;
$shiki-dark: #0e0e0e;

View File

@ -1,7 +1,7 @@
// Font stack
$font-sans: 'Open Sans', 'Inter', 'Roboto', 'Helvetica', 'Arial', 'Sarasa Gothic TC', 'Sarasa Gothic SC', 'Noto Sans TC', 'Noto Sans SC', 'Microsoft JhengHei', 'Microsoft YaHei', -apple-system, sans-serif;
$font-serif: 'Merriweather', 'Georgia', 'Times New Roman', 'Times', 'Source Han Serif Traditional Chinese', 'Source Han Serif Simplified Chinese', 'Noto Serif TC', 'Noto Serif SC', serif;
$font-mono: 'DM Mono', 'Fira Code', 'Jetbrains Mono', 'Input Mono', 'Menlo', 'MesloLGS NF', 'Ubuntu', monospace;
$font-mono: 'DM Mono', 'Fira Code', 'Jetbrains Mono', 'Input Mono', 'Menlo', 'MesloLGS NF', 'Ubuntu', 'Sarasa Gothic TC', 'Sarasa Gothic SC', monospace;
// Font defaults
$font-display: var(--xm-font-sans);

View File

@ -1,4 +1,4 @@
@use 'sass:meta' as *;
@use 'sass:meta';
@use 'variables/constants';
@use 'variables/colors';
@ -7,20 +7,20 @@
@use 'variables/modes/dark';
:root {
@each $name, $val in module-variables('constants') {
@each $name, $val in meta.module-variables('constants') {
--xm-#{$name}: #{$val};
}
@each $name, $val in module-variables('colors') {
@each $name, $val in meta.module-variables('colors') {
--xm-c-#{$name}: #{$val};
}
}
.markdown-body {
@each $name, $val in module-variables('light') {
@each $name, $val in meta.module-variables('light') {
--xm-c-#{$name}: #{$val};
}
}
.dark .markdown-body {
@each $name, $val in module-variables('dark') {
@each $name, $val in meta.module-variables('dark') {
--xm-c-#{$name}: #{$val};
}
}