Skip to content

[css-overflow-3] Clarify when overflow-clip-margin has an effect #5800

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

Closed
vmpstr opened this issue Dec 16, 2020 · 4 comments
Closed

[css-overflow-3] Clarify when overflow-clip-margin has an effect #5800

vmpstr opened this issue Dec 16, 2020 · 4 comments

Comments

@vmpstr
Copy link
Member

vmpstr commented Dec 16, 2020

overflow-clip-margin has some text when defining the value that reads as follows:

If the element does not have overflow: clip (or another property defined to
respect this property), this property has no effect.

I think it's ambiguous what this refers to when talking about another property:
Is this saying "another property that respects overflow: clip"
or "another property that respects overflow-clip-margin"

I think it's the latter. But in general, do we need this text? It seems like we can just define overflow-clip-margin as affecting overflow clip edge unconditionally. Then, if some property clips to overflow clip edge then it will be affected by overflow-clip-margin

For context, contain: paint is such a property that clips to overflow clip edge, and I think that it should be affected by overflow-clip-margin, but one can read it differently.

@vmpstr vmpstr added the css-overflow-3 Current Work label Dec 16, 2020
@vmpstr vmpstr added the Agenda+ label Jan 13, 2021
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-overflow-3] Clarify when overflow-clip-margin has an effect.

The full IRC log of that discussion <dael> Topic: [css-overflow-3] Clarify when overflow-clip-margin has an effect
<dael> github: https://github.com//issues/5800
<dael> astearns: Let's try
<dael> vmpstr: Clarifying a sentence in overflow that says [reads]. Clarifying what "this property" refers to
<dael> vmpstr: Paint containment clips, would like overflow:clip to extend paint containment
<dael> florian: Yes, contain:paint applys. Poorly worded, editor will make it better
<dael> astearns: Will handle by making it explicit contain:paint applies?
<dael> florian: Not sure how I'll rephrase but the answer is it applies and we'll fix the sentence
<dael> vmpstr: Maybe remove the sentence?
<dael> florian: Possibly. It's 3am so I'm not awake enough to draft the sentence on the fly.
<dael> fantasai: Can't remove the sentence b/c it doesn't apply to most elements. Some clipping effects it applies and some where it doesn't

@astearns astearns removed the Agenda+ label Jan 20, 2021
@vmpstr
Copy link
Member Author

vmpstr commented Jan 20, 2021

@fantasai just to clarify, we can't remove the sentence because there are properties that clip specifically to overflow clip edge but don't respect overflow-clip-margin? Is there an example?

@dholbert
Copy link
Member

dholbert commented Jan 20, 2021

Another nit about this spec snippet -- we should rephrase the text "(or another property...".

Expanding that clause slightly, it's currently saying: If the element does not have...another property defined to... And this phrasing is problematic because, strictly speaking, every element has every property. It's meaningless to condition on whether an element "has" a given property.

I think this wants to say "(or another property whose used value is defined to...." or something along those lines.

@tabatkins
Copy link
Member

I moved the initial sentence down into a note - the property's sole effect is to modify the overflow clip edge, so it doesn't need to specify what properties use that edge to do something, but it's still worthwhile to point out the effects in a note.

Also rephrased it a bit to get around @dholbert's issue.

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

6 participants