{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/webvtt/issues/272","labels_url":"https://api.github.com/repos/w3c/webvtt/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/w3c/webvtt/issues/272/comments","events_url":"https://api.github.com/repos/w3c/webvtt/issues/272/events","html_url":"https://github.com/w3c/webvtt/issues/272","id":117920996,"number":272,"title":"Have tags for specifying color and background color","user":{"login":"zcorpan","id":244772,"avatar_url":"https://avatars.githubusercontent.com/u/244772?v=3","gravatar_id":"","url":"https://api.github.com/users/zcorpan","html_url":"https://github.com/zcorpan","followers_url":"https://api.github.com/users/zcorpan/followers","following_url":"https://api.github.com/users/zcorpan/following{/other_user}","gists_url":"https://api.github.com/users/zcorpan/gists{/gist_id}","starred_url":"https://api.github.com/users/zcorpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcorpan/subscriptions","organizations_url":"https://api.github.com/users/zcorpan/orgs","repos_url":"https://api.github.com/users/zcorpan/repos","events_url":"https://api.github.com/users/zcorpan/events{/privacy}","received_events_url":"https://api.github.com/users/zcorpan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/webvtt/labels/addition/proposal","name":"addition/proposal","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-11-19T22:16:42Z","updated_at":"2015-11-30T17:22:47Z","closed_at":null,"body":"See https://github.com/w3c/webvtt/pull/261#issuecomment-158187662\r\n\r\nAgain I suppose this would be needed on the cue level as well as on the element level, if it should be possible to override the default background color.\r\n\r\nI don't particularly like adding new elements for color, it seems like it would be better to be able to set colors on any element, like you can set classes on any element.\r\n\r\nWe could allow color specifiers at the end of start tags, as annotations. For elements that already require annotations, we could make a \"#\" switch from annotation to color. (It would be possible to write stylesheets that work in legacy clients using `^=` attribute selector, e.g. `v[voice^=Roger]`.)\r\n\r\n```\r\nWEBVTT\r\n\r\n00:00:00.000 --> 00:00:10.000.foo.bar align:left #FFF #000\r\n<v.foo.bar Roger #FFF #000>Hello\r\n```\r\n\r\nThe cue itself has classes \"foo\" and \"bar\", color \"\\#FFF\", background color \"\\#000\".\r\nThe `v` element has the same classes, annotation \"Roger\", same colors.\r\n\r\nTo support non-opaque colors, we can use hex annotation with 4 or 8 characters (this is supported in CSS now, per spec at least). e.g. fully transparent black is \\#0000 or \\#00000000. https://drafts.csswg.org/css-color/#hex-notation\r\n\r\nThe colors specified this way would be overridable with CSS, so it's like HTML `<font color>`, not like `style=\"...\"`."},"comment":{"url":"https://api.github.com/repos/w3c/webvtt/issues/comments/160695390","html_url":"https://github.com/w3c/webvtt/issues/272#issuecomment-160695390","issue_url":"https://api.github.com/repos/w3c/webvtt/issues/272","id":160695390,"user":{"login":"dwsinger","id":11635897,"avatar_url":"https://avatars.githubusercontent.com/u/11635897?v=3","gravatar_id":"","url":"https://api.github.com/users/dwsinger","html_url":"https://github.com/dwsinger","followers_url":"https://api.github.com/users/dwsinger/followers","following_url":"https://api.github.com/users/dwsinger/following{/other_user}","gists_url":"https://api.github.com/users/dwsinger/gists{/gist_id}","starred_url":"https://api.github.com/users/dwsinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwsinger/subscriptions","organizations_url":"https://api.github.com/users/dwsinger/orgs","repos_url":"https://api.github.com/users/dwsinger/repos","events_url":"https://api.github.com/users/dwsinger/events{/privacy}","received_events_url":"https://api.github.com/users/dwsinger/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T17:22:47Z","updated_at":"2015-11-30T17:22:47Z","body":"\n> On Nov 30, 2015, at 7:23 , Simon Pieters <notifications@github.com> wrote:\n> \n> Since WebVTT limits what can be done, a WebVTT UA would not need to have \"full\" CSS support. It would need to implement css-syntax, css-cascade, selectors, and the properties mentioned in the WebVTT spec (or only those that the UA wishes to support).\n> \n> I am slightly worried that, even if we add colors as proposed here, it's not going to be enough (is font-size needed? font-family? text-shadow?), which seems like a slippery slope towards reinventing CSS.\n\nI really fear that saying “you only have to implement a subset of CSS” is very hard to keep contained, or even well-defined. As I said before, I suspect it’s pulling on one strand of spaghetti, and you end up with the entire plateful in your lap.\n\nI’m not sure we even need to say very much.  Perhaps all we need is to say that user-agents adopting the non-CSS conformance point are strongly encouraged to be required to behave as if certain basic styling were nonetheless available, especially being able to use a set of colors, and that such user-agents should behave as if some basic style-sheets were ‘built in’ to the user-agent (e.g. the style-sheet that support 608/708)?\n\nIt’s not realyl a VTT-spec. problem here, it’s a problem for adopters of this conformance point.\n \nDavid Singer\nManager, Software Standards, Apple Inc.\n\n"}}