Re: [csswg-drafts] [css-break-3][css-overflow] Proposal for pseudo-selector :cropped-content

Ah okay, so you're thinking more horizontally then :D I've got a [demo of 'overflow shadows'](https://codepen.io/tomhodgins/pen/egpmWN) that make use of `scrollLeft`, `offsetWidth`, and `scrollWidth` of elements to compute whether a child element of another element is:

- not cropped
- cropped on the left side
- cropped on the right side

It should be possible to 'translate' my EQCSS demo here to native HTML + CSS + JS in the same way I did for the last demo.

Would this be something that applied only to individual elements, or would it apply to elements containing child HTML elements as well? In this example I'm working with 2 elements (rather than one) in order to measure something that's cut off, but it makes me wonder if we need something like:

- `:cropped-x-start`
- `:cropped-x-end`
- `:cropped-y-start`
- `:cropped-y-end`

Where `start` = left, and `end` = right for Left-to-Right reading modes to cover all of the cases where content could be cut off. Is that closer to what you're thinking about?

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

Received on Tuesday, 28 November 2017 19:08:25 UTC