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

Forbid deprecated break-word in CSS #30934

Merged
merged 2 commits into from May 10, 2024
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented May 10, 2024

Forbid deprecated break-word and fix all occurences.

Regarding overflow-wrap: break-word vs overflow-wrap: anywhere:

Example of difference: https://jsfiddle.net/silverwind/1va6972r/

Here it says:

The differences between normal, break-word and anywhere are only clear if you are using width: min-content on the element containing the text, and you also set a max-width. A pretty rare scenario.

I don't think this difference will make any practical impact as we are not hitting this rare scenario.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 10, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 10, 2024
@silverwind
Copy link
Member Author

silverwind commented May 10, 2024

Also see tailwindlabs/tailwindcss#12127 and specifically https://play.tailwindcss.com/o2CjmfmOzJ which makes a point for anywhere over break-word (the latter would need a min-w-0 to work), so I think it's better to go with anywhere.

@wxiaoguang
Copy link
Contributor

MDN shows the difference

image

image

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 10, 2024
@silverwind
Copy link
Member Author

MDN shows the difference

Yeah but they set these, which imho make it a unrealistic example:

width: min-content;
max-width: 11em;

I think https://play.tailwindcss.com/o2CjmfmOzJ is more realistic, only that we don't set display: grid, but I assume display: flex would behave similarily.

@silverwind
Copy link
Member Author

Here is that example with flex, shows exact same wrapping as grid:

https://play.tailwindcss.com/gLZXWneeLy

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 10, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 10, 2024
@silverwind silverwind enabled auto-merge (squash) May 10, 2024 12:21
@silverwind silverwind merged commit 5556782 into go-gitea:main May 10, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone May 10, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 10, 2024
@silverwind silverwind deleted the nobreak branch May 11, 2024 18:54
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 13, 2024
* giteaofficial/main:
  [skip ci] Updated licenses and gitignores
  Fix file path width in repo non-homepage view (go-gitea#30951)
  Enable `declaration-block-no-redundant-longhand-properties` (go-gitea#30950)
  [skip ci] Updated translations via Crowdin
  Move reverproxyauth before session so the header will not be ignored even if user has login (go-gitea#27821)
  Use CSS `inset` shorthand (go-gitea#30939)
  Remove If Exist check on migration for mssql because that syntax required SQL server 2016 (go-gitea#30894)
  Update JS dependencies, add new eslint rules (go-gitea#30840)
  Fix some UI regressions for commit list (go-gitea#30920)
  Forbid deprecated `break-word` in CSS (go-gitea#30934)
  Check if reverse proxy is correctly configured (go-gitea#30890)
  Remove deprecated stuff for runners (go-gitea#30930)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal modifies/js size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants