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-pseudo] ::first-letter should include currency #5099
Currently ::first-letter is limited to punctuation and typographic letter unit. This covers many use cases, however, its not uncommon to also use currency at the start of a paragraph/sentence. It would be reasonable to assume that the styles to a currency symbol, for example it seems odd for 100 dollars to work but not $100.
I guess the reasonable proposal here would be to include Symbols alongside Letters and Digits as possible first letters? That would pull out the dollar sign in your example.
I've never seen a specially-styled first symbol. You wouldn't happen to have examples where this would actually be useful?
The only example I have is a bit self serving, but I ran into this when trying to style specially formatted variables in code with a leading $ to have different styles for the $ then the rest of the variable. I couldn't added additional markup, so using the ::first-letter selector worked in some browsers, but not all.
I also think the example of a sentence with a mention of currency "$100 was the amount needed to..." would be awkward if this was formatted differently than all other sentences in a paragraph
Seems like both Blink and WebKit include Symbols alongside Letters and Numbers, and it makes pretty good sense so I suggest we do it. Agenda+ to get WG approval.
The CSS Working Group just discussed [css-pseudo] ::first-letter should include currency, and agreed to the following:
RESOLVED: include symbols when looking for first-letter
The full IRC log of that discussion
<dael> Topic: [css-pseudo] ::first-letter should include currency
<dael> github: https://github.com//issues/5099
<dael> Rossen_: Has a test case in it
<dael> fantasai: Prop is we include symbols along with letters and numbers when looking for first-letter
<dael> fantasai: Makes sense and we should do it. Otherwise if you start paragraph with a symbol there isn't a first-letter. Blink and WK do this
<dael> Rossen_: Any reasons why we shouldn't do it?
<tantek> should we include # also in case you start your paragraph with a hashtag?
<bradk> +1
<dael> Rossen_: Obj to inlcude symbols when looking for first-letter?
<dael> RESOLVED: include symbols when looking for first-letter
Activity
fantasai commentedon Sep 11, 2020
I guess the reasonable proposal here would be to include Symbols alongside Letters and Digits as possible first letters? That would pull out the dollar sign in your example.
I've never seen a specially-styled first symbol. You wouldn't happen to have examples where this would actually be useful?
maclockard commentedon Sep 14, 2020
The only example I have is a bit self serving, but I ran into this when trying to style specially formatted variables in code with a leading
$to have different styles for the$then the rest of the variable. I couldn't added additional markup, so using the::first-letterselector worked in some browsers, but not all.I also think the example of a sentence with a mention of currency "$100 was the amount needed to..." would be awkward if this was formatted differently than all other sentences in a paragraph
fantasai commentedon Dec 31, 2020
testcase
Seems like both Blink and WebKit include Symbols alongside Letters and Numbers, and it makes pretty good sense so I suggest we do it. Agenda+ to get WG approval.
css-meeting-bot commentedon Jan 13, 2021
The CSS Working Group just discussed
[css-pseudo] ::first-letter should include currency, and agreed to the following:RESOLVED: include symbols when looking for first-letterThe full IRC log of that discussion
<dael> Topic: [css-pseudo] ::first-letter should include currency<dael> github: https://github.com//issues/5099
<dael> Rossen_: Has a test case in it
<dael> fantasai: Prop is we include symbols along with letters and numbers when looking for first-letter
<dael> fantasai: Makes sense and we should do it. Otherwise if you start paragraph with a symbol there isn't a first-letter. Blink and WK do this
<dael> Rossen_: Any reasons why we shouldn't do it?
<tantek> should we include # also in case you start your paragraph with a hashtag?
<bradk> +1
<dael> Rossen_: Obj to inlcude symbols when looking for first-letter?
<dael> RESOLVED: include symbols when looking for first-letter
[css-pseudo-4] Add Symbols to possible First Letters. #5099