trendwerk / sphynx

A light & simple WordPress starter theme 😽
16 stars 2 forks source link

Modular approach #479

Closed haroldangenent closed 9 years ago

haroldangenent commented 9 years ago
sboerrigter commented 9 years ago

@luukdv will talk ofzo. On monday

haroldangenent commented 9 years ago

OOCSS will be implemented for 1.1.0.

haroldangenent commented 9 years ago

By the way: This means a complete rewrite, taking into account the main principles of OOCSS:

haroldangenent commented 9 years ago

Please update https://github.com/trendwerk/trendpress/wiki/Mixins after fixing this.

haroldangenent commented 9 years ago

Soms remarks on _functions.scss:

haroldangenent commented 9 years ago

I'm really enthusiastic about this, thanks for your work @gewoonderrik and @luukdv! Did a small review, you'll find a better overview on the current situation below. A lot of things are questions, I hope one of you could answer these.

General

main.scss

_functions.scss

_helpers.scss

The utils/ folder gathers all Sass tools and helpers used across the project. Every global variable, function, mixin and placeholder should be put in here.

(so only for Sass things, I'd recommend giving them their own file)

_typography.scss

In a separate directory:

  • _base.scss (also includes paragraphs)
  • _headings.scss
  • _italic.scss maybe remove this
  • _lists.scss
  • _quotes.scss
  • _code.scss
  • [x] Remove italic declarations (in case they are not necessary, has to be cross-browser tested)

_footer.scss

_header.scss

_article.scss

_button.scss

_comment-form.scss

_comments.scss

_gallery.scss

_logo.scss

_navigation-icon.scss

_search-form.scss

_search-icon.scss

_wordpress-images.scss

wordpress/ folder

Everything in pages/

Conclusion

I'll start working on this as well. Maybe you guys can add to this list and keep it updated, so we have some kind of overview on the status. Big items or features can be placed as new issues.

I'd love to hear your thoughts.

haroldangenent commented 9 years ago

We talked about this. Notes:

Separate structure and skin

We should do this.

Inclusion order

Alphabetically, except when it's impossible.

Mixins / functions

Will get their own directory. One mixin or function per file.

Button mixin

Split in several mixins. Mixins used once will be declared in the appropriate class.

Meta mixin

Will be removed.

Block mixin (proposal)

We should try this.

Block mixin (old one)

Rename it to something semantic.

Gradient

Move to Fezcat.

Parenthesis

Every mixins should have parenthesis.

Placeholder

Remove as proposed.

List-style-none

Yes.

Sprite mixin

Remove as proposed.

Helpers

Remove.

Typography

In a separate directory:

Footer

Keep the class.

Header

Keep the class.

Hentry

Different class and file name.

Small a

Keep it.

p.last-of-type

Remove it.

Comments ol, ul

Put in parent. Remove ul.

Gallery

Improve. Should be a separate issue.

.burger

Rename to .mobile-navigation-icon.

.glass

Rename to .search-form-icon or something. Also rename the file.

_wordpress-images.scss

Split if .alignleft is used for more than just images.

New idea: create a wordpress/ folder for all WordPress components.

pages/

Remove.

haroldangenent commented 9 years ago

The current block() mixin is too non-description. I'm not sure what it does and it doesn't even display: block

Based on some other frameworks and readings, I'd name it .panel, .card or .box. Maybe .box is the best one, since it's the most descriptive. The content is literally boxed in. I'll use that one, feel free to protest if you disagree.

haroldangenent commented 9 years ago

Just refactored wordpress/ components. They include:

WordPress components can be defined as such: Components which HTML is generated by either WordPress itself or it's WYSIWYG editor.

haroldangenent commented 9 years ago

I have decided to drop #543 out of this issue and rename this one. The modular approach is practically finished and can be improved upon in time. Separation of skin and structure is a separate issue completely.

luukdv commented 9 years ago

Agreed, as discussed. Excited about the merge.

haroldangenent commented 9 years ago

@gewoonderrik has tested it. Removed assignment.