stravid/slotcars — Issue #57: (S)CSS structure
Author: MathiasPaumgarten
Created: 2012-03-06 20:11:40+00:00
State: open
Labels: working

i just wanted to put out there: We need to think about the structure of the CSS (SCSS). With the asset pipe-line there are a few magic things happening when it comes to paths (even inside the ``url()`` of a ``background-image``). Some of that magic I would consider dark and black magic or just simply annoying, since it's in your way.
I also affects in what way we have to save the images so that the CSS finds them. everything written in a SCSS file in a folder called _view_ will look for images in the same folder structure. I have a basic setup right now, which should do the trick. Depending on how much CSS there will be, we have to find a different structure.

Other than that, the css also works with the same ``require`` system as the JS. There are two files that are outstanding:

__gobal.scss__
__utils.scss__

The __global.scss__ is used for stayles that affect every (or most) views. Like the grass background. the __utils.scss__ is for classes that are used at differetn places and don't belong to a specific view. such as overriding the style of a button.

I hope that makes sense in some way. i will go over it again tomorrow. For now you can look into the structure: https://github.com/stravid/slotcars/tree/chore/implement-home-screen/app/assets/stylesheets