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

Utility selectors for SUIT preset #98

Closed
ismamz opened this issue Dec 5, 2016 · 1 comment
Closed

Utility selectors for SUIT preset #98

ismamz opened this issue Dec 5, 2016 · 1 comment

Comments

@ismamz
Copy link
Contributor

ismamz commented Dec 5, 2016

Hi,
A utility name should be u-[sm-|md-|lg-]<utilityName> according to SUIT naming convention.
However the SUIT preset pattern don't consider errors the following:

.u-UtilityName
.u-utility-name
.u-sm-utility-name

The next pattern fix this:

utilitySelectors: /^\.u-(sm-|md-|lg-)?(?:[a-z0-9][a-zA-Z0-9]*)+$/
.u-utilityName     /* pass */
.u-sm-utilityName  /* pass */
.u-md-utilityName  /* pass */
.u-lg-utilityName  /* pass */
.u-UtilityName     /* error */
.u-utility-name    /* error */
.u-sm-utility-name /* error */

Don't you think that this should be part of the SUIT preset?

Let me know if I missing something or I can send a pull request.

@simonsmith
Copy link
Collaborator

Hi @ismamz

I'd agree that the linter should be failing the selectors you listed above. It would be excellent if you could open a PR with some relevant tests. Let me know if I can help.

simonsmith added a commit that referenced this issue Dec 9, 2016
Fix preset utility selectors pattern for suit; fixes #98
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