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 🙏

© 2024 – Pkg Stats / Ryan Hefner

plasttic-reset

v2.1.0

Published

Plasttic CSS Reset: A CSS Reset styling for browser consistency with best practices defaults

Downloads

223

Readme

Plasttic

Plasttic CSS Reset

A CSS Reset styling for browser consistency with best practices defaults.

npmNPM DownloadsLICENSETwitter Follow


About

Plasttic CSS Reset creates a clean and stripped foundation to develop an accessible, responsive and robust interface by applying your design system on a blank canvas.

  • Removes browser inconsistencies.
  • Resets properties for easier and more predictable styling results.
  • Improves accessibility through best practices values.
  • Uses :where() to allow overrides without specificity issues.
  • Offers custom properties to change some of the default values.

Demo page

  • https://codepen.io/tojeiro/pen/mdzYVjP?editors=1100

Start

From CDN (HTML page)

  <link rel="stylesheet" href="https://unpkg.com/[email protected]" />

From CDN (CSS file)

@import "https://unpkg.com/[email protected]";

Installation

:warning: NOTE: Installing is not recommended for production. Properties can be added or modified in later versions. If you update the project dependencies, the new version can break your layout.

  1. Install package
npm i plasttic-reset
  1. Import in the CSS file
@import "plasttic-reset";

Download

  1. Download Zip
https://github.com/tojeiro-me/Plasttic-reset/archive/refs/heads/master.zip
unzip file
  1. In the HTML page (no automatic update)
  <link rel="stylesheet" href="/path-to-file/reset.min.css" />

Check the CHANGELOG for version changes.


Customize

The typography default values are based on the W3C recommendations. However he fonts used and their sizes can have a considerable impact.

The focus color is intended for users navigating using the keyboard or assistive technologies.

This properties can be changed globally - using the :root pseudo-class - or scoped - inside the tag or class in which you want to override the default values.

  :root {
      /* Focus style color */
      --ptt-reset-focus-color: hsl(26 86% 61%); /* replace with brand/accent color, ... */

      /* The next properties best values depends on the font used */
      --ptt-reset-body-line-height: 1.45; /* 1.4 to 1.6 */
      --ptt-reset-body-width: 65ch; /* 50ch to 80ch - h5, h6, p, li */
      --ptt-reset-body-spacing: 0.012em; /* letter spacing */
      --ptt-reset-header-line-height: 1.1; /* 1 to 1.2 - h1, h2, h3, h4 */
      --ptt-reset-h1-width: 30ch;
      --ptt-reset-h2-width: 35ch;
      --ptt-reset-h3-width: 45ch;
      --ptt-reset-h4-width: 55ch;

      /* Better spacing between content */
      --ptt-reset-content-space-top: 0.5em;
      --ptt-reset-header-space-bottom: 0.75em; /* h1, h2, h3, h4 */
      --ptt-reset-header-space-top: 2em; /* h2, h3, h4 -- h1: not inside header with role=banner */
  }

Notes

Styling file upload button

input[type='file']::-webkit-file-upload-button,
input[type='file']::file-selector-button {
  /* styling properties */
}

Lists

Apply the role=list when styling lists (ul/ol) with list-style=none so it doesn't loose its semantic value on safari.

ul {
  list-style: none;
}

<ul role="list">

Developer

  1. Repository
  • https://github.com/tojeiro-me/Plasttic-reset
  1. CSS Files:
  • Minified: dist/reset.min.css
  • Source: src/reset.css
  1. Config files
  • Supported Browsers: .browserslistrc (https://browsersl.ist/)
  • PostCSS preset-env stage: postcss.config.cjs (https://github.com/csstools/postcss-preset-env#stage)
  1. Repository
  • Clone repository

git clone https://github.com/tojeiro-me/Plasttic-reset.git
  • Install dependencies

npm install
  • Parse and Minimize source to dist (reset.min.css)

npm run dist

Inspired by the work of:

  • Andy Bell @piccalilli_
  • https://piccalil.li/blog/a-modern-css-reset/
  • Comeau @JoshWComeau
  • https://www.joshwcomeau.com/css/custom-css-reset/
  • Adam Argyle @argyleink
  • https://codepen.io/argyleink/pen/KKvRORE
  • Ahmad Shadeed @shadeed9
  • https://defensivecss.dev/

"Credit where credit is due!"

Follow


TwitterMastodonGithub


License

MIT


Plasttic