w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.35k stars 641 forks source link

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

Open wesleyolis opened 1 month ago

wesleyolis commented 1 month ago

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 https://github.com/w3c/csswg-drafts/issues/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 commented 4 weeks ago
  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 #2011