Re: [csswg-drafts] [css-text] Add new CSS text-transform values for math (#3745)

I think this is a good idea. In addition to their use in math typesetting, these characters have gained some notoriety as faux-fonts & it would be nice to have a way to use them without destroying the meaning of the text content.

(It wouldn't get rid of the underlying reason they became popular: social media that supports full Unicode but not rich text formatting. _But_, it would mean that a conscientious web developer working an a CSS environment could recreate that visual effect in an accessible way.)

I agree with Brian about using keywords instead of a function notation, since the `math()` function in the proposal seems to be merely a namespacing technique, and doesn't imply an operation

Some other thoughts:

1. Can the `auto` value be handled by user agent stylesheets? We don't really have a pseudoclass for "has no element children", but that seems to be all you want: `math|mi:no-children { text-transform: math-italic }` 

2. If we're considering the general/decorative use case, and not just on math typesetting, there are a few other conversions that I'd include:

   - `circled` for ASCII letters and digits (ⒶⒷⒸⓐⓑⓒ①②③) and maybe some punctuation (⊜⊛) and Hangul, katakana, and CJK ideographs (I don't know enough about what the circled CJK characters mean/how they are used to know if it makes sense as a stylistic transform)

   - `circled-black` or `circled-negative` for digits and capital ASCII letters (🅐🅑🅒❶❷❸)

   - `squared` (🄰🄱🄲) and `squared-black` or `squared-negative` (🅰🅱🅲) for capital ASCII letters (Note: would have to deal with browsers that upgrade some of the negative squared letters to "blood type marker emoji")

   Both the circled and squared transformations could be made more general if we accept that a text-transform can consist of adding a combining character after each character in the sequence.
 
3. Should there be any Unicode normalization happening before the transformation? E.g., to decompose é into e +´ so that the letter can be transformed to a math formatting character and then the accent combined with the replacement?
 
4. Based on the grammar, `text-transform: capitalize math-fraktur` would be allowed. It should probably be clear what the order of operations is, because there are a few case conversions that switch letters in/out of the ASCII range and therefore affect whether there are formatting conversions available.
 
5. I think the grammar Brian posted should be modified to include square brackets around `full-width || full-size-kana`, otherwise it also allows `text-transform: full-width math-fraktur`. I don't think full-width variants of the math characters exist, at least not as dedicated Unicode points.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3745#issuecomment-474895940 using your GitHub account

Received on Wednesday, 20 March 2019 15:50:06 UTC