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

@lonelyplanet/common-css

v1.1.1

Published

common-css provides a global stylesheet to be used across lonelyplanet.com

Downloads

6

Readme

common-css

This package provides a common.css file that sets the global styles for a front-end application on lonelyplanet.com.

The stylesheet:

  • uses @font-face to set custom web fonts Benton Sans and Miller Daily
  • sets box-sizing: border-box to normalize the box model
  • includes normalize.css and a custom reset to create a baseline across multiple browsers
  • contains some global helper classes
  • provides some default typographic styling
  • includes print styles

Browser support

Last 3 versions and IE 11 via the browserlist config.

Installation

npm install @lonelyplanet/common-css

Usage

For now, the recommended way to use this package is to include it in a Webpack build.

@import "@lonelyplanet/common-css/dist/common.css";

Scripts

The only script you’ll need to run is build.

| Script | Description | | ------ | ----------- | | start | Runs the package in “development mode”; opens the preview HTML file and runs Webpack with the --watch flag to recompile as changes are made, however, the HTML must be manually refreshed after each change | | build | Compiles the CSS file to the dist directory | | preview | Compiles the CSS file and opens an HTML file where the styles can be previewed; this script is run as part of the start script | | stylelint | Lints the CSS source files | | test | Runs the stylelint script | | prepublishOnly | Runs the build script before the package is prepared and packed, only on npm publish | | precommit | Runs the test script before a commit is made |

Dependencies

| Package | Description | | ------- | ----------- | | @lonelyplanet/design-tokens | This package contains the design tokens (styles) used across Lonely Planet’s digital products; it’s part of the Backpack monorepo. | | @lonelyplanet/browserslist-config | This package contains information about Lonely Planet’s browser support for Autoprefixer. | | normalize.css | Normalize.css makes browsers render all elements more consistently and in line with modern standards. It is used in place of a full CSS reset. | | PostCSS | PostCSS is a tool for transforming styles with JS plugins. Plugins include postcss-calc, postcss-custom-media, postcss-custom-properties and postcss-import. The separate CLI tool for PostCSS is also installed. | | Autoprefixer | Autoprefixer is a PostCSS plugin that parses CSS and adds vendor prefixes to CSS rules using values from the Can I Use website. | | cssnano | cssnano is CSS minifier built on top of the PostCSS ecosystem. | | Webpack | Webpack is a module bundler for the web. Loaders include css-loader, extract-text-webpack-plugin, postcss-loader and style-loader. The separate CLI tool for Webpack is also installed. | | Stylelint | Stylelint is a linter tool for CSS files; it has been configured to use stylelint-config-standard. | | pre-commit | pre-commit automatically installs pre-commit hooks which runs npm scripts before a commit is made. |

Contributing

Please read the contributing document before writing any code.

License

MIT License