Class Folder Structure
In Client-First, classes are organized into "folders" ā logical groupings based on naming prefixes. This makes large Webflow projects easy to navigate and maintain.
The Two Types of Classes
Custom Classes (Component-specific)
Custom classes describe a specific component and use underscores as separators:
hero_heading
hero_paragraph
navbar_logo
footer_link
cta_button
The part before the underscore is the component name (the folder), and the part after is the element name.
Utility Classes (Reusable)
Utility classes apply reusable styles and use hyphens:
padding-section-large
margin-top-medium
text-color-white
max-width-large
text-size-medium
These can be applied to any element across the site.
Folder Organization
Think of your classes as folders in a file system:
š hero
āāā hero_wrapper
āāā hero_heading
āāā hero_paragraph
āāā hero_button
š features
āāā features_grid
āāā features_card
āāā features_icon
š padding (utility)
āāā padding-section-large
āāā padding-section-medium
āāā padding-section-small
š text-size (utility)
āāā text-size-large
āāā text-size-medium
āāā text-size-small
What You'll Build
Create a page with at least two distinct sections, each using properly organized class names:
- Custom component classes with underscore convention
- Utility classes with hyphen convention
- Consistent lowercase naming throughout
Instructions
1. Create Two Sections
Build at least two sections (e.g., a hero and a features section). Each section should have its own component namespace.
2. Name Your Custom Classes
For each section, prefix all classes with the component name:
- Hero section:
hero_wrapper,hero_heading,hero_text - Features section:
features_grid,features_card,features_title
3. Add Utility Classes
Apply utility classes for spacing and typography:
padding-section-largeon your section padding wrappersmargin-top-mediumwhere you need spacingtext-size-largefor heading sizes
4. Keep It Consistent
- All lowercase
- Underscores for custom classes only
- Hyphens for utility classes only
- No default Webflow names
5. Publish and Submit
Publish your site and submit the URL below.
Common Mistakes
- Using the same class for different purposes across sections
- Mixing underscores and hyphens in the same class
- Creating utility classes that are too specific (like
hero-paddinginstead ofpadding-section-large)