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-backgrounds-4] Split CSS Backgrounds into separate specs? #7664

Closed
SebastianZ opened this issue Aug 30, 2022 · 22 comments · Fixed by #9048
Closed

[css-backgrounds-4] Split CSS Backgrounds into separate specs? #7664

SebastianZ opened this issue Aug 30, 2022 · 22 comments · Fixed by #9048

Comments

@SebastianZ
Copy link
Contributor

The CSS Backgrounds and Borders Module Level 3 is already pretty heavyweight. Level 4 adds even many more features which evolve at different speeds.

Therefore, I suggest to split the specification up into two separate ones. The first one - CSS Backgrounds Module Level 4 - focuses on only background-related features. The second one - CSS Borders Module Level 4 - covers everything related to border styling including box shadows.

While backgrounds and borders are related and interact to some extent, they still cover individual concepts.
So the two specs could focus on one main feature.

The hope behind this idea is also to let them advance more quickly.

Sebastian

@SebastianZ
Copy link
Contributor Author

@fantasai @LeaVerou @bert-github What do you think?

@LeaVerou
Copy link
Member

LeaVerou commented Sep 9, 2022

From a quick look, it appears that Borders would basically contain everything, except the Backgrounds section. Not sure that would help too much?

@SebastianZ
Copy link
Contributor Author

SebastianZ commented Sep 9, 2022

The features list for Borders is currently longer than the one for Backgrounds, though Backgrounds would still contain a bunch of additions. Here's a list to make it more obvious:

Backgrounds:

  • Physical and logical background-position-* longhands
  • Optional offset(s) in background-position-* properties
  • Logical keywords for background-position-* properties
  • border and text keywords for background-clip
  • extend keyword for background-repeat

Borders:

Sebastian

@SebastianZ
Copy link
Contributor Author

I think this might be a quick decision. So let's discuss this on a call.

Sebastian

@LeaVerou
Copy link
Member

I’m generally supportive of more modularization and this sounds like a good one (little interdependency between features).
Yes, this means I disagree with myself from Sep 9 😛

@SebastianZ SebastianZ added Async Resolution: Proposed Candidate for auto-resolve with stated time limit and removed Agenda+ labels Jan 18, 2023
@SebastianZ
Copy link
Contributor Author

Because there is already support from @LeaVerou, I assume this could also be resolved asynchronously.

As mentioned earlier, the suggested resolution is:
Split CSS Backgrounds and Borders 4 into two separate specs, one for backgrounds and one for borders and box shadows. The current editors will be added to the new spec. as well.

Sebastian

@fantasai
Copy link
Collaborator

Another option would be to split out into https://www.w3.org/TR/css-box-4/
In that case I might suggest keeping border-image and box-shadow with the rest...

@astearns
Copy link
Member

astearns commented Feb 1, 2023

Is there a current advancement opportunity for Backgrounds or Borders that this split would enable? I’m happy to take on the work if it’s immediately useful, but am less interested if it’s just a theoretical way to move through the spec stages faster

@SebastianZ are you volunteering to do the work?

@SebastianZ
Copy link
Contributor Author

@SebastianZ are you volunteering to do the work?

Yes, if we decide to split them, it's my plan to make that change.

Is there a current advancement opportunity for Backgrounds or Borders that this split would enable?

It is one big goal for me this year to push the features related to backgrounds and borders. So we can finally get rid of the big "Not Ready For Implementation" banner and at least publish them as a WD.

There is currently some momentum related to some features of the spec. and I believe that a split could help making progress on them, make it easier to maintain them. And two smaller specs are also easier to read than a monolytic one, especially with that many features planned.
At least from the discussions lately, there's definitely some implementer interest and I hope this grows stronger once there's no repelling banner anymore. And that banner can be dropped individually when there are two specs.

Sebastian

@SebastianZ
Copy link
Contributor Author

@fantasai It makes sense to split the things related to the box model (i.e. border-*-width) out into CSS Box Model 4. (And I saw, you already mentioned that in the abstract of that spec. 😃)

So, yeah, that could be considered when splitting the specs.

Sebastian

@LeaVerou
Copy link
Member

LeaVerou commented Feb 1, 2023

If Backgrounds & Borders becomes just "Backgrounds" though, box-shadow and friends doesn't fit in it any more, but not sure it fits in css-box either… Maybe we need a box-decoration spec…

@SebastianZ
Copy link
Contributor Author

If Backgrounds & Borders becomes just "Backgrounds" though, box-shadow and friends doesn't fit in it any more, but not sure it fits in css-box either… Maybe we need a box-decoration spec…

