1.2.0 • Published 1 year ago

css-shortcut v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

BuyMeACoffee

if you would like to support the development of the project, you can Donate

Install

NPM: npm install css-shortcut

YARN: yarn add css-shortcut

Usage

Install package with NPM or Yarn.

SASS/SCSS import

Open the main style file and import at the beginning css-shortcut from node-modules folder: @import 'node_modules/css-shortcut/index.min.css';

React import

Open the main react file and at the beginning type import 'css-shortcut'

How To Use

Side => abbreviation:

  • left => l
  • right => r
  • top => t
  • bottom => b

For Example:

ClassValue
mr-12 mb-41margin-right: 12px; margin-bottom: 41px;
m-25margin: 25px;
p-50padding: 50px;
pr-10 mt-15 mb-15padding-right: 10px; margin-top: 15px; margin-bottom: 15px;

Margin

Margin from 1 to 50 pixels.

ClassValue
m*-1margin-*: 1px;
m*-2margin-*: 2px;
m*-3margin-*: 3px;
m*-4margin-*: 4px;
m*-5margin-*: 5px;
m*-6margin-*: 6px;
m*-7margin-*: 7px;
m*-8margin-*: 8px;
m*-9margin-*: 9px;
m*-10margin-*: 10px;
etc.etc. (up to 50px)

Padding

Padding from 1 to 50 pixels.

ClassValue
p*-1padding-*: 1px;
p*-2padding-*: 2px;
p*-3padding-*: 3px;
p*-4padding-*: 4px;
p*-5padding-*: 5px;
p*-6padding-*: 6px;
p*-7padding-*: 7px;
p*-8padding-*: 8px;
p*-9padding-*: 9px;
p*-10padding-*: 10px;
etc.etc. (up to 50px)

Top, right, bottom, left

Top, right, bottom, left from 0 to 50 in pixels.

ClassValue
top-0top: 0px;
top-2top: 2px;
top-50top: 50px;
right-0right: 0px;
right-2right: 2px;
right-50right: 50px;
left-0left: 0px;
left-2left: 2px;
left-50left: 50px;
bottom-0bottom: 0px;
bottom-2bottom: 2px;
bottom-50bottom: 50px;
etc.etc.

Top, right, bottom, left in percentage 0 to 100 in 10 steps.

ClassValue
top-p0top: 0%;
top-p20top: 20%;
top-p100top: 100%;
right-p0right: 0%;
right-p20right: 20%;
right-p100right: 100%;
bottom-p0bottom: 0%;
bottom-p20bottom: 20%;
bottom-p100bottom: 100%;
left-p0left: 0%;
left-p20left: 20%;
left-p100left: 100%;
etc.etc.

For Example:

ClassValue
top-p50 right-p100top: 50%; right: 100%;
bottom-p0bottom: 0%;
left-50left: 50px;
top-p70 left-15 bottom-1padding-right: 10px; margin-top: 15px; margin-bottom: 15px;

Flex, display

ClassValue
d-inflexdisplay: inline-flex;
d-flexdisplay: flex;
d-blockdisplay: block;
jcsbjustify-content: space-between;
jcsajustify-content: space-around;
jccjustify-content: center;
jcsejustify-content: space-evenly;
aicalign-items: center;
aiealign-items: flex-end;
aisalign-items: flex-start;
flex-colflex-direction: column;
flex-rowflex-direction: row;
flex-wrapflex-wrap: wrap;
flex-autoflex: 1 1 auto;
flexflex: 1;
m-automargin: auto;
tactext-align: center;
pos-rposition: relative;
pos-aposition: absolute;
pos-staticposition: static;
pos-stickyposition: sticky;

Text

ClassValue
tactext-align: center;
ttctext-transform: capitalize;
ttutext-transform: uppercase;
ttltext-transform: lowercase;
tdntext-decoration: none;
tdutext-decoration: underline;
whitecolor: #fff;
blackcolor: #000;

Font-Weight

ClassValue
fw100font-weight: 100;
fw200font-weight: 200;
fw300font-weight: 300;
fw400font-weight: 400;
fw500font-weight: 500;
fw600font-weight: 600;
fw700font-weight: 700;
fw800font-weight: 800;
fw900font-weight: 900;
fwboldfont-weight: bold;
fwnormalfont-weight: normal;

Opacity

ClassValue
op-1opacity: 0.1;
op-2opacity: 0.2;
op-3opacity: 0.3;
op-4opacity: 0.4;
op-5opacity: 0.5;
op-6opacity: 0.6;
op-7opacity: 0.7;
op-8opacity: 0.8;
op-9opacity: 0.9;
op-10opacity: 1;

Z-index

Z-index from 0 to 5.

ClassValue
z-0z-index: 0;
z-1z-index: 1;
z-2z-index: 2;
z-3z-index: 3;
z-4z-index: 4;
z-5z-index: 5;

Other

ClassValue
c-pcursor: pointer
1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago