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

@opengov/capital-style

v5.5.0-beta.2

Published

Design Tokens and Styles for the OpenGov Capital Design System.

Downloads

14,703

Maintainers

zacharyuanzacharyuanmkelkarmkelkarmicaeladeritomicaeladeritommagni-opengovmmagni-opengovmtorres-opengovmtorres-opengovcmarkegardogcmarkegardogamalakar4amalakar4carlosopengovcarlosopengoverikwilliamserikwilliamsirossa-ogirossa-ogklrpdxklrpdxoleksandr.morozoleksandr.morozhstockshstocksvfranchuk2vfranchuk2floppyears_opengovfloppyears_opengovameykhojeogameykhojeoggmuranogmuranoarpitopengovarpitopengovjsivitsjsivitshurbanoghurbanogwglasbrennerwglasbrennerog-ericlutleyog-ericlutleyanroutanroutmdempewolfmdempewolfgaryalgaryalmgruhlopengovmgruhlopengovtcraneogtcraneogbriandpeterson2000briandpeterson2000lcfitzglcfitzgjkoppelogjkoppelogogjkochogjkochamagnusonamagnusonjmankjmankrfbagang17rfbagang17fgogfgogpooja.guptapooja.guptaalinderalinderog-naterolingog-naterolingplussenhoffplussenhoffrboyle21rboyle21gasingh-oggasingh-ogbramosopengovbramosopengovbsand_ogbsand_ogkiliancsogkiliancsogmudassirmarediamudassirmarediasmishra1003smishra1003bahlrichsbahlrichsekrapflekrapflaahlrichsaahlrichsokotkevychokotkevychgvelascooggvelascoogbrian_opengovbrian_opengovprateek.sharmaprateek.sharmastephanienfsstephanienfssdrossetti_ogsdrossetti_ogdborysenko_opengovdborysenko_opengovbnanjappabnanjappaddepasqualeddepasqualeankur.singhalankur.singhalashutoshopengovashutoshopengovbsuryawanshi1bsuryawanshi1diegopamio-opengovdiegopamio-opengovmnetk3mnetk3akosiakevychakosiakevychjreandojreandomprykhodkomprykhodkortrigo-opengovrtrigo-opengovgezapetigezapetilawrenceatamlawrenceatammsorokovskyimsorokovskyikevinkelchenkevinkelchentwalshogtwalshogjoshuadotsonjoshuadotsonyueluyuelumattbangertmattbangertmkalinichenkomkalinichenkodamiansastredamiansastreshreyaguptashreyaguptasunnybsunnybtimmygrtimmygrjkirchhofjkirchhofaj11011aj11011oburdaoburdamanishpatidar01manishpatidar01manokovacsmanokovacsjohnconleyognpmjohnconleyognpmogisiddogisiddomarzionomarzionnoelparisinoelparisibfelacobfelacooleksiivoronenkooleksiivoronenkoandrewdavis12andrewdavis12dkrainesdkraineschaitanyapilkhanechaitanyapilkhanershinde21rshinde21sebastiancastano1sebastiancastano1alexfour18alexfour18nhommanhommashantanuk90shantanuk90pravin-patilpravin-patilgravitypersistsgravitypersistssarangwagh77sarangwagh77ychalyiychalyialokkumaropengovalokkumaropengovruthraruthraolokhoniaolokhoniasbradley_opengovsbradley_opengovmazcuetamazcuetajeremiahrhalljeremiahrhallopengov_devopengov_devmgibsonmgibsondarora14darora14jhounpmjhounpmalexanches1001alexanches1001rgebhardt-opengovrgebhardt-opengovnarayanansnnarayanansnjeastmanogjeastmanogsammiwei9119sammiwei9119jacobcdjacobcdjavierrivasjavierrivassalvares28salvares28viktor_lisniak_opengovviktor_lisniak_opengovartursynhalevychartursynhalevychivlavrikivlavrikvfranchukvfranchukabhishekdubeyonnpmabhishekdubeyonnpmjmo-opengovjmo-opengovjuliankosachjuliankosachnandreyevnandreyevppronppronnancytannancytanecschottecschottmtopallimtopalliaamartinezaamartinezmsilveiraogmsilveiraogaailenmaailenmaroca_opengovaroca_opengovadmitriyev143admitriyev143jakemasonogjakemasonogfmunozogfmunozogsadkingbillysadkingbillyrgopalfinrgopalfinnandreyev404nandreyev404utsav91utsav91vinayak-motevinayak-motemkathalemkathaleifelacoifelacoanupam-oganupam-ogrsawantrsawantopengov-superadminopengov-superadminvmerino04vmerino04chetan-xoriantchetan-xoriantrkalmarogrkalmarogogind-vupadhyayogind-vupadhyaytrothfeldtrothfeldfaculewisfaculewisogind-smoreogind-smorekk-ogkk-ognanaynaominanaynaomimhelgersonmhelgersonssulssulfmechettifmechettivinaybongalevinaybongaledanielt_ogdanielt_ogtozaisentozaisensatyajit987satyajit987tylerlinquatatylerlinquatapankajopengovpankajopengovrahulkaduskarrahulkaduskarogmsahuogmsahugguptaopengovgguptaopengovakshadapatilakshadapatilppathakopengovppathakopengovsbagulsbagulpkhairnarpkhairnarogind-amehtaogind-amehtadallasdeveloperjimdallasdeveloperjimpriyadarshnirosypriyadarshnirosykaditanikaditanigrevankargrevankarvbandalevbandalekredkarkredkardhanashri-joshidhanashri-joshizs441989zs441989thamptonthamptonodotsenkoodotsenko

Keywords

Readme

Capital Style

This package contains several resources that can be used for building applications with the visual style of Capital Design System.

Installing the package

You can add this package to your application by running: yarn add @opengov/capital-style

Tokens

Token Documentation

Tokens are individual variables that can be used to build styles, such as colors, fonts, or size units. We build in JSON under the /tokens folder. From there they are exported to scss. A few mixins are added to these tokens as well to build more complex styles (such as focus).

To import just the tokens into your scss file, place this line at the top of every file you want to use your tokens: @import “~@opengov/capital-style/scss/tokens; If your SCSS is compiled all together, this should only be needed once. If you are using CSS Modules in React, this will be needed for every scss file you need to use the tokens in.

Using Tokens & Mixins

Tokens should be used just like any other variable within your scss, for example: color: $color-primary-selection;

To reference a token within a function: width: calc(100vw - #{$unit-20});

To use media queries: @media #{$mq-small} { ... }

To use mixins: @include focus-wrap;

Tokens are not currently available in JS.

Stylesheets

We offer a few base stylesheets that you can use for your application. We recommend using these only once in your application.

@import “~@opengov/capital-style/scss/tokens;

  • Token and mixin definitions

@import “~@opengov/capital-style/scss/font;

  • Font definitions

@import “~@opengov/capital-style/scss/base;

  • Imports tokens, mixins and fonts
  • Imports normalize.css
  • A few base styles for your application: setting the font, basic focus, and bold font weight

@import “~@opengov/capital-style/scss/components;

@import “~@opengov/capital-style/scss/capital;

  • Everything

The capital stylesheet is also compiled as CSS and can be pointed to with: <link rel="stylesheet" type="text/css" href="[relative file path]/@opengov/capital-style/css/capital.css">

Using Component Styles

Component styles are written with the namespace .cds- to avoid conflicts with any existing styles. All children styles will only be affective with the correct parent style.

Styles are written with BEM. Children objects are prefixed with __ and modifiers are prefixed with --. Modifiers should state what is being modified and then the modification. For example:

.cds-button {

  &.cds-button--variantPrimary {}

  &.cds-button--sizeDefault {}

  svg.cds-button__icon {}
}

Fonts

Font files are available under /fonts and can be imported with: @import “~@opengov/capital-style/scss/font;

Visualization Colors

You can see all of the token on this Github Page:

https://opengov.github.io/Capital-Style/

import { vizColors } from '@opengov/capital-style/js';
import { getVizColors } from '@opengov/capital-style/js';

Adding Tokens, Mixins or Styles

Tokens

Tokens should be added within the /tokens folder to the appropriate json file. Update the docs/index.html to list any new tokens added.

Mixins

Mixins should be added to the /scss/tokens/mixins file. Update the docs/index.html to list any new mixins added.

Component Styles

Component Styles are maintained under /scss/components.

Style Namespacing

Please see the above notes on how classes are named and follow this pattern.

Targeting HTML elements

NEVER target an HTML element directly without a class used as an identifier.

Nesting Styles

Styles should always be nested under one parent style for the component.