It seems my comment was misleading. Backgrounds & Borders would still be split into a "Backgrounds" and a "Borders" spec. The only thing that'd be moved to CSS Box 4 would be the border-*-width properties.

Sebastian

@LeaVerou
Copy link
Member

LeaVerou commented Feb 3, 2023

So there would be a Borders spec that doesn't include the border-* properties?! That seems very weird.

@SebastianZ
Copy link
Contributor Author

So there would be a Borders spec that doesn't include the border-* properties?!

No, it would include all border-* properties like border-*-style, border-*-color, border-*-radius, etc. Only the border-*-width properties might be moved to CSS Box 4, because those also relate to the box model and fit to padding-* and margin-*.

Though it was @fantasai's proposal to split out parts to CSS Box 4, not mine. So it might be that I misunderstood her idea.

I'd say, let's keep this issue focused on splitting Backgrounds and Borders into two separate specs as initially intended and then have a separate discussion on whether to move parts of Borders to CSS Box 4.

Sebastian

@Loirooriol
Copy link
Contributor

IMO box-shadow fits better into Backgrounds than Borders.

@SebastianZ
Copy link
Contributor Author

For what it's worth, I believe it doesn't quite fit into both of them. Though details like that can still be discussed when we agreed to do the split.

Sebastian

@LeaVerou
Copy link
Member

LeaVerou commented Feb 5, 2023

IMO box-shadow fits better into Backgrounds than Borders.

If it gets renamed to something else, like "Backgrounds & Box decorations" or something. Otherwise it doesn't really fit into any of them. As it currently stands, Backgrounds & Borders implicitly spans more widely than both backgrounds or borders (sort of implies "and everything in between"), if split the resulting scopes sound narrower.

@SebastianZ SebastianZ removed the Async Resolution: Proposed Candidate for auto-resolve with stated time limit label Feb 18, 2023
@SebastianZ
Copy link
Contributor Author

Removing the resolution proposal label for now, as there's obviously still need for discussion.

@LeaVerou @Loirooriol So, what should we do with box-shadow (and it's longhands)?

Possible solutions I see are:

  1. Include them in the Borders spec.
  2. Include them in the Backgrounds spec.
  3. Move them into their own Box Decorations spec.

Thinking about it, I now slightly tend to option 3. As mentioned before, box shadows actually neither fit to borders nor to backgrounds. And we might add other box decorations beyond shadows in the future.

Sebastian

@SebastianZ SebastianZ changed the title [css-backgrounds-4] Split CSS Backgrounds into two separate specs? [css-backgrounds-4] Split CSS Backgrounds into separate specs? Mar 11, 2023
@SebastianZ
Copy link
Contributor Author

SebastianZ commented Mar 11, 2023

Having a separate spec. for box decorations also aligns well will the spec. we have for text decorations.

So my suggestion is now to split the current spec. into three:

  • CSS Backgrounds 4
  • CSS Borders 4
  • CSS Box Decorations 4

Sebastian

@SebastianZ
Copy link
Contributor Author

SebastianZ commented Mar 31, 2023

As I can see some support from different people, I put this back on the agenda.

The proposal now is to split CSS Backgrounds 4 into three specs as noted in my previous comment. How exactly they are split is outlined in a previous comment with the addition that everything box-shadow related will be moved to CSS Box Decorations 4. Unless expressed otherwise, the current editors will be added to the new specs as well.

And as stated earlier, I'd be happy to do the work.

Sebastian

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-backgrounds-4] Split CSS Backgrounds into separate specs?, and agreed to the following:

  • RESOLVED: Adopt proposal above, background-* into css-backgrounds, border-* and box-shadow into css-borders, and box-decoration-break into css-box
The full IRC log of that discussion <fantasai> scribenick: fantasai
<fantasai> SebastianZ: Suggestion is to split up the CSS Background 4 spec into 3
<fantasai> SebastianZ: initial suggestion was to split into 2, but this didn't turn out very well
<fantasai> SebastianZ: idea is to focus each spec on one thing
<fantasai> SebastianZ: because backgrounds covers backgrounds, borders, and box shadow
<fantasai> SebastianZ: and we want to edit separately, and also make progress separately
<fantasai> SebastianZ: suggestion is into css-background-4 related to backgrounds
<fantasai> SebastianZ: Borders 4 cover everything border-related
<fantasai> SebastianZ: and CSS box-decorations-4 which covers box shadow and its longhands and anything else related to box decorations
<Rossen_> ack fantasai
<fantasai> https://www.w3.org/TR/css-box-3/
<drott> fantasai: we also have a spec called box-model
<drott> fantasai: spec that covers margins and paddings
<drott> fantasai: that would put us into quite a lot of spec
<drott> fantasai: backgrounds is fairly self evident, other splits are less evident
<drott> fantasai: divisions not super clean, border-... applies kinda a background
<drott> fantasai: might make it hard for people to look for - if we have it spread across 4 specs
<drott> SebastianZ: bringing in the box model, which wasn't covered in that issue
<drott> SebastianZ: idea was to have clear concepts borders, backgrounds, decorations
<drott> fantasai: border-image has a background to it - concerned as to: What's what?
<drott> fantasai: i like the idea of splitting it, but uncertain about how to do it cleanly, making it so it's obvious
<drott> SebastianZ: counter proposal? atm it's confusion: CSS Backgrounds and Borders, box shadow not mentioned in the title, mixing things
<fantasai> e.g. box-decoration-break affects borders and background also
<drott> fantasai: don't have a good answer atm
<drott> rossen_: evident we have shifted in how borders and backgrounds are becoming more decorative
<drott> rossen_: over time, all of these concepts have progressed - seems reasonable for backgrounds, borders, decorations to be split
<drott> rossen_: to fantasai's point, we have some horizontal concepts in .. box model?
<drott> fantasai: they're interconnected: use case: author: where do i find the corresponding spec?
<drott> fantasai: question is: where do people find things
<drott> fantasai: box-model spec suitable place for box decorations?
<drott> SebastianZ: many new features coming to background and borders - if put in box-spec spec becomes very long
<drott> fantasai: backgrounds and borders being separate is ok, box decoration being a separate spec seems too much
<drott> rossen_: if we split this into only two specs, as a starting point
<drott> rossen_: let's say borders and backgrounds would be split off
<drott> rossen_: Where to put decorations?
<castastrophe> q+
<fantasai> fantasai: I think putting box-shadow into borders makes sense, it outlines the border
<fantasai> fantasai: but box-decoration-break could maybe go into css-box
<Rossen_> ack castastrophe
<fantasai> fantasai: since it also affects margins / padding
<drott> castastrophe: what would be the downside of a long spec?
<drott> castastrophe: we could also do cross-linking, and use it to a sub-specification?
<Rossen_> ack fantasai
<drott> jensimmons: sounds like there might not be enough consensus to resolve?
<drott> fantasai: split into backgrounds 4 and borders 4
<fantasai> fantasai: backgrounds-* into css-backgrounds, borders-* into css-borders
<fantasai> fantasai: box-shadow into css-borders
<fantasai> fantasai: box-decoration-break into css-box
<drott> SebastianZ: If that seems reasonable to you - perhaps we could go ahead with that proposal? Wanna address castatstrophe point?
<fantasai> s/SebastianZ/Rossen/
<drott> SebastianZ: it's box-shadow that does not fit well into one of those specs
<drott> SebastianZ: discussion started with others raising that box-shadow should stand on its own
<drott> fantasai: box-shadow should go into the border spec
<fantasai> fantasai: it's effectively functioning as a border
<fantasai> fantasai: box-decoration-break would go into css-box; it affects margins and padding too
<drott> rossen: would the proposed split into borders 4 and backgrounds 4, with fantasai's described split suitable?
<fantasai> plinss: I'm in favor of fantasai's proposal, but feel like shadows should go into backgrounds
<fantasai> plinss: but I don't feel strongly
<fantasai> plinss: it doesn't affect sizing
<fantasai> fantasai: neither does border-image
<fantasai> Rossen_: [summarizes proposal]
<fantasai> background-* into css-backgrounds
<ntim> sounds good to me
<fantasai> border-* (including border-image) into css-borders
<fantasai> box-shadow into css-borders
<fantasai> box-decoration-break into css-box
<fantasai> Rossen_: any objections?
<fantasai> RESOLVED: Adopt proposal above, background-* into css-backgrounds, border-* and box-shadow into css-borders, and box-decoration-break into css-box
<fantasai> SebastianZ: thanks for resolving
<fantasai> Rossen_: it's important to get to topics that are not everyone's most important, not let them languish

@SebastianZ
Copy link
Contributor Author

@fantasai You mentioned box-decoration-break several times in the call and we also resolved to move it to CSS Box. Though that property is currently part of CSS Break, so unrelated to the split of CSS Backgrounds, actually.

I assume you got confused by the suggested Box Decorations spec., which we resolved to not add for now. Right? Does this need another resolution or can we just inore that part and stick with the rest of the resolution.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants