Skip to content
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

CSS: element property : device-overflow-inflation-width + device-overflow-inflated-width #10404

Closed
wesleyolis opened this issue Jun 8, 2024 · 2 comments

Comments

@wesleyolis
Copy link

Hi,

I would like to propose the following, which would allow developers to easily identify overflow issues, and correctly deal with them,
to ensure their pages render correctly.

With the new render modes as suggested and proposed in #10403
The following properties would make mobile development so much better.
The names of the properties could be shortened.

.classname[device-overflow-inflated-width]::before {
display:block; // force the item onto a new rendering line.
}
}
.classname[device-overflow-inflated-width] {
display:clip;
background-color:red
}
}
@Loirooriol
Copy link
Contributor

  1. That's not a property, that's an attribute selector that already has a meaning. I suspect you want a new pseudo-class.
  2. I don't understand what you are trying to achieve. Are you trying to apply styles depending on whether there are elements overflowing the viewport? That's circular, and a duplicate of [selectors-5] Proposal for pseudo-selector :overflowed-content #2011

@wesleyolis
Copy link
Author

wesleyolis commented Jul 22, 2024

@Loirooriol Yes, I would want to apply styles to elements that overflow the viewport, to selectively re-align or change the layout, such that they fall into the viewport and in the case of this proposal, prevent the viewport from being blowing up and limit that for mobiles to a factor and zoom, such pages have less issues rendering on mobile and it then just work, see #10403

  1. I am using an attribute selector to inspect the property, but using a pseudo-class can work as well, anything that can inspect or make logical decisions in all places required based on an internal dom boolean variable.

  2. I would say, that depends on how you structure the code and pre-evaluation of a render buffer of line render elements, before flushing them to pixels, which would allow injection of before items, like currently happens. You can also limit the recursive iteration to a single overflow functional evaluation, which probably would be good for fixing and sorting most website pages out.
    I am pretty sure it would be possible.

@fantasai fantasai closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants