mirror of
https://github.com/kuohuanhuan/x-markdown-css.git
synced 2024-11-25 06:18:19 +00:00
Compare commits
2 Commits
2b9619f2e2
...
v0.0.5
Author | SHA1 | Date | |
---|---|---|---|
3e1fb0425a
|
|||
e12c48b107
|
@ -20,11 +20,13 @@ You can use `x-markdown-css` with:
|
||||
|
||||
1. A CDN service:
|
||||
|
||||
- UNPKG: `https://unpkg.com/x-markdown-css@latest`
|
||||
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css@latest`
|
||||
- UNPKG: `https://unpkg.com/x-markdown-css`
|
||||
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css`
|
||||
- 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)**!*
|
||||
|
||||
2. A CSS (with Node.js) / Sass / SCSS project:
|
||||
> *ps. Note that `bundle.css` without `.min` stands for unminified version.*
|
||||
|
||||
1. A CSS (with Node.js) / Sass / SCSS project:
|
||||
|
||||
First, install it with NPM ([PNPM](https://pnpm.io) or [Yarn](https://yarnpkg.com) also works):
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@use 'scss/vars';
|
||||
@use 'scss/vars' as *;
|
||||
|
||||
@use 'scss/markdown';
|
||||
@use 'scss/prose';
|
||||
@import 'scss/markdown';
|
||||
@import 'scss/prose';
|
||||
|
@ -1,12 +1,13 @@
|
||||
.markdown-body {
|
||||
color: var(--xm-c-regular);
|
||||
font-family: var(--xm-font-display) !important;
|
||||
pre:not(.shiki) {
|
||||
pre:not(.shiki, .highlight) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
.shiki {
|
||||
.shiki,
|
||||
.highlight {
|
||||
margin: .5rem 0;
|
||||
font-size: 1.05rem;
|
||||
font-family: var(--xm-font-code) !important;
|
||||
|
@ -1,9 +1 @@
|
||||
@use 'title';
|
||||
@use 'text';
|
||||
@use 'link';
|
||||
@use 'code';
|
||||
@use 'quote';
|
||||
@use 'figure';
|
||||
@use 'list';
|
||||
@use 'table';
|
||||
@use 'media';
|
||||
@import 'title', 'text', 'link', 'code', 'quote', 'figure', 'list', 'table', 'media';
|
||||
|
@ -1,8 +1,6 @@
|
||||
@use 'sass:meta';
|
||||
|
||||
@use 'partials/container';
|
||||
@use 'partials/container' as *;
|
||||
|
||||
.prose {
|
||||
@include container.container;
|
||||
@include meta.load-css('partials/all');
|
||||
@include container;
|
||||
@import 'partials/all';
|
||||
}
|
||||
|
@ -13,6 +13,6 @@ $quote-border: hsla(0deg 0% 50% / .3);
|
||||
$thead-border: #d1d5db;
|
||||
$tr-border: #e5e7eb;
|
||||
|
||||
// Shiki (code highlighting)
|
||||
// Shiki (code highlight)
|
||||
$shiki-light: #f8f8f8;
|
||||
$shiki-dark: #0e0e0e;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@use 'sass:meta';
|
||||
@use 'sass:meta' as *;
|
||||
|
||||
@use 'variables/constants';
|
||||
@use 'variables/colors';
|
||||
@ -7,20 +7,20 @@
|
||||
@use 'variables/modes/dark';
|
||||
|
||||
:root {
|
||||
@each $name, $val in meta.module-variables('constants') {
|
||||
@each $name, $val in module-variables('constants') {
|
||||
--xm-#{$name}: #{$val};
|
||||
}
|
||||
@each $name, $val in meta.module-variables('colors') {
|
||||
@each $name, $val in module-variables('colors') {
|
||||
--xm-c-#{$name}: #{$val};
|
||||
}
|
||||
}
|
||||
.markdown-body {
|
||||
@each $name, $val in meta.module-variables('light') {
|
||||
@each $name, $val in module-variables('light') {
|
||||
--xm-c-#{$name}: #{$val};
|
||||
}
|
||||
}
|
||||
.dark .markdown-body {
|
||||
@each $name, $val in meta.module-variables('dark') {
|
||||
@each $name, $val in module-variables('dark') {
|
||||
--xm-c-#{$name}: #{$val};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user