ITCSS
ITCSS
ITCSS is a methodology of writing CSS code that is scalable and easy to manipulate
@import “global”;
@import “colors”;
@import “fonts”;
$brand-color: #bada55;
$spacing-unit: 10px;
Tools
@import “functions”;
@import “normalize”;
@import “reset”;
*, *::before, *::after {
…
}
Base / Elements
@import “image”;
@import “headings”;
img {
ul {
display: block;
list-style: square outside;
max-width: 100%;
}
}
Objects
@import “list-inline”;
@import “wrapper”;
.o-grid { .o-layout {
… …
} }
Components
@import “carousel”;
Components
@import “card”;
.c-card { . c-card__column {
… …
} }
Trumps / Utilities
@import “hide”;
Trumps
.u-one-half { .u-hidden {
width: 50% !important; display: none!important;
} }
Folder structure
ITCSS adopts the BEM CSS naming o- Signify that something is an object
methodology and mixes it with its
c- Signify that something is a
style structure and its namespacing
component
approach.
u- Signify that something is a Utility