-
Notifications
You must be signed in to change notification settings - Fork 423
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
Add postfix option #126
Add postfix option #126
Conversation
Just added a crazy hack to help Thor with the parsing. Not ideal, but maybe this can work until we get Thor to fix it's issues with leading dashes. |
Thanks for bringing this up. I ran a quick experiment, and it seems Thor handles the alias flag and a quoted string just fine. That said, I'm a bit hesitant to add yet another option, nevermind hack up ARGV. A more robust approach would be to allow passing in a class name "template", something like In the meantime, you can use your fork or a custom template with your postfix hardcoded in. Thoughts? |
Are you trying this in code or on the console? Bash removes the quote marks which causes the problem with Thor. On Oct 7, 2013, at 6:47 PM, Kai Zau notifications@github.com wrote:
|
I like the idea of --css-class, but I noticed that Bootstrap applies styles based on classes beginning with "icon-". There's no CSS equivalent for /prefix-*-postfix/, so matching that pattern would be difficult. I this case I think --css-postfix is the cleanest way of implementing this. --John On Oct 7, 2013, at 6:47 PM, Kai Zau notifications@github.com wrote:
|
After thinking about this more, I'm going to shelve this for now. Postfixing doesn't seem like a common practice and can be achieved with custom templates, if absolutely necessary. That said, you can still match "sandwiched" classes with attribute selectors: http://codepen.io/anon/pen/fFEwL Thanks again! |
@EZYZ Actually no. That will only work when one class is applied to an element. More than one and it will use the first and last classes, which isn't what anyone wants. Postfix seems like a fairly reasonable request if you support prefixes. I'm not sure why whether it comes before or after makes any difference. Different CSS methodologies call for different practices. Here's mine: http://thesassway.com/advanced/modular-css-naming-conventions The section on subclasses is what's applicable here. Granted all of this is certainly achievable with custom templates, but if that's the argument let's turn that argument on it's head and ask why provide the prefix option at all? |
@jlong I just included this in the latest beta. Setting Note, you'll need to delete your old .fontcustom-manifest.json and change gem install fontcustom --pre |
This is a fast pass at implementing this. I prefer that my icon classes end with "-icon" instead of begin with "icon-".
Unfortunately, Thor seems to have problems with parsing arguments that begin with a dash. Even when parsing "--postfix=-icon". Any ideas?