-
Notifications
You must be signed in to change notification settings - Fork 644
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-tables] should 'opacity' be hoisted from the table box to its wrapper box #324
Comments
Agree that testing that group opacity is applied (rather than individual opacity on caption and table) would be helpful. Also that hoisting is probably the right thing. |
Filters should also be hoisted up. I'm unsure about masking, though. |
I think masking will cause confusion either way (on a table, when a caption is present). With hoisting, the position/size of the mask will be unexpected, and without hoisting, the caption won't be included. I'd lean weakly towards not hoisting, but I don't feel strongly. |
Maybe all of these grouping properties should hoist: |
In today's teleconference the WG resolved to hoist opacity, and to discuss the rest of the list of properties at TPAC. |
Just a self-reminder that the class of issues I wanted to discuss is a bit wider than what we resolved two weeks ago, as a result of my attempt to make TBODY/TR and COLGROUP/COL more alike and sane: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8128253/ I think we want to preserve the non-Edge behavior of allowing transforms&friends on table-track and table-track-grouping boxes, and hoist these features directly onto the cells. The current behavior (having them on an actual TR wrapper) is really weird due to where and how backgrounds and borders are currently drawn in most browsers, and I would like to get rid of that non-sense. Still, at the same time, I don't think Edge's behavior of just applying display:contents on those elements is totally web-compatible, hence the hoisting proposal. We should discuss this further at TPAC when @gregwhitworth and myself will present the CSS Tables spec. |
Resolved that we do, except for 'overflow' which currently doesn't work (at least in most cases) and that we might want to drop altogether. |
In particular, I believe we resolved on the list @smfr referenced above, which is currently: However, there are some other properties that go along with those, so I believe we should also be including Of these, Gecko currently hoists |
I just checked and Chrome hoists 'overflow:hidden' too. You can see this by creating a positioned element crossing the caption, like here: https://jsfiddle.net/t54tjzw1/1/ I therefore went ahead and added it to the list, though that is of course pending a resolution. I propose we make the values I still anticipate the easiest way to solve this class of problem is to put things on their head and have the table-wrapper-box use all properties by default and have the "table-grid-box" be the one that gets exceptionally the "background", "border" as well as a few other properties from its parent, but we will leave this discussion for later. Let's get the behavior defined, then we can debate whether there are better ways to spec it. |
The list of properties that need to stay on the primary box is pretty long: anything to do with sizing (min/max/regular width/height, padding, margin), borders, backgrounds, animations, transitions, and probably also hit testing and ability to focus/select/etc., generated content (i.e., location of pseudo-elements). (Hoisting doesn't make a difference for inherited properties, since the table wrapper box inherits them from the table -- although that should be more explicitly specified.) But there are some flex and grid properties that should also be hoisted. |
It wasn't clear to me in which spec this hoisting should be described. Per-property across a range of specs, or in the table spec? My preference would be the latter. |
If this would be a change to the color spec, it would go in level 4. |
@FremyCompany wrote
That sounds like a better approach, so removing the color-4 tag. |
@svgeesus Sounds like the right call! |
CSS 2.1 specifies, in the rules on tables, a list of properties that, when specified on a table, apply to the table wrapper box rather than the table box.
css-color-3 introduces the opacity property.
I haven't tested carefully yet, but https://bugzilla.mozilla.org/show_bug.cgi?id=1286803 suggests that some but not all browsers include 'opacity' in the list of properties to be hoisted to the table wrapper box. Doing so produces the expected results, in that the caption (inside the table) gets included in the effect of 'opacity'.
I suspect specifying this is the right thing to do, but further testing (e.g., making sure that the implementations that apply the opacity to the caption are actually doing correct group opacity when the table and caption overlap) is probably warranted first.
The text was updated successfully, but these errors were encountered: