-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Global line-height rationale, semver strategy revision #612
Comments
Please check the comments in this PR (Simplify headings normalization comment) and this issue (input font: inherit also pulls in line height). As a side note, I don't think such change warrants a major version bump. |
@jeremejevs, as you can see from the links that @thierryk provided, initially this was just for the headings but then we realised that the whole document needed it. Regarding version bumps, it can be tricky since everything in CSS could be considered as breaking. We already have some guidelines for our semver strategy, but anything that could improve/extend that is more than welcome. |
Alright, thanks for the links, Github search didn't rank them high by relevance for some reason. About the version, as you say, almost every release of |
@jeremejevs, I agree with you. I'd rather do major releases more often —even if we change the mayor version multiple times in a short period of time— than risking to break some site/app —as in your case. Today many people trust semver enough to do a minor/patch release without giving too much thought about it. Some people even configure their dependencies to automatically update minor/patch releases. Because of that, I think that this is an important topic to review. Let's invite @jonathantneal to the conversation. 😀 |
As we all know, any change in a styles sheet has the potential to "break" things but does that mean we should bump the major version with each release? To me, I see a difference between "breakage" and minor visual glitch and I'd definitely put this |
If all browsers |
@thierryk, we agree on the "every change in CSS has the potential to break things". I'm looking beyond this particular change, and would be great if this conversation leads to closing this issue with some kind of guideline for what we should consider a breaking change —thus, requiring a major release— in the context of this project. 😀 |
The argument for “every change is breaking” aka major releases is:
Previously, there existed a grey area which we used for minor changes:
And I think we all agree on non-breaking patch changes:
At the time of fixing I’m fine with effectively removing minor releases from the project, and updating the documentation to reflect as much. I’d be very interested in all your feedback, especially from big contributors like @thierryk and @battaglr. |
@battaglr I agree that it is important we fine tune the definition of what constitute a minor release. And I think this specific issue is the perfect one to challenge the arguments listed by @jonathantneal because to me, as I suggested earlier, the impact of this fix should be very minimal—even though it "relates" to the box model.
@jeremejevs don't you set any |
I forgot to add that I'd also challenge how we qualify a minor change:
Because, as we know, setting a background color on May be we should open an issue dedicated to that versioning thing, no? |
@thierryk The
Montserrat is affected too, but to a lesser extent (a couple of pixels). Google doesn't serve fonts with a default I have to say, Titillium is a pretty sloppy typeface in general (has serious issues at some thicknesses & sizes), so there shouldn't be too many like it, but still, this is worth consideration. |
@jeremejevs thanks for the info. Google font samples inherit a In other words, the |
@thierryk, this thread’s fine for discussing the semver strategy; this I agree with your challenge to the “grey area” that was a minor release. Non box model changes can have a significant and unexpected impact on sites, too; with real examples from normalize and sanitize being |
I think that the methodology proposed by @jonathantneal in #615 could work for us, since this is a very particular project. If it "doesn't work", we don't loose anything. 😀 |
If we go this route, then I'd suggest 2 things:
[1] we could Keep It Simple by using a |
|
My point is to make people understand that this versioning is specific to how CSS works and that major versions could well be considered minor versions by some/most—for example, the explicit |
But what's wrong with that? Their stuff will indeed break (read "look not as desired"), and they will need to make changes to their CSS. That requires mental effort and time investment. When a regular library following Semver goes from 1.2.0 to 1.3.0, it's expected that any code built with 1.2.0 will keep working and producing 100% the same output, with no adjustments (unless there were nasty bugs involved, but that's beyond the point). |
What's wrong with that is that it is not necessary true, and that's my whole point. Simply because this is CSS and it depends more on "their CSS" than changes in releases.
Yes, but normalize is not your regular library because it deals with CSS and when it comes to CSS you cannot assume much without knowing the project it applies to. You say:
But it's also expected that a major version bump would break things—which is not necessary the case with normalize, hence the idea that we should stop making parallels (with Semver) when there is none. |
But a breaking change is a breaking change, and it doesn't have to be a complete API revamp. When it comes to programming, it doesn't matter how exotic a method is. If it's documented, and it's being removed / its signature or behavior are being changed, then that deserves a major version bump. In such a case, close to 100% of users won't have to change a thing in "their JS" when upgrading, but it still should be a new major release. I know quite a few libraries in the React ecosystem, where most users could fast-forward through some major versions (Redux 2.0 -> 3.0 comes to mind). Don't see why the same wouldn't apply to CSS. |
@thierryk, I agree with @jeremejevs in this. It's not that semver does not apply to CSS, is just that in this particular project MINOR releases will not be used anymore, since we target mostly tags that we can't predict how are going to be used, that's why I think almost all changes are breaking, not because they certainly will be breaking, but because we can't guarantee that they would not be breaking. |
Exactly! And that makes very little sense in the world of Semver where bumps are tied to changes within the project itself without outside considerations... In my opinion, abandoning Semver is an opportunity to discuss CSS versioning and its peculiarities. |
But there's no choice here, really. If this is being published with npm / bower, then it must be SemVer. |
Unfortunately, this is another example where the rationale is more about tooling than providing the best solution for the user (who wants to be able to upgrade early and safely). |
I think that we are all trying to provide the best solution for the user, if not, we will not be discussing this, and probably doing other things with our time. Sadly, I think that you are treating assumptions as truths.
They can read the CHANGELOG or as you suggested the release notes that are a good idea to start adding —basically, replicating the CHANGELOG. After that, they can decide if they want to upgrade or not. If they don't, they will still have a version that works for them, and not a new one that maybe could break something. I honestly don't see how providing a new way of versioning that would be very specific for this project will help either. In my opinion that will do more harm than good. Most people already know and understand semver. If we decide to modify what MAJOR and MINOR means, we will need to make sure that is really well explained and documented to avoid confusions. In my opinion there is nothing wrong with semver being used in a CSS project. In this particular case that we are basically just modifying the "global scope" is safer to treat every change as breaking. In projects were you have more defined scopes, you can be sure that modifying some module will not brake anything else, and the same applies if you add a new functionality. I apologize if some of this sounds brusque; it's not the intention. 😀 |
I'm not saying otherwise. We're discussing different POVs regarding something that is more complex than it seems. I'm just voicing my opinion, which happens to be different than yours—that's all.
How's that an assumption? A major version bump means devs should be extra cautious when upgrading, and that's my problem with versioning against major/patch versions only. Because most devs will consider that each (non-patch) release includes "incompatible API changes"— when in fact some of them will be minor changes with great benefits that would justify an early adoption.
No worries. We're here to find solutions. And please understand that I'm not trying to have the last word here, I'm just trying to explain my POV the best I can. To me, there is value in "tagging" some of the releases as "minor" versions (as in low-risk, not in the Semver sense since we are dealing with CSS). And that's why I said we could move away from Semver because "minor" would have a very different meaning. |
Great that we are keeping things friendly. Sometimes my not-so-good understanding of English makes me misinterpret some things. 😅 Going back to topic: walking way from semver is not the best solution for this problem IMO. I don't think that doing all major releases is the perfect solution but I do think that is the best solution considering all the variables. I agree that a major release means devs should be extra cautious when upgrading, but that doesn't mean they will stop upgrading, they will have to read the CHANGELOG or release notes as any responsible dev should do. If the changes bring great benefits, I'm sure that it would not stop anyone to at least try to upgrade. That said, I'm more worried about devs upgrading because they trust in a change that we consider as low-risk, but that end up having a big impact. We have perfect examples of that happening as @jonathantneal explains in #615:
Anyhow, I agree that we can communicate that we consider some changes to be less risky than others —while still doing a major release—, maybe by including some kind of "notice" in the release notes, i.e. "Although this is a major release is considered low-risk, meaning that {{explanation}}". That way we can encourage devs to try it with less concerns, but with caution at the same time. I think that this is all I got to contribute to this conversation. 😀 |
??
Yes, I like this idea. Because I think it is important to convey changes for which there is more reward than risk (i.e. this |
I think that this would be the case. 😝 I'm happy that we arrived to a solution that addresses the concerns of all of us. Yay! |
Awesome dialog. I’m moving forward with the semver strategy. Every CSS change is major, and understanding the risk of any change is relative to the implementation. We can’t know all the tens of millions of existing implementations, therefore we cannot promise backwards compatibility, which means we will not have minor releases. |
What's the rationale behind
html { line-height: 1.15 }
? I thought it was supposed to be just the headings? And wouldn't such a drastic change warrant a major version bump?The text was updated successfully, but these errors were encountered: