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.3

Published

Design Tokens and Styles for the OpenGov Capital Design System.

Downloads

15,943

Maintainers

ashishsharma0101ashishsharma0101ddepasqualeddepasqualejeremiahrhalljeremiahrhallmanishpatidar01manishpatidar01oburdaoburdaopengov_devopengov_devbnanjappabnanjappagravitypersistsgravitypersistsdarshan2836darshan2836manokovacsmanokovacsnand.jhanand.jhackalegaonkarckalegaonkarpravin-patilpravin-patilmgibsonmgibsondborysenko_opengovdborysenko_opengovbhenizebhenizejhounpmjhounpmalexanches1001alexanches1001arahman-ogarahman-ogsdrossetti_ogsdrossetti_ognarayanansnnarayanansnstephanienfsstephanienfsjeastmanogjeastmanogsammiwei9119sammiwei9119jacobcdjacobcdprateek.sharmaprateek.sharmajavierrivasjavierrivassalvares28salvares28lawrenceatamlawrenceatamviktor_lisniak_opengovviktor_lisniak_opengovdarioolinuck-ogdarioolinuck-ogdannbohndannbohnartursynhalevychartursynhalevychivlavrikivlavrikvfranchukvfranchukabhishekdubeyonnpmabhishekdubeyonnpmbsuryawanshi1bsuryawanshi1jmo-opengovjmo-opengovjuliankosachjuliankosachnandreyevnandreyevppronppronpankajopengovpankajopengovrahulkaduskarrahulkaduskarogmsahuogmsahugguptaopengovgguptaopengovakshadapatilakshadapatilppathakopengovppathakopengovsbagulsbagulrsawantrsawantpkhairnarpkhairnarogind-amehtaogind-amehtadallasdeveloperjimdallasdeveloperjimpriyadarshnirosypriyadarshnirosykaditanikaditanigrevankargrevankarvbandalevbandalekredkarkredkarbrian_opengovbrian_opengovdhanashri-joshidhanashri-joshivvndnvvndnshantanuk90shantanuk90zs441989zs441989thamptonthamptonjkirchhofjkirchhofvneznakhinvneznakhinodotsenkoodotsenkogvelascooggvelascoogsebastiancastano1sebastiancastano1ashutoshopengovashutoshopengovmazcuetamazcuetasbradley_opengovsbradley_opengovolokhoniaolokhoniaadmitriyev143admitriyev143ruthraruthraalokkumaropengovalokkumaropengovychalyiychalyisarangwagh77sarangwagh77akosiakevychakosiakevycholeksiivoronenkooleksiivoronenkochaitanyapilkhanechaitanyapilkhanenhommanhommanoelparisinoelparisidkrainesdkrainesbfelacobfelacotylerlinquatatylerlinquatasatyajit987satyajit987tozaisentozaisenrshinde21rshinde21andrewdavis12andrewdavis12omarzionomarzionanupam-oganupam-ogyueluyueluogisiddogisiddjohnconleyognpmjohnconleyognpmmattbangertmattbangertaailenmaailenmdanielt_ogdanielt_oggezapetigezapetitwalshogtwalshogssulssulokotkevychokotkevychsunnybsunnybtimmygrtimmygrshreyaguptashreyaguptavinaybongalevinaybongalefmechettifmechettidamiansastredamiansastremkalinichenkomkalinichenkoifelacoifelacojoshuadotsonjoshuadotsonmsilveiraogmsilveiraogvidushimeelvidushimeelmhelgersonmhelgersonlcoffee-johnsonlcoffee-johnsonnanaynaominanaynaomifgogfgogmmagni-opengovmmagni-opengovkk-ogkk-ogkevinkelchenkevinkelchengasingh-oggasingh-ogmtopallimtopalliklrpdxklrpdxmsorokovskyimsorokovskyisuresh_patirsuresh_patiraahlrichsaahlrichskgautam311kgautam311glindenberg-ogglindenberg-ogrboyle21rboyle21gmuranogmuranoapatel2024apatel2024tapendra-ogtapendra-oggdemesagdemesaogjkochogjkochplussenhoffplussenhoffjkoppelogjkoppelogrtrigo-opengovrtrigo-opengovmprykhodkomprykhodkorfbagang17rfbagang17jmankjmankamagnusonamagnusonlcfitzglcfitzgog-naterolingog-naterolingcarlosopengovcarlosopengovekrapflekrapflameykhojeogameykhojeogirossa-ogirossa-ogjreandojreandobahlrichsbahlrichsbriandpeterson2000briandpeterson2000mdempewolfmdempewolfvfranchuk2vfranchuk2floppyears_opengovfloppyears_opengovaamartinezaamartinezkiliancsogkiliancsogchaoranhuangopengovchaoranhuangopengovbramosopengovbramosopengovmgruhlopengovmgruhlopengovogind-smoreogind-smorebsand_ogbsand_ogfaculewisfaculewisgaryalgaryaljdelledonne-opengovjdelledonne-opengovtcraneogtcraneogstzphenstzphenanroutanroutog-ericlutleyog-ericlutleypranitkhadilkaropengovpranitkhadilkaropengovhstockshstockswglasbrennerwglasbrennerdkolomiietsdkolomiietsjsivitsjsivitsecschottecschottvenkateshanavekarvenkateshanavekaralinderalindercmarkegardogcmarkegardogmattfelten-ogmattfelten-ogarpitopengovarpitopengovmnetk3mnetk3trothfeldtrothfeldamalakar4amalakar4erikwilliamserikwilliamsajay8nagarajay8nagarahobartopengovahobartopengovpooja.guptapooja.guptamtorres-opengovmtorres-opengovhurbanoghurbanogoleksandr.morozoleksandr.morozakhromychenkoogakhromychenkoogfmunozogfmunozogmkelkarmkelkarzacharyuanzacharyuanvanavekarvanavekarmkathalemkathaleross-opengovross-opengovnandreyev404nandreyev404jakemasonogjakemasonogankur.singhalankur.singhalmicaeladeritomicaeladeritoutsav91utsav91nmellerognmellerogsadkingbillysadkingbillysliashkosliashkovinayak-motevinayak-motepmussari_ogpmussari_ogwporter-opengovwporter-opengovkevinyoukevinyouashishkumarogashishkumarogarecsko_ogarecsko_ogherbwarrenherbwarrenogind-vupadhyayogind-vupadhyaychetan-xoriantchetan-xoriantvmerino04vmerino04opengov-superadminopengov-superadmindiegopamio-opengovdiegopamio-opengovogi-shubhamkogi-shubhamkkoletokoletoaroca_opengovaroca_opengovmadhuri_ogmadhuri_ogshikexue2shikexue2pritam123pritam123akshay_patelakshay_patelkbodinkbodinajinkyaopengovajinkyaopengovamitgandhinzamitgandhinz

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.