{"action":"opened","issue":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2595","repository_url":"https://api.github.com/repos/w3c/csswg-drafts","labels_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2595/labels{/name}","comments_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2595/comments","events_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2595/events","html_url":"https://github.com/w3c/csswg-drafts/issues/2595","id":315936275,"number":2595,"title":"[css-overflow] text-overflow and anonymous blocks","user":{"login":"Loirooriol","id":7477678,"avatar_url":"https://avatars1.githubusercontent.com/u/7477678?v=4","gravatar_id":"","url":"https://api.github.com/users/Loirooriol","html_url":"https://github.com/Loirooriol","followers_url":"https://api.github.com/users/Loirooriol/followers","following_url":"https://api.github.com/users/Loirooriol/following{/other_user}","gists_url":"https://api.github.com/users/Loirooriol/gists{/gist_id}","starred_url":"https://api.github.com/users/Loirooriol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Loirooriol/subscriptions","organizations_url":"https://api.github.com/users/Loirooriol/orgs","repos_url":"https://api.github.com/users/Loirooriol/repos","events_url":"https://api.github.com/users/Loirooriol/events{/privacy}","received_events_url":"https://api.github.com/users/Loirooriol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T15:47:51Z","updated_at":"2018-04-19T15:47:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`text-overflow` is defined in [CSS UI](https://drafts.csswg.org/css-ui-3/#text-overflow) (should be moved into CSS Overflow per resolution) as:\r\n\r\n - Applies to: block containers\r\n - Inherited: no\r\n\r\nSince the property controls how inline contents overflow line boxes, I would assume that the value that matters is the one of the block container that establishes the inline formatting context to which the line boxes belong.\r\n\r\nThe problem is that properties that apply to IFC roots should be inheritable, because lots of IFC roots are anonymous blocks. But this is a special case, because `text-overflow` has effect only if `overflow` is not `visible`, and `overflow` is definitely not inherited. Therefore it cannot just be said that anonymous blocks must act as if they were assigned `text-overflow: inherit` via a rule in the UA origin (because `overflow` should definitely not be inherited)\r\n\r\nSo consider this example: https://jsfiddle.net/fck9xqtx/\r\n\r\n```html\r\n<div id=\"test1\">abcdefghijklmoqrstuvwxyz</div>\r\n<div id=\"test2\">\r\n  <div>-</div>\r\n  <div>abcdefghijklmoqrstuvwxyz</div>\r\n</div>\r\n```\r\n```css\r\n#test1, #test2 {\r\n  text-overflow: ellipsis;\r\n  overflow: hidden;\r\n  width: 50px;\r\n}\r\n#test1::before {\r\n  content: \"-\";\r\n  display: block;\r\n}\r\n```\r\n\r\nIn `#test1` there is a `::before` block, and then the other text is wrapped inside an anonymous block which is what establishes the IFC (and not `#test1`).\r\n\r\nIn `#test2` it's basically the same, but now the inner block is element-generated.\r\n\r\nBoth Firefox and Chrome show ellipsis in `#test1` and do not in `#test2`. Edge does not show ellipsis in either case.\r\n\r\nGiven the current definitions, I think Edge's behavior makes more sense, but it's not useful because anonymous blocks can't be selected to assign `text-overflow` and `overflow` styles. Additionally I think IFC should always be established by anonymous blocks, but with Edge's behavior this would mean that `text-overflow` would never work.\r\n\r\nSo I think the spec should say something like that anonymous blocks are ignored even if the IFC is established by them, and that the values of `text-overflow` and `overflow` that matter are the ones of the nearest non-anonymous block ancestor."}}
{"actor":{"display_login":"Loirooriol"}}