Skip to content

feat: properly dasherize class names with acronyms#44

Merged
keithamus merged 3 commits intomasterfrom
feat-properly-dasherize-class-names-with-acronyms
Jun 24, 2020
Merged

feat: properly dasherize class names with acronyms#44
keithamus merged 3 commits intomasterfrom
feat-properly-dasherize-class-names-with-acronyms

Conversation

@keithamus
Copy link
Copy Markdown
Contributor

@keithamus keithamus commented Jun 22, 2020

This PR changes the dasherizing code such that it will now respect acronyms (that is, contiguous sets of capital letters) as single words, so for example:

  • CSSStyle -> css-style (old: c-s-s-style)
  • XMLHttpRequest -> xml-http-request (old: x-m-l-http-request)
  • GEmoji -> g-emoji (old: g-emoji, this is still a respected pattern)
  • ClipX -> clip-x (old: clip-x, this is still a respected pattern)

While this would technically be a breaking change, we're still Pre 1.0 so this is acceptable to release as a feature, IMO.

@keithamus keithamus requested a review from a team as a code owner June 22, 2020 13:55
Comment thread src/register.ts Outdated
Comment thread src/register.ts Outdated
keithamus and others added 3 commits June 24, 2020 13:54
@keithamus keithamus force-pushed the feat-properly-dasherize-class-names-with-acronyms branch from 0147022 to 606c825 Compare June 24, 2020 12:55
@keithamus
Copy link
Copy Markdown
Contributor Author

Nice catches @muan! I've updated the PR to fix those cases. I think this is good to go now 👍

@keithamus keithamus merged commit ee3f1c4 into master Jun 24, 2020
@keithamus keithamus deleted the feat-properly-dasherize-class-names-with-acronyms branch June 24, 2020 14:29
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

Successfully merging this pull request may close these issues.

2 participants