Commit Graph

5 Commits

Author SHA1 Message Date
Earl Warren 48813e6be1 Merge pull request 'Port "Enable `declaration-block-no-redundant-longhand-properties` (#30950)' (#3769) from beowulf/gitea-port-pull-30950 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3769
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-14 22:23:54 +00:00
silverwind 8f4e653020
Enable `declaration-block-no-redundant-longhand-properties` (#30950)
Enable
[`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
and autofix issues. The exclusions are because I find these two
shorthands to be harder to read.

(cherry picked from commit 46b7004f050bd2fdaf9800794cf2c1e9eeb08d51)

Signed-off-by: Beowulf <beowulf@beocode.eu>
2024-05-14 17:28:58 +02:00
silverwind 51f6c3a059
Forbid deprecated `break-word` in CSS (#30934)
Forbid
[deprecated](https://drafts.csswg.org/css-text-3/#word-break-property)
`break-word` and fix all occurences.

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

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

[Here](https://stackoverflow.com/questions/77651244) 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.

(cherry picked from commit 5556782ebeb1ca4d17e2fff434b11651887b9899)
2024-05-12 20:03:10 +02:00
silverwind 29a8be7c3d
Ignore fomantic folder in linters (#30200)
We are not linting these files but editor integrations will still try to
lint, disable that.

(cherry picked from commit 38d56ca10600bdb867b363be717f7cf5d176297a)
2024-04-07 15:40:31 +02:00
silverwind bef622d3e7
Add `stylelint-value-no-unknown-custom-properties` and convert stylelint config to js (#30117)
Add
[`stylelint-value-no-unknown-custom-properties`](https://github.com/csstools/stylelint-value-no-unknown-custom-properties)
which lints for undefined CSS variables. No current violations.

To make it work properly with editor integrations, I had to convert the
config to JS to be able to pass absolute paths to the plugin, but this
is a needed change anyways.

(cherry picked from commit f31a88d3cb64106e75bbe8a3502856db71dbacfc)

Conflicts:
	- .github/labeler.yml
	- .github/workflows/files-changed.yml
          Removed both, Gitea specific files.
2024-04-07 15:40:31 +02:00