CSS Properties Visual Reference
every property you use daily, with all values explained
displayblockinlineinline-blockflexgridnone
block = full width. flex/grid = layout. none = hidden
positionstaticrelativeabsolutefixedsticky
static=normal flow. absolute=relative to parent. fixed=relative to viewport
top/right/bottom/left020px50%auto
only works with non-static position
z-index0101009999
stacking order. higher = on top. only on positioned elements
overflowvisiblehiddenautoscroll
hidden=clip. auto=scroll if needed
display: flexactivates flexbox on container
flex-directionrowrow-reversecolumncolumn-reverse
justify-contentflex-startcenterflex-endspace-betweenspace-evenly
main axis alignment
align-itemsflex-startcenterflex-endstretch
cross axis alignment
gap8px16px 24px
space between items (row gap, column gap)
flex10 0 autonone
shorthand: flex-grow flex-shrink flex-basis
margin016px0 auto8px 16px
outer space. auto horizontally = center block element
padding016px8px 16px4px 8px 12px 16px
inner space. 1 val=all 2 vals=top/bottom,left/right
width / height100px50%100vwautofit-contentmin-content
max-width750px100%none
cap width but allow smaller. use for content containers
box-sizingborder-boxcontent-box
border-box: width includes padding+border (always use this)
font-family'Inter', sans-serifmonospace
always add fallback: 'Font', fallback
font-size14px1rem1.2emclamp(14px,2vw,18px)
font-weight400500600700800
400=regular 500=medium 600=semibold 700=bold
line-height11.41.624px
unitless multiplier recommended. 1.5-1.7 for body text
letter-spacingnormal0.5px2px-0.5px
tight for headings. wide for uppercase labels
text-overflowellipsisclip
needs overflow:hidden + white-space:nowrap
background#fffrgba(0,0,0,0.5)linear-gradient()url()
border1px solid #3332px dashed rednone
border-radius4px8px50%100px
50%=circle. 100px=pill shape
box-shadow0 2px 8px rgba(0,0,0,0.3)inset 0 1px 2px
x y blur spread color. inset=inner shadow
opacity00.51
affects element AND children. use rgba() for just color
transitionall 0.2s easeopacity 0.3s, transform 0.2s
property duration timing. specify property not 'all'
transformtranslateX(10px)scale(1.05)rotate(45deg)translateY(-2px)
animationname 1s ease infinitefadeIn 0.3s forwards
cursordefaultpointernot-allowedtextwaitgrab
user-selectnonetextall
none=prevent text selection (good for buttons/icons)
pointer-eventsnoneauto
none=pass clicks through element (overlay tooltips)