You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-inline] better name for initial-letters property #2950
People have been confused that the initial-letters property sounds more like a selector than a property that changes the rendering of text. Let the bikeshedding begin!
I'm not sure if the specific numbers you suggest are common enough to make default. But, I do like the idea of keywords dropped and raised for the two most common use-cases for the second property. (I personally find it confusing that you need to specify a "drop" of 1 for not-dropped-at-all.)
Unless the plan is to extend this property to apply beyond first child or first pseudo-element in a block, I think it is useful to preserve the initial- (or initials-) prefix for the properties.
What's to say that this isn't a possibility in the future?
Remember how we started off with grid-gap but then everyone said that they wanted grid-gap in flexbox? The name grid-gap didn't make sense in flexbox though so it was changed to just gap.
That was a mess that we would have preferred to avoid.
Naming a property based on what restrictions the current spec has on it isn't future proofing the property. If we want to extend this functionality to floated images (something I can definitely see happening one day) we want a more generic property that will still make sense in that context.
That being said I LOVE the idea of line-span as the new name.
It does exactly what you think it does
we already have the line term in line-height and "line" means the same thing in both of them so I don't think it is going to get confused for anything
span is the perfect term for how it behaves since it aligns with how we think of span in CSS Grid
it is abstract enough to be used on anything if the spec changes in the future to allow it to be used in more contexts
you don't need any graphic design hystory knowledge to understand the naming of the term
it is easily translated into other languages
it's super easy to spell and remember
I definitely 100% vote for line-span as the new property name. ❤
I’d never heard of lettrine and versals before either. “Lettrine” sounds too much “latrine” and is too easy to misspell. “Versal” is easier to spell and is nice and short, and doesn’t care about plural or not. But my autocorrect keeps trying to make it “vernal”. I’d be OK with it.
I prefer just “initial”, as it does seem more like the noun that way, and it is short. (Lettrine derives from Latin “initialis”, BTW, which means “standing at the beginning”, according to Wikipedia.)
I don't think we're going to extend this feature to span lines in the middle of the paragraph, so using initial somewhere in the name is probably fine. There are other features like warichu and ruby in Japanese that do interesting things with line layout, but they're different enough that they'd need a different layout mechanism. So applying only to the first item in a paragraph is a restriction that, afaict, we're going to keep.
I would lean towards @AmeliaBR’s proposal therefore, because I think it's clearer about that aspect (and leaves open such generic words as line-span for things like warichu, if we go down that path). line-span seems just too generic for something that very specifically applies only to ::first-letter and pretenders.
[Wrt history: earlier grid proposals shared row-gap with e.g. multicolumn layout, so there was already a sense of wanting to share that--it was a mistake (mine) to later make it grid-specific.]
Or big-letter. I prefer the singular, since it is primarily a single letter, even though there can sometimes be punctuation too. If we had big-text Or even line-span makes it sound (to me) like something that could apply to any range of text or inline element.
Looking at this fresh, I feel like we are struggling to make initial work in any sort of way, and it's just not working. CSS Properties are descriptive of the change that the property will make (like font-size), and not of the motivation for making the change (not 'readable-type). Initial ends up sounding like an adjective, and gets easily confused with first-letter`. It doesn't come across as a noun.
I like what line-span does — it describes the context, affecting lines, and the result, setting a span across several lines. But as many have argued, span could be easily confused with its other meanings in HTML & CSS.
What if we try to find other words to do what line-span would do. Synonyms for "span" include:
interval
length
period
space
spell
stretch
term
amount
compass
extent
measure
reach
spread
time
line-spread? line-reach? character-spread?
???
Then you'd end up with character-spread-align character-spread-wrap
or line-reach-align line-reach-wrap
or something down this road...
Don't go with character-*. "character" suggests the inline (horizontal) direction whereas "line" suggests the block (vertical) direction.
This property is all about the vertical/block direction so we should use line-*. Whatever the name ends up being the first word of that name should be "line".
Out of the possible second words you provided, I like these possibilities:
line-span: would be nice if the property actually applied to any element (like a floated image), but it doesn't communicate the "initial" restrictions in the spec.
@Dan503 I think resorting to the use of a generic line- prefix will always leave authors wanting. Especially when we've already taught them line-height as something that doesn't solely apply to these "initial letters".
The CSS Working Group just discussed better name for initial-letters property.
The full IRC log of that discussion
<dael> Topic: better name for initial-letters property
<dael> github: https://github.com//issues/2950#issuecomment-438736819
<dael> jensimmons: As issue says we're debating a name. Kinda hit me is a way to approach is desc what this does. I wrote some stuff, but I disagree with myself.
<dael> jensimmons: Right now I'm thinking maybe line-span is a poss. I originally rejected because span is in the html, but there's em in html and em unit in CSS and that's never confused.
<dael> fantasai: Okay with that
<dael> jensimmons: Made me wonder if you can do more than make a letter big. Like if you had an image would it do anything?
<dael> fantasai: Yes, if you apply to an atomic element it will apply. There is text on how this works with inline blocks and images.
<dael> astearns: Def. intended to work in that case
<dael> fantasai: I think that was my favorite from the list
<dael> astearns: Other opinions?
<dael> dauwhe: Plausable to me
<AmeliaBR> But to clarify: it still only applies to the first element of a block? So that's the bit that isn't conveyed by the name.
<dael> bradk: line-span makes it sound like it would be any inline element and it would span the line. That was my concern
<dael> jensimmons: Agree we need to think about that
<dael> astearns: Table this for now and get to it at F2F. Let's try and get to this on the first day to make sure we give it needed time
Activity
AmeliaBR commentedon Jul 25, 2018
@Crissov
I'm not sure if the specific numbers you suggest are common enough to make default. But, I do like the idea of keywords
droppedandraisedfor the two most common use-cases for the second property. (I personally find it confusing that you need to specify a "drop" of 1 for not-dropped-at-all.)droppedwould still be the default, and any other levels of sunken-ness could still be set with integer values.This is maybe a separate issue, though.
Dan503 commentedon Jul 25, 2018
@AmeliaBR
What's to say that this isn't a possibility in the future?
Remember how we started off with
grid-gapbut then everyone said that they wantedgrid-gapin flexbox? The namegrid-gapdidn't make sense in flexbox though so it was changed to justgap.That was a mess that we would have preferred to avoid.
Naming a property based on what restrictions the current spec has on it isn't future proofing the property. If we want to extend this functionality to floated images (something I can definitely see happening one day) we want a more generic property that will still make sense in that context.
That being said I LOVE the idea of
line-spanas the new name.lineterm inline-heightand "line" means the same thing in both of them so I don't think it is going to get confused for anythingspanis the perfect term for how it behaves since it aligns with how we think ofspanin CSS GridI definitely 100% vote for
line-spanas the new property name. ❤bradkemper commentedon Jul 25, 2018
I’d never heard of lettrine and versals before either. “Lettrine” sounds too much “latrine” and is too easy to misspell. “Versal” is easier to spell and is nice and short, and doesn’t care about plural or not. But my autocorrect keeps trying to make it “vernal”. I’d be OK with it.
I prefer just “initial”, as it does seem more like the noun that way, and it is short. (Lettrine derives from Latin “initialis”, BTW, which means “standing at the beginning”, according to Wikipedia.)
frivoal commentedon Jul 26, 2018
line-spanseems OK with me (together withline-span-alignandline-span-wrap).I'd rather not keep
initialin the name, as that about what it applies to rather than what it does, and that invites the confusion with selectors.fantasai commentedon Jul 27, 2018
I don't think we're going to extend this feature to span lines in the middle of the paragraph, so using
initialsomewhere in the name is probably fine. There are other features like warichu and ruby in Japanese that do interesting things with line layout, but they're different enough that they'd need a different layout mechanism. So applying only to the first item in a paragraph is a restriction that, afaict, we're going to keep.I would lean towards @AmeliaBR’s proposal therefore, because I think it's clearer about that aspect (and leaves open such generic words as
line-spanfor things like warichu, if we go down that path).line-spanseems just too generic for something that very specifically applies only to::first-letterand pretenders.[Wrt history: earlier grid proposals shared
row-gapwith e.g. multicolumn layout, so there was already a sense of wanting to share that--it was a mistake (mine) to later make it grid-specific.]bradkemper commentedon Aug 3, 2018
How about
big:? It always makes the letter bigger.bradkemper commentedon Aug 3, 2018
Or
big-letter. I prefer the singular, since it is primarily a single letter, even though there can sometimes be punctuation too. If we hadbig-textOr evenline-spanmakes it sound (to me) like something that could apply to any range of text or inline element.jensimmons commentedon Nov 14, 2018
Looking at this fresh, I feel like we are struggling to make
initialwork in any sort of way, and it's just not working. CSS Properties are descriptive of the change that the property will make (likefont-size), and not of the motivation for making the change (not 'readable-type). Initial ends up sounding like an adjective, and gets easily confused withfirst-letter`. It doesn't come across as a noun.I like what
line-spandoes — it describes the context, affecting lines, and the result, setting a span across several lines. But as many have argued,spancould be easily confused with its other meanings in HTML & CSS.What if we try to find other words to do what
line-spanwould do. Synonyms for "span" include:interval
length
period
space
spell
stretch
term
amount
compass
extent
measure
reach
spread
time
line-spread?line-reach?character-spread????
Then you'd end up with
character-spread-aligncharacter-spread-wrapor
line-reach-alignline-reach-wrapor something down this road...
jensimmons commentedon Nov 14, 2018
Actually, I think
line-reachis confusing reading it back.character-reachandline-spreadare better first rough thoughts.Dan503 commentedon Nov 14, 2018
Don't go with
character-*. "character" suggests the inline (horizontal) direction whereas "line" suggests the block (vertical) direction.This property is all about the vertical/block direction so we should use
line-*. Whatever the name ends up being the first word of that name should be "line".Out of the possible second words you provided, I like these possibilities:
jonjohnjohnson commentedon Nov 15, 2018
As @AmeliaBR says...
@Dan503 I think resorting to the use of a generic
line-prefix will always leave authors wanting. Especially when we've already taught themline-heightas something that doesn't solely apply to these "initial letters".Dan503 commentedon Nov 15, 2018
Ah yes, that's a good point. Maybe not
line-*then. 🤔In that case we should think of what all the possible names for that first big letter could be.
These are names I can think of:
cap-*drop-*principle-*prominent-*lead-*hero-*first-*giant-*giga-*mega-*boss-*master-*booster-*pro-*chief-*css-meeting-bot commentedon Jan 23, 2019
The CSS Working Group just discussed
better name for initial-letters property.The full IRC log of that discussion
<dael> Topic: better name for initial-letters property<dael> github: https://github.com//issues/2950#issuecomment-438736819
<dael> jensimmons: As issue says we're debating a name. Kinda hit me is a way to approach is desc what this does. I wrote some stuff, but I disagree with myself.
<dael> jensimmons: Right now I'm thinking maybe line-span is a poss. I originally rejected because span is in the html, but there's em in html and em unit in CSS and that's never confused.
<dael> fantasai: Okay with that
<dael> jensimmons: Made me wonder if you can do more than make a letter big. Like if you had an image would it do anything?
<dael> fantasai: Yes, if you apply to an atomic element it will apply. There is text on how this works with inline blocks and images.
<dael> astearns: Def. intended to work in that case
<dael> fantasai: I think that was my favorite from the list
<dael> astearns: Other opinions?
<dael> dauwhe: Plausable to me
<AmeliaBR> But to clarify: it still only applies to the first element of a block? So that's the bit that isn't conveyed by the name.
<dael> bradk: line-span makes it sound like it would be any inline element and it would span the line. That was my concern
<dael> jensimmons: Agree we need to think about that
<dael> astearns: Table this for now and get to it at F2F. Let's try and get to this on the first day to make sure we give it needed time
fantasai commentedon Jun 3, 2020
RESOLVED: Stay with the name
initial-letter