Giter Site home page Giter Site logo

perceptor's Introduction

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.

perceptor's People

Contributors

cyrildewit avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.