Skip to content

Code Corps SASS Ideas and Dicussion

Rafael Lüder edited this page Dec 2, 2016 · 5 revisions

This discussion is related to and goes beyond what's described on issues #672 and #698.

I'd like that by the end of the CSS Refactoring Milestone we achieve not only the decoupling of styles and testing, proper BEM naming of classes and semantic HTML but also a rearranged folder structure for /app/styles. All of this while making the most out of SASS's built-in features.

1. Topics Covered

1.1 Architecture

The main idea here is to reorganize our /app/styles folder structure to follow the the 7-1 pattern (or as close as we can get to it). With this new approach the folder structure would look something like this:

|-- styles/
|--|-- abstracts/
|--|--|-- _functions.scss
|--|--|-- _mixins.scss
|--|--|-- _variables.scss
|--|-- base/
|--|--|-- _base.scss (standard styles for HTML elements)
|--|--|-- _fonts.scss
|--|--|-- _helpers.scss (e.g. .clearfix, .container, etc.)
|--|--|-- _typography.scss
|--|-- components/
|--|--|-- categories-list.scss
|--|--|-- category-item.scss
|--|--|-- ...
|--|-- layout/
|--|--|-- _footer.scss
|--|--|-- _header.scss
|--|--|-- ...
|--|-- templates/
|--|--|-- about.scss
|--|--|-- home.scss
|--|--|-- projects.scss
|--|--|-- team.scss
|--|--|-- ...
|--|-- themes/
|--|--|-- code-corps/
|--|--|--|-- code-corps.scss
|--|--|-- another-theme/
|--|--|--|-- another-theme.scss
|--|--|-- ...
|--|-- app.scss
|--|-- main.scss
1.1.1 References

1.2 Typography

1.2.1 References

1.3 Color Palettes

1.3.1 References

1.4 Themes

1.4.1 References

1.5 Media Queries

1.5.1 References

1.6 Guidelines and Documentation

1.6.1 References

1.7 Style Guide

1.7.1 References

2. Exploratory

2.1 CSS Modules, Shadow DOM & Web Components

2.1.1 References