W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

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

From: Tommy Hodgins via GitHub <sysbot+gh@w3.org>
Date: Tue, 28 Nov 2017 19:08:21 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-347630558-1511896100-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 28 November 2017 19:08:29 UTC