npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

html-markdown.css

v1.0.5

Published

An HTML-to-Markdown CSS framework

Readme

html-markdown.css

This simple CSS library provides a basic stylesheet making simple HTML elements look like Markdown.

It uses CSS ::before and ::after pseudo-elements to add the Markdown-like syntax around the elements.

Everything can be customized with CSS variables. Dark and light modes are supported by default thanks to the light-dark() CSS function and the color-scheme property.

Changelog is available here.

Preview

Preview of html-markdown.css

Usage

Load the html-markdown.css stylesheet in your HTML file.

<!-- Minified version (2,25ko gzip, 3,87 Ko) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/html-markdown.css@latest/build/html-markdown.min.css" />

<!-- Unminified version (2,35ko gzip, 4,58ko) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/html-markdown.css@latest/build/html-markdown.css" />

Wrap your HTML iside a main element if you want to contain your content inside a centered layout.

<main>
  <h1>Title</h1>
  <p>This is a paragraph with <strong>bold</strong> and <em>italic</em> text.</p>
  <!-- ... -->
</main>

Customization

You can customize the styles by overriding the CSS variables provided by html-markdown.css.

Here are all the available CSS variables:

:root {
  --md-layout-width: 800px; /* Width of the main content area */
  --md-layout-padding: 20px; /* Padding around the main content area */
  --md-spacing: 1em; /* Spacing between elements */

  /* Font */
  --md-font-family: monospace; /* Font family for the content */
  --md-font-size: 16px; /* Base font size */
  --md-font-weight: 400; /* Base font weight */
  --md-line-height: 1.65; /* Base line height for better readability */

  /* Colors */
  --md-background-light: #f8f8f2; /* Light background color */
  --md-background-dark: #1e1e1e; /* Dark background color */
  --md-background: light-dark(
    var(--md-background-light),
    var(--md-background-dark)
  ); /* Background color that adapts to light/dark mode */
  --md-foreground-light: #1e1e1e; /* Light foreground color */
  --md-foreground-dark: #f8f8f2; /* Dark foreground color */
  --md-foreground: light-dark(
    var(--md-foreground-light),
    var(--md-foreground-dark)
  ); /* Foreground color that adapts to light/dark mode */
  --md-grey: #7e7e7e; /* Neutral grey color */
  --md-red: #e78482; /* Red color */
  --md-green: #8fc8bb; /* Green color */
  --md-yellow: #e0b972; /* Yellow color */
  --md-orange: #ffb374; /* Orange color */
  --md-blue: #6db3ce; /* Blue color */
  --md-magenta: #ad82cb; /* Magenta color */
  --md-cyan: #2fc2c3; /* Cyan color */

  /* Content color customization */
  --md-heading-color: var(--md-grey); /* Color for headings */
  --md-strikethrough-color: var(--md-grey); /* Color for strikethrough text */
  --md-code-color: var(--md-grey); /* Color for inline code */
  --md-blockquote-color: var(--md-grey); /* Color for blockquotes */
  --md-bold-color: var(--md-magenta); /* Color for bold text */
  --md-italic-color: var(--md-cyan); /* Color for italic text */
  --md-anchor-color: var(--md-yellow); /* Color for anchor links */