Loading...
grid

The most simple CSS utility-first framework

Cssville is a utility-first CSS framework with zero dependencies. Develop faster using classes like dis-flex, cur-pointer, and pad-y-2.

About

A CSS utility-first framework is a CSS framework that provides pre-built utility classes to style HTML elements. Unlike traditional CSS frameworks, where styles are defined in large blocks or files, utility-first frameworks provide small, reusable classes.

The advantage of utility-first frameworks is that they provide a very efficient way of creating and customizing styles. Because the classes are small and modular, it is easy to create new styles simply by combining and stacking classes together.

This approach also results in smaller CSS files and faster load times, making utility-first frameworks a popular choice for responsive web design and mobile-first development. Each class can be combined and customized to create any desired styling.

Demo

In a utility-first framework, each class is designed to target a specific aspect of the style, such as font size, color, margin, or padding. The classes are named according to the property they control, such as fle-dir-row, cur-pointer, mar-x-4, pad-y-2, and so on. These classes can be added directly to HTML elements, without the need for additional CSS styling.

The example below shows some classes in action:

White house with a wooden deck at dusk
Naomi RiversAvailable for hire

  <div className="dis-flex wid-full pos-relative max-wid-sm">
    <img src="img/house.webp" className="wid-full max-wid-full bor-rad-4 obj-fit-cover" />
    <div className="dis-flex pos-absolute hei-100 wid-full">
      <div className="dis-flex fle-dir-column pad-4 wid-full">
        <img src="img/star.svg" className="hei-7 wid-7" />
        <div className="fle-gro-1"></div>
        <div className="dis-flex wid-full">
          <img src="img/profile.svg" className="hei-10 wid-10 bac-col-white bor-rad-max" />
          <div className="dis-flex jus-con-center pad-lef-3 fle-dir-column fle-gro-1">
            <span className="fon-wei-bold col-white">Naomi Rivers</span>
            <span className="fon-siz-small col-white opa-07">Available for hire</span>
          </div>
          <div className="dis-flex ali-ite-flex-end">
            <img src="img/bookmark.svg" className="hei-7 wid-7" />
          </div>
        </div>
      </div>
    </div>
  </div>

CSS prefixes

The same classes can be used with predefined screen-size prefixes. When prefix is used, the style is applied only for specific screen resolution. See the example below for the dis-flex property:

xl

@media screen and (max-width: 1280px) {
  .xl-dis-flex {
    display: flex;
  }
}

lg

@media screen and (max-width: 1012px) {
  .lg-dis-flex {
    display: flex;
  }
}

md

@media screen and (max-width: 768px) {
  .md-dis-flex {
    display: flex;
  }
}

sm

@media screen and (max-width: 544px) {
  .sm-dis-flex {
    display: flex;
  }
}

xs

@media screen and (max-width: 320px) {
  .xs-dis-flex {
    display: flex;
  }
}

CSS classes

Utility classes are a specific type of class that is designed to provide a single, focused styling property, such as padding, margin, or font size. Unlike traditional classes, which might be used to define more complex styles, utility classes are very simple and focused on a single aspect of the style.

align-content

ali-con: align-content

align-items

ali-ite: -ms-align-items, -o-align-items, -webkit-align-items, align-items

border

bor: border
bor-top: border-top
bor-bot: border-bottom
bor-lef: border-left
bor-rig: border-right

border-collapse

bor-col: border-collapse

border-color

bor-col: border-color
bor-bot-col: border-bottom-color
bor-lef-col: border-left-color
bor-rig-col: border-right-color
bor-top-col: border-top-color

border-style

bor-sty: border-style
bor-bot-sty: border-bottom-style
bor-lef-sty: border-left-style
bor-rig-sty: border-right-style
bor-top-sty: border-top-style

border-width

bor-wid: border-width
bor-bot-wid: border-bottom-width
bor-lef-wid: border-left-width
bor-rig-wid: border-right-width
bor-top-wid: border-top-width

border-radius

bor-rad: -ms-border-radius, border-radius
bor-rad-top-lef: -ms-border-top-left-radius, border-top-left-radius
bor-rad-top-rig: -ms-border-top-right-radius, border-top-right-radius
bor-rad-bot-rig: -ms-border-bottom-right-radius, border-bottom-right-radius
bor-rad-bot-lef: -ms-border-bottom-left-radius, border-bottom-left-radius

box-shadow

box-sha: box-shadow

box-sizing

box-siz: box-sizing

bottom

bot: bottom

background-color

bac-col: background-color

color

col: color

cursor

cur: cursor

display

dis: display

flex-direction

fle-dir: flex-direction

flex-grow

fle-gro: -o-flex-grow, -webkit-flex-grow, flex-grow

flex-shrink

fle-shr: -o-flex-shrink, -webkit-flex-shrink, flex-shrink

flex-wrap

fle-wra: -moz-flex-wrap, -ms-flex-wrap, -o-flex-wrap, -webkit-flex-wrap, flex-wrap

float

flo: float

font-family

fon-fam: font-family

font-size

fon-siz: font-size

font-weight

fon-wei: font-weight

gap

gap: gap
col-gap: column-gap
row-gap: row-gap

height

hei: height
max-hei: max-height
min-hei: min-height

justify-content

jus-con: -o-justify-content, -webkit-justify-content, justify-content

left

lef: left

line-height

lin-hei: line-height

margin

mar: margin
mar-top: margin-top
mar-bot: margin-bottom
mar-lef: margin-left
mar-rig: margin-right
mar-x: margin-left, margin-right
mar-y: margin-top, margin-bottom

object-fit

obj-fit: object-fit

opacity

opa: opacity

overflow

ove: overflow
ove-x: overflow-x
ove-y: overflow-y

padding

pad: padding
pad-top: padding-top
pad-bot: padding-bottom
pad-lef: padding-left
pad-rig: padding-right
pad-x: padding-left, padding-right
pad-y: padding-top, padding-bottom

position

pos: position

right

rig: right

text-align

tex-ali: text-align

text-decoration

tex-dec: text-decoration

text-wrap

tex-wra: text-wrap

top

top: top

width

wid: width
max-wid: max-width
min-wid: min-width

white-space

whi-spa: white-space

word-break

wor-bre: word-break

z-index

z-ind: z-index
© Cssville 2026
Hosted by Vercel.Protected by Cloudback.