-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Minor dashboard tweaks, fix flex-list margins #26829
Conversation
@wxiaoguang I changed your fix in #26779 to be more generally useful and work seamlessly with |
I guess it breaks other UI. |
Any ideas where it could break? |
I think I have explained in #26779 : "It's better to keep children elements simple, and let parent containers layout the necessary padding/margin." If we remove all the padding-top/padding-bottom of a flex-list by default, it's difficult to control its behavior. For example, the page "org/member" doesn't have padding-top now And you can see there are many (not only a few ...) To make the things clear, my option:
If you don't mind, I can help to work with this PR and clean the legacy |
Did a quick test, this change seems working, and the /* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly */
.ui.segment > .flex-list:first-child > .flex-item:first-child {
padding-top: 0;
}
.ui.segment > .flex-list:last-child > .flex-item:last-child {
padding-bottom: 0;
}
/* If there is a divider besides the flex-list, some padding/margin are not needed */
.divider + .flex-list > .flex-item:first-child {
padding-top: 0;
}
.flex-list + .divider {
margin-top: 0;
} |
I guess that may work, but if we let flex-list provide padding in other cases, the changeset will be bigger an as you said, we need to remove a lot of |
I have confidence that it won't be long in the future (we only need to handle |
I managed to make some changes by silverwind#4 , it doesn't change too much (including a new demo), while I think the new code is more readable than before:
|
One more thought, IMO "padding" is not the right approach for the space layout between elements. The right approach should be "margin". By using "margin" correctly, we do not need to fine-tune every space. I would like to refactor some "padding" styles to "margin" style. In short, if I understand correctly:
|
wait on silverwind#4 |
* giteaoffical/main: (22 commits) Use case-insensitive regex for all webpack assets (go-gitea#26867) restrict certificate type for builtin SSH server (go-gitea#26789) feat(API): add secret deletion functionality for repository (go-gitea#26808) Avoid double-unescaping of form value (go-gitea#26853) Move web/api context related testing function into a separate package (go-gitea#26859) Remove some unused CSS styles (go-gitea#26852) [skip ci] Updated translations via Crowdin Minor dashboard tweaks, fix flex-list margins (go-gitea#26829) Update team invitation email link (go-gitea#26550) Redirect from `{repo}/issues/new` to `{repo}/issues/new/choose` when blank issues are disabled (go-gitea#26813) Remove "TODO" tasks from CSS file (go-gitea#26835) User details page (go-gitea#26713) Render code blocks in repo description (go-gitea#26830) Remove joinPaths function (go-gitea#26833) Remove polluted `.ui.right` (go-gitea#26825) Sync tags when adopting repos (go-gitea#26816) rm comment about hugo (go-gitea#26832) Fix filename for .spectral.yaml (go-gitea#26828) [skip ci] Updated translations via Crowdin Check blocklist for emails when adding them to account (go-gitea#26812) ...
Some small dashboard tweaks:
Before:
After: