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

add margin top to the top of branches #23002

Merged
merged 5 commits into from
Feb 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{template "base/alert" .}}
{{template "repo/sub_menu" .}}
{{if .DefaultBranchBranch}}
<h4 class="ui top attached header">
<h4 class="ui top attached header gt-mt-4">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suppose you still need another change (line 46)

The logic is:

{{if DefaultBranchBranch}}
    <h4 class="ui top attached header gt-mt-4"></h4>
    ...
{{end}}


{{if gt (len .Branches) 1}}
    <h4 class="ui top attached header /* HERE */"></h4>
    ...
{{end}}

Copy link
Contributor

@wxiaoguang wxiaoguang Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe the " top attached " just means that there is no padding/margin before .... so if you look into details, you may find more clues .....


Update: The Fomantic UI document https://fomantic-ui.com/elements/header.html#attached

Copy link
Contributor Author

@HesterG HesterG Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suppose you still need another change (line 46)

The logic is:

{{if DefaultBranchBranch}}
    <h4 class="ui top attached header gt-mt-4"></h4>
    ...
{{end}}


{{if gt (len .Branches) 1}}
    <h4 class="ui top attached header /* HERE */"></h4>
    ...
{{end}}

For the line46, it actually already had margin top, as shown below:

截屏2023-02-21 09 28 09

It matches the following rule defined in _base.less

.ui.attached.segment ~ .ui.top.attached.header {
    margin-top: 1rem;
}

Or is it something other than margin-top that needs to be changed?

Checked the document, i think the original intention of attached header does mean that it is an attached header to other, but here we might not delete attach, because it is used in many selectors.

{{.locale.Tr "repo.default_branch"}}
</h4>

Expand Down