Clicksco / Front-End

Organisation Front End Documentation & Tooling
http://docs.clicksco.com/frontend
2 stars 1 forks source link

Variables, Mixins and Functions MUST be stored within their own partial file #58

Closed lewismorris closed 10 years ago

lewismorris commented 11 years ago

To help with better organisation of your variables, mixins and functions, they should each be store in their own separate partial files such as.

_variables.scss
_mixins.scss
_functions.scss
BenjaminRCooper commented 11 years ago

Just a quick one on this mate, at the moment within the boilerplate, we dont have a mixins file, as it has been renamed to helpers.scss to contain both mixins, global extends and functions.

Thoughts?

B

lewismorris commented 11 years ago

I think this depends on the amount of mixins that are going to be used on the project really, one or two then managing it through the _helpers partial wouldn't be so bad. But once you start to get 3+ they take up a decent chunk of space and would make quickly searching through your helpers a bit of a nightmare.

Their isn't really any performance issues with putting them into a partial file so i'd just run with that route, that way from day one they are separated and more manageable.

I don't mind splitting out any mixins currently in the boilerplate into a partial file if we want to run with this.

BenjaminRCooper commented 11 years ago

Ok cool.

Added a _mixins.scss and _functions.scss partial within the global directory of the boilerplate and removed the helpers file.

Is this ok mate?

If so, could you extend your standard to contain functions too?

Also, could you maybe change the wording of your standard too, just it seems like each variable or mixin should have their own files.

Sorry to be a pain mate.

B

lewismorris commented 11 years ago

Nice one for the pull request mate. I've updated the standard to include functions also.

BenjaminRCooper commented 11 years ago

Cool +1

B

BenjaminRCooper commented 11 years ago

Implemented

BenjaminRCooper commented 10 years ago

Maybe rethink _variables.scss due to Viaduct's structure

BenjaminRCooper commented 10 years ago

In Viaduct, variables are now stored in a _settings.scss partial, and then a partial is added for each layer named _settings.scss to override or add any settings for the new layer of your CSS codebase. Thoughts?

Mixins and Functions would stay the same, but the variables file I propose we change, if we are to run with Viaduct.

lewismorris commented 10 years ago

Hey Ben,

I think i get where you're coming from but if you could walk me through this concept on a project using Viaduct next week that'd be great. Just so i can fully wrap my head around how this concept works.

matchboxhero commented 10 years ago

+1

BenjaminRCooper commented 10 years ago

Ok, lets go over this in this week's Front End Meeting.

BenjaminRCooper commented 10 years ago

Added an update to this standard to include the settings.scss file. Implemented and closed.