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

@younestouati/playing-cards-standard-deck

v6.0.1

Published

JSON representing standard deck of playing cards (base64 encoded svgs)

Downloads

8

Readme

Forked version of Responsive Playing Cards. Cards have been base64 encoded and are exported as svg - and responsiveness disabled. Joker added as well.

Base64 encoding makes the the cards larger (in terms of kb), but makes them more suitable for use in Safari, that otherwise tends to 'flash' if an element with an svg is (re)mounted in the DOM.

Responsive Playing Cards

tldr; Responsive SVG playing cards. Most cards ~2K, picture cards are ~65k. With gzip, they’re about half that. When rendered <= 75px wide, they switch to a simpler layout for readability.

LGPL licensed.

Introduction

This is a deck of SVG playing cards which was created for a client project in January 2015. The project is targeted specifically at Chromium, so the cards may not work on other platforms (pull requests welcomed).

The cards are based on the deck produced by Chris Aguilar, hosted over at Google Code, with the exception of the Ace of Spades, which was taken from Byron Knoll’s public domain cards also at Google Code.

What do you get?

Each card has been hand-optimized to reduce the file size as far as possible, by re-using and transforming paths. This takes the size of a normal card down from ~6.5k to about ~2.5k (~1.7k minified, 800b minified + zipped). Picture cards are obviously more complex, at ~90k (~65k minified, ~30k minified + zipped).

200px|160px|120px|80px|40px|30px|20px -----|-----|-----|----|----|----|----- |||||||

The cards also have embedded media queries, which display a simpler layout if the card is scaled below 75px wide.

Platforms

The cards are specified in SVG Tiny 1.2, and have been tested on Chrome 40, Firefox 35, Safari 8, Mobile Safari 8, Opera 11, Opera Classic for Android, Windows Phone 8.1, Internet Explorer 11 (Windows 7) and Internet Explorer 11 (Windows RT 8.1).

Bugs

The “mini” versions of the cards won’t render on Firefox for Android, Mobile Safari 6, and Android Browser 4.1, because they don’t support media queries inside SVG. But the big cards are displayed instead, so at least it fails nicely!

Credits

The original cards were created by Chris Aguilar. The Ace of Spades was by Byron Knoll. They were optimized by Mike Hall with help from Warren Lockhart.

License

LGPL 3.0