CSS Architecture Documentation | Heybooster

Mustafa DalgaMustafa Dalga
1 min read

I have created a document to set a standard for writing CSS code at Heybooster. I also wanted to share this documentation as open source.

  • We use SCSS as CSS Preprocessing.

  • Our CSS architecture is generally based on the BEM. methodology. However, in some cases, we may be able to use OOCSS or SMACSS as alternative solutions.

  • We create and use utility classes for frequently used css properties.

  • We write component-scoped CSS . Thus , Our SCSS/CSS codes will apply to elements of the current components only.

Class Naming Rules

For naming rules, we used the following resources:

We usually follow the BEM methodology to naming the template classes:

class-name { }
class-name--modifier-name { }
class-name__child-element { }
class-name__child-element--modifier-name { }

We use prefix by scope to associate classes:

# Layout Rules
l-auth
l-app

# State Rules
is-urgent
is-perfect
is-open
is-opportunity

# View Rules
v-dashboard
v-my-insight
v-kpi-management

# Component Rules
c-modal
c-create-kpi
c-update-kpi
c-button

# Popup Rules
p-add-new-member
p-delete-kpi
p-request-an-insight

# Non-styled JavaScript Hooks
js-gridjs-pages
js-search-input
js-current-page

Originally published at heybooster.

0
Subscribe to my newsletter

Read articles from Mustafa Dalga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mustafa Dalga
Mustafa Dalga

I am a highly qualified software developer with over 6 years of experience in developing desktop and web applications using various technologies.My main programming language is JavaScript, and I am currently working as a Front-end developer at Heybooster. I am passionate about software development and constantly seek to improve my skills and knowledge through research and self-teaching. I share my projects on Github as open source to not only learn and grow, but also contribute to the development community. As a software developer, I am committed to upholding ethical standards in my work.