Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@choiceform/common-styles

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@choiceform/common-styles

Layout helper based on CSS grid and flexbox specification.

  • 1.0.0-rc.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

Responsive Grid Styles

Layout helper based on CSS grid and flexbox specification

Responsive Layout

Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive grid & flexbox utilities.

positionclass
gridclass
.c--gddisplay: grid;
.c--igddisplay: inline-grid;
alignclassPositional alignment
.c__as--calign-self: center;
.c__as--salign-self: start;
.c__as--ealign-self: end;
.c__as--fsalign-self: flex-start;Pack flex items from the start
.c__as--fealign-self: flex-end;Pack flex items from the start
.c__as--balign-self: baseline;
.c__as--stalign-self: stretch;
.c__ai--calign-items: center;
.c__ai--salign-items: start;
.c__ai--ealign-items: end;
.c__ai--fsalign-items: flex-start;Pack flex items from the start
.c__ai--fealign-items: flex-end;Pack flex items from the start
.c__ai--balign-items: baseline;
.c__ai--stalign-items: stretch;
.c__ac--calign-content: center;
.c__ac--salign-content: start;
.c__ac--ealign-content: end;
.c__ac--fsalign-content: flex-start;Pack flex items from the start
.c__ac--fealign-content: flex-end;Pack flex items from the start
.c__ac--balign-content: baseline;
.c__ac--stalign-content: stretch;
justifyclassPositional alignment
.c__js--cjustify-self: center;
.c__js--sjustify-self: start;
.c__js--ejustify-self: end;
.c__js--fsjustify-self: flex-start;Pack flex items from the start
.c__js--fejustify-self: flex-end;Pack flex items from the start
.c__js--sbjustify-self: space-between;
.c__js--sajustify-self: space-around;
.c__js--sejustify-self: space-evenly;
.c__js--stjustify-self: stretch;
.c__ji--cjustify-items: center;
.c__ji--sjustify-items: start;
.c__ji--ejustify-items: end;
.c__ji--fsjustify-items: flex-start;Pack flex items from the start
.c__ji--fejustify-items: flex-end;Pack flex items from the start
.c__ji--sbjustify-items: space-between;
.c__ji--sajustify-items: space-around;
.c__ji--sejustify-items: space-evenly;
.c__ji--stjustify-items: stretch;
.c__jc--cjustify-content: center;
.c__jc--sjustify-content: start;
.c__jc--ejustify-content: end;
.c__jc--fsjustify-content: flex-start;Pack flex items from the start
.c__jc--fejustify-content: flex-end;Pack flex items from the start
.c__jc--sbjustify-content: space-between;
.c__jc--sajustify-content: space-around;
.c__jc--sejustify-content: space-evenly;
.c__jc--stjustify-content: stretch;
grid-columnclass{n} = -1,1,2,3,4,5,6,7,8,9,10
.c__gc--{n}grid-column: {n};
.c__gc--{n}-{n}grid-column: {n} / {n};
grid-rowclass{n} = -1,1,2,3,4,5,6,7,8,9,10
.c__gr--{n}grid-row: {n};
.c__gr--{n}-{n}grid-row: {n} / {n};
grid-gapclass
.c__gap--{n}grid-gap: {spacer};{n} = 025, 05, 075, 1, 15, 2, 225, 25, 3, 35, 4, 5
grid-column-gapclass
.c__gap-c--{n}grid-column-gap: {spacer};{n} = 025, 05, 075, 1, 15, 2, 225, 25, 3, 35, 4, 5
grid-row-gapclass
.c__gap-r--{n}grid-row-gap: {spacer};{n} = 025, 05, 075, 1, 15, 2, 225, 25, 3, 35, 4, 5
grid-template-columnsclass
repeat
.c__gtc--r{n}grid-template-columns: repeat({n}, 1fr);{n} = 1,2,3,4,5,6,7,8,9,10,11,12
custom{n} = 1,2,3,auto
.c__gtc--{n}{n}grid-template-columns: {n} {n};
.c__gtc--{n}{n}{n}grid-template-columns: {n} {n} {n};
.c__gtc--{n}{n}{n}{n}grid-template-columns: {n} {n} {n} {n};
flexclass
.c--fxdisplay: flex;
.c--ifxdisplay: inline-flex;
flex-directionclass
.c__fd--cflex-direction: column;
.c__fd--crflex-direction: column-reverse;
.c__fd--rflex-direction: row;
.c__fd--rrflex-direction: row-reverse;
flex-growclass
.c__fg--1flex-grow: 1;
flex-shrinkclass
.c__fs--0flex-shrink: 0;
flex-wrapclass
.c__fw--wflex-wrap: wrap;
.c__fw--nflex-wrap: nowrap;
stackedclass
.c__skdwidth: 100% !important;
betweenclass
.c__fx-gap--{n}margin: calc({spacer} * -1);{n} = 025, 05, 075, 1, 125, 15, 175, 2, 225, 25, 3, 35, 4, 5
.c--bet-{n} > .c-fx__item {margin: {spacer};}
flex columnclass
.c__col--{n}width: {flex-column};{n} = 2, a3, 4, 6, a2, 8, 10, 12, 14, 16
responsiveclass
.c__m-xx@media ($mobile)
.c__om-xx@media ($over-mobile)
.c__it-xx@media ($into-tablet)
.c__t-xx@media ($tablet)
.c__ot-xx@media ($over-tablet)
.c__id-xx@media ($into-desktop)
.c__d-xx@media ($desktop)
.c__od-xx@media ($over-desktop)

{spacer}

shortspacervalue
$spacer:1rem !default;
$spacer-0:0 !default;
025$spacer-025:$spacer * 0.25 !default;
05$spacer-05:$spacer * 0.5 !default;
075$spacer-075:$spacer * 0.75 !default;
1$spacer-1:$spacer !default;
125$spacer-125:$spacer * 1.25 !default;
15$spacer-15:$spacer * 1.5 !default;
175$spacer-175:$spacer * 1.75 !default;
2$spacer-2:$spacer * 2 !default;
225$spacer-225:$spacer * 2.25 !default;
25$spacer-25:$spacer * 2.5 !default;
3$spacer-3:$spacer * 3 !default;
35$spacer-35:$spacer * 3.5 !default;
4$spacer-4:$spacer * 4 !default;
5$spacer-5:$spacer * 5 !default;

{flex-column}

shortvalue
212.5%
a333.33333333%
425%
637.5%
a250%
850%
1062.5%
1275%
1487.5%
16100%

Spacing

c includes a wide range of shorthand responsive margin and padding utility classes to modify an element’s appearance.

  • m - for classes that set margin
  • p - for classes that set padding
positionclass
padding{n} = a, 025, 05, 075, 1, 15, 2, 225, 25, 3, 35, 4, 5
.c__p--{n}padding: {spacer};a = auto
.c__px--{n}padding-right: {spacer}; padding-left: {spacer};
.c__py--{n}padding-top: {spacer}; padding-bottom: {spacer};
.c__pt--{n}padding-top: {spacer}
.c__pr--{n}padding-right: {spacer}
.c__pb--{n}padding-bottom: {spacer}
.c__pl--{n}padding-left: {spacer}
margin
.c__m--{n}margin: {spacer};
.c__mx--{n}margin-right: {spacer}; padding-left: {spacer};
.c__my--{n}margin-top: {spacer}; padding-bottom: {spacer};
.c__mt--{n}margin-top: {spacer}
.c__mr--{n}margin-right: {spacer}
.c__mb--{n}margin-bottom: {spacer}
.c__ml--{n}margin-left: {spacer}

border

Use border utilities to quickly style the border of an element.

positionclass{c} = d, l
.c__bdborder-width: 1px; border-style: solid;{n} = 04,08,16,24,32
.c__bdtborder-top-width: 1px; border-top-style: solid;{color} = $fade-(black, light)-(01 ~ 05)
.c__bdrborder-right-width: 1px; border-right-style: solid;
.c__bdbborder-bottom-width: 1px; border-bottom-style: solid;
.c__bdlborder-left-width: 1px; border-left-style: solid;
colorclass
.c__bdc--{c}-{n}border-color: {color};
radiusclass{n} = xs,sm,md,lg,xl,c
.c__bdrs--{n}border-radius: {radius};{radius} = $border-radius-{n}, c = 50%
positionclass
.c__ta--ltext-align: left;
.c__ta--ctext-align: center;
.c__ta--rtext-align: right;
.c__tt--ltext-transform: lowercase;
.c__tt--utext-transform: uppercase;
.c__tt--ctext-transform: capitalize;
.c__fw--lfont-weight: 200;
.c__fw--nfont-weight: 400;
.c__fw--bfont-weight: 600;
.c__fs--ifont-style: italic;
.c__va--mvertical-align: middle;
.c__va--blvertical-align: baseline;
.c__wob--kword-break: keep-all;
.c__wob--baword-break: break-all;

FAQs

Package last updated on 05 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc