@washingtonpost/icon-tokens

1.9.1 • Public • Published

Icons

We have three icon sizes, 16, 24, and 32. Some icons have fill rules. All have a single path.

Contributing

  1. The designer should provide the correct sizes and files needed for all three sizes of icons.
  2. Check to make sure each icon is on one path.
  3. Optimized the SVG. A good tool for this is svgomg. The default setting of SVGOMG should do most of the work, but check precision to make sure the SVG has the smallest file size without compromising path accuracy,
  4. After optimization add the path data object to token.js. The icon should have a name from the designer. That should be the name of the object. Order alphabetically.
  5. Be sure to add each size path data and the fill-rule for the icon (ex: evenodd, nonzero)
  6. Create a PR, review dev, and design, get approval!
  7. Work with a site component or design tokens contributor to cut a release.
  8. If you’re importing icons via site-components, drop a note in the slack room #site-components to bump the design token package and make a release with your icons.

Build Process v1

  1. We generate SVG files from the ./tokens.json configuration file. This file was moved over from site-components. It's part of a phased plan to improve and streamline our icons. Below is an example of the HTML of the SVG.
<svg
  className="fill-current icon-add icon-size-16"
  width="16"
  height="16"
  view-box="0 0 16 16"
  xmlns="http://www.w3.org/2000/svg"
>
  <title>add</title>
  <path d="M7 7V1h2v6h5.929v2H9v5.929H7V9H1V7h6z" fillRule="nonzero" />
</svg>
  1. They are organized into directories by their size (16, 24, 32). i.e. ./dist/16/add.svg
  2. We also copy over the ./icons.json file to let any consumer of this package transform their icons in any way they see fit.

The generated SVG files do not contain fill colors. We recommend using CSS's currentColor property. We added three helper classes to the SVG: fill-current, icon-${name}, and icon-${size}.

Readme

Keywords

none

Package Sidebar

Install

npm i @washingtonpost/icon-tokens

Weekly Downloads

1,370

Version

1.9.1

License

ISC

Unpacked Size

181 kB

Total Files

214

Last publish

Collaborators

  • vladimirjv
  • catherine1234
  • mfernanda-sosa
  • dev-javu
  • vviswa
  • netolm-wp
  • yeswapo
  • harmanwapo
  • lpadillac4s
  • rjaya
  • granadoslopez
  • cashack
  • courtneybeesch
  • joshhoegen
  • thiago_srpt
  • alefkow
  • michelle_mark
  • ysmilde
  • shrddhawashpost
  • hanj.washpost
  • karenwang
  • carsonology
  • yuyanlei
  • dbnapp
  • colemanc4
  • vpenney
  • stevethedev
  • dkao
  • elenalacey
  • zhoyoyo
  • dwuandjune
  • fransandi
  • ashendruk
  • michaeldomine
  • mark-a-wapo
  • lenacohen
  • chris93007
  • sabrinamochi
  • jorgemhc-dev
  • carlyn
  • dgreen19
  • josephjames
  • niko_kom
  • nicrocs
  • avalbuena
  • sotojl
  • haileyhaymond
  • lukaskeelwapo
  • timborisenko
  • bantupallik
  • kt-prry
  • jesse.post.washpo
  • threeteaspoons
  • emilycsabens
  • luciovilla
  • tam.steph
  • agillespie
  • ani512
  • vonoehsene
  • emmakumer
  • aggyjlee
  • lavanderoi
  • emily.eng
  • lmelgar
  • sadbumblebee
  • janicekchen
  • jamelhendricks
  • ryanpicou
  • crunchwrap78
  • welchk
  • val-l-hosler
  • nick.mourtoupalas
  • benjaki
  • battand
  • jon.rosado
  • jacknugent27
  • asamireissa
  • courth
  • mahig
  • jchaskell
  • lorenzog
  • ln-washpost
  • stericson
  • talpert022
  • gengel
  • tuckabelle
  • nauticaharvin
  • aadittambe
  • natalievineberg
  • krbrooks
  • katty-huertas
  • mariaalconadabrooks
  • juniorh28
  • atomictangerine
  • emlorraine
  • helmsc
  • tritico
  • pranavganore
  • danacasidy
  • terrywp
  • ksemanur8
  • dreyvitser
  • mvonesh
  • chelseaconrad
  • arnolda-wp
  • hermionewy
  • wp-aberg
  • sheamus-hei
  • haysstephanie
  • broadwaterne
  • andrevinc
  • kat-alo
  • daniellersaul
  • stevefuenteswp
  • rekha26
  • marcnahed
  • amiemunoz
  • chloelangston
  • martinezy
  • seanwapo
  • ducroquet
  • jakekara
  • jtotoole
  • mjperales
  • arturgalocha
  • ebgranger
  • ramyalamati
  • adamsrobw
  • luke.connors
  • wrneff
  • mcdoh
  • floresa
  • taliatrackim
  • lennybronner
  • bitsoglass
  • it_procurement
  • davidchaiwapo
  • maddoxnelson
  • juliebacon
  • stephanie.clark
  • jasonvuong
  • jkoo87
  • kankelcr
  • gregoryauld2014
  • uncompiled
  • jbrown4
  • scarothers
  • khan.salauddin
  • rowhawn
  • subs-npm-builder
  • nealhumphreywapo
  • ashlynstill
  • ptnielsen
  • leslie-s
  • courtney-kan
  • kevin.schaul
  • jakecrump
  • macallah
  • jmuyskens
  • madisonwalls
  • brianaa
  • dsantamarina
  • artmsilva
  • ashtol
  • sberhanu
  • jjalcantara
  • alyssa.fowers
  • joemfox
  • reubenfb
  • calcantara
  • adrianblanco
  • chiquiesteban
  • iuraizee
  • bdgross
  • ulmonica
  • bmferrill
  • dankeating
  • emamd
  • timmeko
  • kevinuhrmacher
  • shellytan
  • harrystevens
  • chrisrukan
  • allisonnmann
  • aaronsteckelberg
  • shruthagandla
  • braforda
  • hannahmahon
  • adityajain15
  • linorabolini
  • anthonyjpesce
  • 1313davidlee
  • kate.rabinowitz
  • fontc
  • cecepascual
  • vsingarayar
  • aramzs
  • ruxk
  • nader_heidari
  • thompsond3
  • tylerremmel
  • tmac0201
  • joemoore-post
  • ealvarez79
  • hdormido
  • sgpotts
  • yutaochen
  • nwalker_wp
  • apbest
  • briannaschroer
  • shikha-sub
  • naema
  • chloemeister
  • julia.ledur
  • solomonsscott
  • betchavarria
  • eewright
  • nickkirkpatrick
  • trann_wapo
  • tobefrankhj
  • tierneyl
  • essiekim
  • sergio.pecanha
  • meganwalter
  • alyssabartuch
  • alexisbarnes
  • dmoriarty6
  • mokhtar.ali
  • dpham5
  • klimenkovd
  • davisshaver
  • aaronbrezel
  • moodypaige.e
  • kastningj