-
Notifications
You must be signed in to change notification settings - Fork 416
MSC2422: Allow color on font tag #2422
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b47de28
MSC2422: Allow color on font tag
deepbluev7 438ff8f
Update proposals/2422-allow-color-attribute-on-font-tag.md
deepbluev7 6b2752c
Update proposals/2422-allow-color-attribute-on-font-tag.md
deepbluev7 b760ec2
Add comments why alternatives to MSC2422 weren't chosen
deepbluev7 2d85422
Update proposals/2422-allow-color-attribute-on-font-tag.md
deepbluev7 28dc6a0
Update proposals/2422-allow-color-attribute-on-font-tag.md
deepbluev7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # MSC2422: Allow `color` as attribute for `<font>` in messages | ||
|
|
||
| Currently the spec requires you to use `data-mx-color` instead of the standard | ||
| `color` html attribute for the `<font>` tag. This is probably done to make it | ||
| consistent with `<span>`, where you may not want to allow a generic style tag for. | ||
|
|
||
| On the other hand the /rainbow command on almost every client just uses the | ||
| `color` attribute of the `<font>` tag. While some clients support | ||
| `data-mx-color` (i.e. Riot Web), most clients don't. Most clients support | ||
| rendering `color` however. | ||
|
|
||
| It would probably be for the best to allow or even prefer `color` on the | ||
| `<font>` tag. | ||
|
|
||
| ## Proposal | ||
|
|
||
| Add the `color` attribute to the allowed attributes of `<font>` in section | ||
| 13.2.1.7. Allow only hexcodes as allowed value for this attribute for now. | ||
deepbluev7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Potential issues | ||
|
|
||
| - We now have a redundant attribute in the spec. While it matches, what the | ||
deepbluev7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| clients currently do, it may be better to fix each client instead. | ||
| - Clients may not sanitize the color attribute and will let other color values | ||
| through, increasing compatibility issues again. | ||
| - Clients may never support the data-mx-* attributes now. | ||
| - Old messages could loose their color | ||
| - This proposal doesn't touch span at all, maybe it should? | ||
|
|
||
| ## Alternatives | ||
|
|
||
| - fix the clients | ||
| - remove the `data-mx-color` and `data-mx-bg-color` attributes entirely, leaving | ||
| us just with `color` for `<font>` | ||
| - Add a section to tell the clients to prefer `color` over `mx-data-color` | ||
| - Spec an entirely different format for messages (that would probably not make | ||
| this proposal obsolete) | ||
deepbluev7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.