Compare commits

...
5 Commits
9 changed files with 30 additions and 23 deletions
+3 -5
View File
@@ -20,13 +20,11 @@ You can use `x-markdown-css` with:
1. A CDN service: 1. A CDN service:
- UNPKG: `https://unpkg.com/x-markdown-css` - UNPKG: `https://unpkg.com/x-markdown-css@latest`
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css` - 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)**!* - 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:
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): First, install it with NPM ([PNPM](https://pnpm.io) or [Yarn](https://yarnpkg.com) also works):
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "x-markdown-css", "name": "x-markdown-css",
"version": "0.0.3", "version": "0.0.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "x-markdown-css", "name": "x-markdown-css",
"version": "0.0.3", "version": "0.0.5",
"description": "A simple and customizable markdown CSS stylesheet for everyone.", "description": "A simple and customizable markdown CSS stylesheet for everyone.",
"keywords": [ "keywords": [
"markdown", "markdown",
+3 -3
View File
@@ -1,4 +1,4 @@
@use 'scss/vars' as *; @use 'scss/vars';
@import 'scss/markdown'; @use 'scss/markdown';
@import 'scss/prose'; @use 'scss/prose';
+2 -3
View File
@@ -1,13 +1,12 @@
.markdown-body { .markdown-body {
color: var(--xm-c-regular); color: var(--xm-c-regular);
font-family: var(--xm-font-display) !important; font-family: var(--xm-font-display) !important;
pre:not(.shiki, .highlight) { pre:not(.shiki) {
margin: 0; margin: 0;
padding: 0; padding: 0;
background: transparent; background: transparent;
} }
.shiki, .shiki {
.highlight {
margin: .5rem 0; margin: .5rem 0;
font-size: 1.05rem; font-size: 1.05rem;
font-family: var(--xm-font-code) !important; font-family: var(--xm-font-code) !important;
+9 -1
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';
+5 -3
View File
@@ -1,6 +1,8 @@
@use 'partials/container' as *; @use 'sass:meta';
@use 'partials/container';
.prose { .prose {
@include container; @include container.container;
@import 'partials/all'; @include meta.load-css('partials/all');
} }
+1 -1
View File
@@ -13,6 +13,6 @@ $quote-border: hsla(0deg 0% 50% / .3);
$thead-border: #d1d5db; $thead-border: #d1d5db;
$tr-border: #e5e7eb; $tr-border: #e5e7eb;
// Shiki (code highlight) // Shiki (code highlighting)
$shiki-light: #f8f8f8; $shiki-light: #f8f8f8;
$shiki-dark: #0e0e0e; $shiki-dark: #0e0e0e;
+5 -5
View File
@@ -1,4 +1,4 @@
@use 'sass:meta' as *; @use 'sass:meta';
@use 'variables/constants'; @use 'variables/constants';
@use 'variables/colors'; @use 'variables/colors';
@@ -7,20 +7,20 @@
@use 'variables/modes/dark'; @use 'variables/modes/dark';
:root { :root {
@each $name, $val in module-variables('constants') { @each $name, $val in meta.module-variables('constants') {
--xm-#{$name}: #{$val}; --xm-#{$name}: #{$val};
} }
@each $name, $val in module-variables('colors') { @each $name, $val in meta.module-variables('colors') {
--xm-c-#{$name}: #{$val}; --xm-c-#{$name}: #{$val};
} }
} }
.markdown-body { .markdown-body {
@each $name, $val in module-variables('light') { @each $name, $val in meta.module-variables('light') {
--xm-c-#{$name}: #{$val}; --xm-c-#{$name}: #{$val};
} }
} }
.dark .markdown-body { .dark .markdown-body {
@each $name, $val in module-variables('dark') { @each $name, $val in meta.module-variables('dark') {
--xm-c-#{$name}: #{$val}; --xm-c-#{$name}: #{$val};
} }
} }