Skip to content

My personal CSS boilerplate/framework written in Sass

Notifications You must be signed in to change notification settings

cyrildewit/perceptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Perceptor

Modern Sass starter kit that requires you to keep your CSS organized and clean.

Overview

Perceptor is my personal SCSS boilerplate. It's the result of 4 years of finding the right structure that I can use for my personal projects.

Need an compiler? See Perceptor Studio!

Features

  • Organized component structure
  • Bootstrap 4 grid included
  • Sanitize included
  • BEM helper mixins (element & modifier)

Note: This project is currently under development. If you have any ideas or tips, please feel free to report that at the issue tracker.

Rules / Conventions

Summary of: https://css-tricks.com/abem-useful-adaptation-bem/

ABEM

[a/m/o]-blockName__elementName -modifierName

camelCase

/* classic + atomic prefix */
.o-subscribe-form__field-item {}

/* camelCase + atomic prefix */
.o-subscribeForm__fieldItem {}

Seperated modifier

/* classic */
.block-name__element-name--green {
  background: green;
  color: white;
}

/* seperated modifier */
.a-blockName__elementName.-green {
  background: green;
  color: white;
}

Utilities

u-utilityName

No Sass placeholders

Don't use Sass placeholder! Instead use mixins.

https://www.sitepoint.com/avoid-sass-extend/

Example SCSS structure

.
├── 00_abstracts
|   ├── mixins
|       ├── _bem.scss
|       ├── _clearfix.scss
|       ├── _hover.scss
|   ├── _functions.scss
|   ├── _variables.scss
├── 01_base
|   ├── _fonts.scss
|   ├── _generic.scss
|   ├── _sanitize.scss
├── 02_atoms
|   ├── _button.scss
|   ├── _card.scss
|   ├── _panel.scss
├── 03_molecules
|   ├── _typography.scss
|   ├── _lists.scss
|   ├── _image.scss
├── 04_organisms
|   ├── _bootstrap-grid.scss
|   ├── _site-header.scss
|   ├── _section.scss
|   ├── _site-footer.scss
├── 05_templates
|   ├── _home.scss
|   ├── _week-action.scss
├── 06_pages
|   ├── _home.scss
|   ├── _week-action.scss
├── 07_utilities
|   ├── _clearfix.scss
├── 08_vendor
|   ├── _clearfix.scss

Organizing

  • 00_abstracts
    • Sass tools, helpers, global variables, functions, mixins.
  • 01_base
    • Boilerplate code; reset, global typographic rules, generic standard styles.
  • 02_atoms
  • 03_molecules
  • 04_organisms
  • 05_templates
  • 06_pages
  • 07_utilities
  • 08_vendor

To do

Read:

Credits

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Releases

No releases published

Packages

No packages published

Languages