Skip to content
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

baseClass option needs to be sanity checked #9

Open
mainerror opened this issue Mar 11, 2012 · 1 comment
Open

baseClass option needs to be sanity checked #9

mainerror opened this issue Mar 11, 2012 · 1 comment
Assignees

Comments

@mainerror
Copy link
Collaborator

The baseClass option needs to be sanity checked in order to prevent setting invalid CSS identifiers. There are three forms of invalid CSS identifiers:

  • starting with a digit, .0my-class
  • starting with a double hyphen, --my-class
  • starting with a hyphen followed by a digit, -0my-class

There are three options I can see how we could handle this:

  1. The graceless way - throw an error and inform the user.
  2. The graceful way - use the default class naming and inform the user.
  3. The silent way - silently use the default class naming and not inform the user.

I'm all for option two informing the user via a console message.

@ghost ghost assigned rlemon Mar 11, 2012
@rlemon
Copy link
Owner

rlemon commented Mar 12, 2012

I'm not sure option 2 makes sense for this application;
If the user defines a baseClass name, one can assume they are using said name in their corresponding css / js selectors.
If we fallback to the default names, I think that'll be as useful as not providing a classname for the span elements all together. Just a thought. Personally I would go with option one. Throw an exception in the console, and abort, or use NO classnames?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants