Skip to content

Commit

Permalink
feat: 🎸 finalize new atom list
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Nov 20, 2023
1 parent fb0a3c8 commit 248e68e
Showing 1 changed file with 91 additions and 43 deletions.
134 changes: 91 additions & 43 deletions addon/atoms.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,77 @@
'use strict';

var mr = 'margin',
mrt = 'margin-top',
mrr = 'margin-right',
mrb = 'margin-bottom',
mrl = 'margin-left'
var pos = 'position',
t = 'top',
r = 'right',
b = 'bottom',
l = 'left',
w = 'width',
h = 'height',
ov = 'overflow',
ovx = ov + '-x',
ovy = ov + '-y',
mr = 'margin',
mrt = mr + '-' + t,
mrr = mr + '-' + r,
mrb = mr + '-' + b,
mrl = mr + '-' + l,
pd = 'padding',
pdt = 'padding-top',
pdr = 'padding-right',
pdb = 'padding-bottom',
pdl = 'padding-left'
pdt = pd + '-' + t,
pdr = pd + '-' + r,
pdb = pd + '-' + b,
pdl = pd + '-' + l,
bd = 'border',
bdt = bd + '-' + t,
bdr = bd + '-' + r,
bdb = bd + '-' + b,
bdl = bd + '-' + l,
bdrad = bd + '-radius',
bg = 'background',
bgc = bg + '-color',
bgi = bg + '-image',
bgr = bg + '-repeat',
bga = bg + '-attachment',
bgp = bg + '-position',
bgs = bg + '-size',
bgo = bg + '-origin',
bgcl = bg + '-clip',
f = 'font',
fz = f + '-size',
fs = f + '-style',
fw = f + '-weight',
ff = f + '-family'
st = 'stroke',
stw = st + '-width',
stl = st + '-linecap'
;

var atoms = exports.atoms = {
// Positioning
pos: 'position',
t: 'top',
r: 'right',
b: 'bottom',
l: 'left',
pos,
t,
r,
b,
l,
z: 'z-index',

// Layout (box model)
d: 'display',
vis: 'visibility',
fl: 'float',
w: 'width',
h: 'height',
minW: 'min-width',
maxW: 'max-width',
minH: 'min-height',
maxH: 'max-height',
ov: 'overflow',
ovx: 'overflow-x',
ovy: 'overflow-y',
w,
h,
minW: 'min-' + w,
maxW: 'max-' + w,
minH: 'min-' + h,
maxH: 'max-' + h,
ov,
ovx,
ovy,
bxz: 'box-sizing',
cl: 'clip',
clp: 'clip-path',
clr: 'clear',
tbl: 'table-layout',

// Flexbox
fl: 'flex',
Expand Down Expand Up @@ -76,37 +110,46 @@ var atoms = exports.atoms = {
padl: pdl,

// Borders
bd: 'border',
bdt: 'border-top',
bdr: 'border-right',
bdb: 'border-bottom',
bdl: 'border-left',
bdrad: 'border-radius',
bd,
bdt,
bdr,
bdb,
bdl,
bdrad,
out: 'outline',
bxsh: 'box-shadow',

// Colors
col: 'color',
op: 'opacity',
bg: 'background',
bgc: 'background-color',
bgi: 'background-image',
bgr: 'background-repeat',
bga: 'background-attachment',
bgp: 'background-position',
bgs: 'background-size',
bgo: 'background-origin',
bgcl: 'background-clip',
bg,
bgc,
bgi,
bgr,
bga,
bgp,
bgs,
bgo,
bgcl,
bdfl: 'backdrop-filter',
bfvis: 'backface-visibility',

// Text
fz: 'font-size',
fs: 'font-style',
fw: 'font-weight',
ff: 'font-family',
lh: 'line-height',
f,
fz,
fs,
fw,
ff,
ta: 'text-align',
td: 'text-decoration',
tt: 'text-transform',
ts: 'text-shadow',
tov: 'text-overflow',
ww: 'word-wrap',
lts: 'letter-spacing',
ws: 'white-space',
lh: 'line-' + h,
va: 'vertical-align',

// Pointer
cur: 'cursor',
Expand All @@ -118,6 +161,11 @@ var atoms = exports.atoms = {
trs: 'transition',
tr: 'transform',

// SVG
st,
stw,
stl,

// Other
ls: 'list-style',
con: 'content',
Expand Down

0 comments on commit 248e68e

Please sign in to comment.