Closed bn-l closed 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? 🤔
Very good point.
CssStyleConcat
StyleWrap CSSWrapUp CondStyleWrap
I'm spent. I need a cigarette.
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.
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.
@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! :)
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 :)
@bn-l Hi! I renamed the module to classcat and published 1.0.0. If you were using it, please upgrade. 👋😄
What was the original name?
@everdimension The original name was classwrap.
Consider changing name. Thought this was something for cond inheritance.