canarymason/breakpoint — pull request #29 by ChinggizKhan (2012-12-07 21:13:55+00:00)
Title: Full refactor - Add no-query variables to var

Okay--- so here if my proof of concept of what I was talking about for issue #27. It will allow for the no-query variable to be added, and there no restrictions on how this actually happens.

This is basically what I did:
* Restructured the code to generate all the parts of the query and save them
* Then it will create the query from those variables
* Finally, it will check if there is a no-query or not, and print the final product as it did before

What still needs to happen:
* I need to re-add in the code to do browser prefixing. There is already a TODO for this, I am just really busy.
* I think the respond-to stuff should be added into breakpoint--- as it is just a wrapper it makes sense for it to live together
* I am not sure if it is needed, or possible... but it may be desirable to "cache" breakpoints as they go through respond-to so if the same name is selected-- the pre-built query gets made instead of running this code every time. Again-- what it would help with, I am not sure it would even be needed. But it could be a cool experiment.

Why?

So, the code before had all of these $first vars, and passed around variables unnecessarily. This removes that extra code and streamlines how the media query is built. This will make things much easier to maintain, and others to contribute