Skip to content

Rename tracking-* to letters-* #665

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

Closed
wants to merge 1 commit into from
Closed

Rename tracking-* to letters-* #665

wants to merge 1 commit into from

Conversation

adamwathan
Copy link
Member

This PR changes the name of our letter-spacing classes from tracking-* to letters-*.

Old Class New Class
tracking-tight letters-tight
tracking-normal letters-normal
tracking-wide letters-wide

The motivation for this is the same as in #664. "Tracking" is not as well known in the web development world as "letter spacing" and since the CSS property is letter-spacing anyways I think it makes sense to stay closer to that.

I considered letter-spacing-* and ls-* as potential names as well, but letter-spacing-* is too long and ls-* is a bit too cryptic, as unlike line-height it's not quite as commonly used and ls-* could also mean list-style.

I considered also switching to a numeric scale, but because of the negative values it's awkward (letters--1 or -letters-1). Using descriptive names like tight and wide is better in my opinion, and if necessary could be expanded with tightest, tighter, wider, and widest, which should be plenty of options.

This PR also changes the core plugin name from tracking to letterSpacing, so letter-spacing values would be customized by editing the letterSpacing key in the theme section of your config, and variants would be customized by editing the letterSpacing key in the variants section of your config. This is in line with #656 and along with the class name change, and makes these settings more easily guessable.

@sandren
Copy link

sandren commented Feb 18, 2019

I think that ls prefixed class names would only be cryptic if they were attached to a numeric scale such as ls-2. However with a semantic values like ls-wide, I don't think anyone would misinterpret them as list-style types.

I also wanted to note that if we decide to expand the number of values for letter-spacing, I would suggest not using a linear scale. Typography with very wide tracking is quite common in both print and web design, but you can only condense type so much before it begins to overlap. So negative values beyond a certain point cease to have any purpose.

Therefore it would be best if the negative values scale much slower than the positive values. Something like this might work:

.ls-condensed {
  letter-spacing: -0.1em;
}

.ls-tightest {
  letter-spacing: -0.05em;
}

.ls-tighter {
  letter-spacing: -0.025em;
}

.ls-tight {
  letter-spacing: -0.0125em;
}

.ls-normal {
  letter-spacing: 0;
}

.ls-wide {
  letter-spacing: 0.0625em;
}

.ls-wider {
  letter-spacing: 0.125em;
}

.ls-widest {
  letter-spacing: 0.25em;
}

.ls-extended {
  letter-spacing: 0.5em;
}

@dillingham
Copy link

dillingham commented Feb 18, 2019

I think this is a great move.

Only feedback is it would be cool if somehow letters and lines shared a convention for their prefix and sizes and was singular like the css property and existing css convention of letter word line

property maybe nice
letter-spacing letter-tight letter-2
line-height line-tight line-3
word-spacing word-tight word-4

@Mrkisha
Copy link

Mrkisha commented Feb 18, 2019

why no use spacing:

Old Class New Class
tracking-tight spacing-tight
tracking-normal spacing-normal
tracking-wide spacing-wide

@sandren
Copy link

sandren commented Feb 19, 2019

why not use spacing

I still prefer the ls- prefix (i.e., if we also change leading- to lh-), but I agree that spacing- makes more sense than letters-.

@dillingham
Copy link

dillingham commented Feb 19, 2019

@sandren the post says why ls isn’t good.

With spacing it’s not obvious what it’s spacing when you read it, could apply to anything that needs spacing. Letters words lines columns.

@adamwathan
Copy link
Member Author

Yeah not gonna use spacing-*, way too ambiguous and made even more confusing by the fact that we have a spacing key in the config for defining your shared padding/margin scale: #661

@sandren
Copy link

sandren commented Feb 19, 2019

Good points, @dillingham and @adamwathan. Though I'm concerned that letters- is fairly ambiguous itself.

@jsblair9
Copy link

personally tracking never bothered me -- have print design in my past so the term made perfect sense. Won't be mad about the change, but am in favor of keeping the tight, normal, wide pattern

@Mrkisha
Copy link

Mrkisha commented Feb 19, 2019

tracking is ambiguous, and I have to go to doc all the time to figure what it is. letters, maybe. Most definitely not ls-xxxxx.

@adamwathan
Copy link
Member Author

Decided to just leave everything as is, more here: #667 (comment)

No point breaking people's sites for a class name change that I'm not even sure is actually better.

@adamwathan adamwathan closed this Feb 19, 2019
@adamwathan adamwathan deleted the rename-tracking branch May 13, 2019 14:00
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.

5 participants