jorgebucaran / classcat

Build a class attribute string quickly
MIT License
905 stars 22 forks source link

Change name of the library. #5

Closed bn-l closed 6 years ago

bn-l commented 6 years ago

Consider changing name. Thought this was something for cond inheritance.

jorgebucaran commented 6 years ago

@bn-l If you are going to go out of your way to open an issue, you may consider suggesting an alternative name along with your ticket? 🤔

bn-l commented 6 years ago

Very good point.

CssStyleConcat

bn-l commented 6 years ago

StyleWrap CSSWrapUp CondStyleWrap

I'm spent. I need a cigarette.

jorgebucaran commented 6 years ago

Please remember that this library is pretty much only intended to join class names. For that reason using the word Style doesn't really work.

Also spent some time thinking about the name and discussed it with several peers before I published classwrap:

In the end I chose classwrap because it sounded goofy and someone said reminded them of a sandwich.

bn-l commented 6 years ago

Hmm, have spent a while now too and it is very hard. Maybe put something in the description to differentiate it.

"0.3 KB JavaScript utility for conditionally concatenating class names." to "0.3 KB JavaScript utility for conditionally concatenating CSS class names.

jorgebucaran commented 6 years ago

@bn-l Ah, that's a good start, but I still think it's incorrect, because they are not strictly CSS class names.

They can be CSS class names as you say, but in reality you are just building the string that will be used for the className property or [class] attribute.

Maybe "0.3 KB JavaScript utility for conditionally concatenating class names attributes" or change attribute for properties.

Tricky! :)

loopmode commented 6 years ago

I think the naming is okay. Consider that the most popular lib for this is classnames by jedwatson.

Typically I use it like this:

import cx from 'classnames';
...
<div className={cx('foo', 'bar', {baz})}>

Instead, in my next project, I will be doing:

import cw from 'classwrap';
...
<div className={cw(['foo', 'bar', {baz}])}>

So.. I personally think it's just fine now. You need to be aware of some domain-specific slang in any project. We should already have learned that class and className is not the same thing and what each means :)

jorgebucaran commented 6 years ago

@bn-l Hi! I renamed the module to classcat and published 1.0.0. If you were using it, please upgrade. 👋😄

everdimension commented 5 years ago

What was the original name?

jorgebucaran commented 5 years ago

@everdimension The original name was classwrap.