-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thoughts on prefixes for settings variables, internal mixins and functions #80
Comments
For me, I don't like the idea of prefixing most of these as if they conflict with another extension, you probably don't want to be using both of them at the same time. On Monday, December 24, 2012 at 5:19 PM, Rob Wierzbowski wrote:
|
Thought about this, especially worries me in general toolkits, like @Snugug toolkit that has both Susy and Singularity. I don’t want to get too caught up with worrying about conflicts with other grid systems. Ease of use should be first on our mind and sometimes name-spacing can hurt this. Curious if you are finding any particular instances where name spacing is necessary? |
I don't think it's a big issue, but worth a quick discussion and decision on record. Initially I thought about it because I had a personal I'm in agreement that author experience comes first, and that means short, human language mixins and functions. And like I mentioned in the first post, if someone tries to use two grid systems there are going to be conflicts, no reason to try to prevent that. To get specific, my suggestion would be to prefix all of the settings variables in |
IMO those examples don't sway me to introduce name spacing as they are examples that are easily remedied by RTFM, but more importantly, are core to many grid systems in general. I find name spacing useful when what's described is otherwise vague, like Breakpoint's to-em variable. Without the breakpoint prefix, that variable is too vague, but with name spacing it becomes much easier to identify. With all this being said, as I think about it, I think we should very distinctly not namespace anything as the upcoming @import syntax will solve this issue for free for not just us but for all extensions. On Dec 25, 2012, at 1:56 AM, Rob Wierzbowski notifications@github.com wrote:
|
Fair enough. |
Some components have common enough names that it's possible another sass extension or a user's project files could override them. I'm thinking in particular of
$paddings
,$container
,$containers
,container()
,$base-font-size
,$output
,reverse()
maybe, and some others.Would it be reasonable to add a prefix like
sn-
to all settings variables and internal functions and mixins? Other sass projects already follow this pattern (Breakpoint for example).There would need to be reasonable exceptions to maintain good developer and author experience. Something like:
grid-span()
.You could argue that collision on certain settings is a benefit -- if you're already using a
$base-font-size
variable in your sass files it's automatically added to Singularity. If there was a suite of related projects that standardized general use variables that would be awesome, but as it stands unknowingly defining settings seems like a bad practice to me.The text was updated successfully, but these errors were encountered: