-
Notifications
You must be signed in to change notification settings - Fork 707
[css-inline] better name for initial-letters property #2950
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
Comments
I dropped a question about this on Twitter, to see what people might say: It seems the crux of the problem is that Initial Letter (a graphic design term, used along with Drop Cap, where Initial means big text that sits on the baseline and rises above the rest of the text, where Drop Cap drops down into the text) — the word "Initial" in graphic design is a noun. And yet, when it's used in CSS, it seems like an adjective. Ideas (first mine, second from Twitter):
p::first-letter { initial: 5; } I wonder how |
Wikipedia uses initial, which is probably the most accurate term in English. Something about line-span makes me worry about confusion with the html element |
I dropped this into a Slack channel and got a variety of suggestions:
This discussion raised questions like "What about characters? Does it have to be text? |
Also
|
Florian suggested so maybe
|
|
So maybe (to borrow from @jensimmons suggestion, which seems to work for the relevant value space) |
I agree with @astearns about using initials, and I like the idea of using span. I'll suggest
maybe? |
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 However, I agree that the suffix I would argue against the following suggestions:
I think The other properties would just be (Sadly, there is no potential for an |
Found this conversation via Jen Simmon's tweet. Here to provide a bit of context on how we approached drop caps in old-school (pre-internet) typography, and hopefully to help guide this discussion a bit from that context. Selector
PropertiesVersals generally had two parameters:
Relevant to this discussion:In this case, this seems to be a property that's being applied to the existing In an ideal world, this would be styled as
because this is being applied to the
|
Hi @wjmoner and @kgcreative, there's a full spec for all the relevant properties and their syntax at https://drafts.csswg.org/css-inline-3/#initial-letter-styling ; we're just looking for a new property name. :) |
@AmeliaBR WFM |
Iʼd like to approach this with non-existing keywords for the most common cases in mind. These sound reasonable to me: selector {
text-initial: dropped; line-initial: dropped; initial: dropped; /* = 3 3 */
text-initial: sunken; line-initial: sunken; initial: sunken; /* = 3 2 */
text-initial: raised; line-initial: raised; initial: raised; /* = 3 1 */
} In particular, |
to build off of @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 [property-name]: 3 dropped;
[property-name]: 2 raised;
This is maybe a separate issue, though. |
What's to say that this isn't a possibility in the future? Remember how we started off with 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
I definitely 100% vote for |
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'd rather not keep |
I don't think we're going to extend this feature to span lines in the middle of the paragraph, so using I would lean towards @AmeliaBR’s proposal therefore, because I think it's clearer about that aspect (and leaves open such generic words as [Wrt history: earlier grid proposals shared |
How about |
Or |
Looking at this fresh, I feel like we are struggling to make I like what What if we try to find other words to do what
Then you'd end up with |
Actually, I think |
Don't go with This property is all about the vertical/block direction so we should use Out of the possible second words you provided, I like these possibilities:
|
As @AmeliaBR says...
@Dan503 I think resorting to the use of a generic |
Ah yes, that's a good point. Maybe not 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:
|
The CSS Working Group just discussed 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 |
RESOLVED: Stay with the name |
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!Some possibilities:
Constraints:
Spec link
The text was updated successfully, but these errors were encountered: