diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-01-07 01:14:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-07 01:14:10 +0800 |
commit | 7215224112043fbf66343be33693fb73f28e2260 (patch) | |
tree | a88917c4db478339bdefa131a5b6c7a0777e7795 /docs | |
parent | e75e9a0e7e53851e344633abe402979cdbece15b (diff) | |
download | gitea-7215224112043fbf66343be33693fb73f28e2260.tar.gz gitea-7215224112043fbf66343be33693fb73f28e2260.zip |
Improve frontend guideline (#28711)
It has been a consensus for long time during reviewing: "avoiding inline
styles as much as possible".
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/contributing/guidelines-frontend.en-us.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/content/contributing/guidelines-frontend.en-us.md b/docs/content/contributing/guidelines-frontend.en-us.md index 0d9e510e70..aa1759d9c9 100644 --- a/docs/content/contributing/guidelines-frontend.en-us.md +++ b/docs/content/contributing/guidelines-frontend.en-us.md @@ -48,11 +48,12 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h 10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event. 11. Custom event names are recommended to use `ce-` prefix. 12. Gitea's tailwind-style CSS classes use `gt-` prefix (`gt-relative`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`). +13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided. ### Accessibility / ARIA In history, Gitea heavily uses Fomantic UI which is not an accessibility-friendly framework. -Gitea uses some patches to make Fomantic UI more accessible (see the `aria.js` and `aria.md`), +Gitea uses some patches to make Fomantic UI more accessible (see `aria.md` and related JS files), but there are still many problems which need a lot of work and time to fix. ### Framework Usage |