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

x/pkgsite: right aligned ¶ #66458

Open
joeshin opened this issue Mar 22, 2024 · 4 comments
Open

x/pkgsite: right aligned ¶ #66458

joeshin opened this issue Mar 22, 2024 · 4 comments

Comments

@joeshin
Copy link

joeshin commented Mar 22, 2024

What is the URL of the page with the issue?

https://pkg.go.dev/google.golang.org/grpc#hdr-Experimental

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Screenshot

Screen Shot 2024-03-21 at 9 32 55 PM

What did you do?

Hovered over the Experimental section.

What did you see happen?

Saw the ¶ link for the heading on the right hand side.

What did you expect to see?

To see the ¶ link right after the heading text. The link does appear after the heading text for overview, constants, variables section however functions and types sections show right aligned ¶.

@gopherbot gopherbot added this to the Unreleased milestone Mar 22, 2024
@adonovan
Copy link
Member

I never understood why the link is a pilcrow, but keeping it close to the symbol name always seemed logical to me. If your screen is wide, the right-hand side is not where your eyes or mouse are likely to be.

@suzmue suzmue modified the milestones: Unreleased, website/backlog Mar 26, 2024
@joeshin
Copy link
Author

joeshin commented Mar 28, 2024

@adonovan can I take a crack at it even though it doesn't have a help wanted label just yet?

This ruleset seems to be the issue.

.Documentation-function h4,
.Documentation-type h4,
.Documentation-typeFunc h4,
.Documentation-typeMethod h4 {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

While this is useful for the "since version" display, it causes this alignment issue with other h4s. Empirically speaking, all h4s under func/type sections seem to have the class .Documentation-(function|type|typeFunc|typeMethod)Header. A tighter ruleset like this would probably work (would need to verify).

h4.Documentation-functionHeader,
h4.Documentation-typeHeader,
h4.Documentation-typeFuncHeader,
h4.Documentation-typeMethodHeader {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

@adonovan
Copy link
Member

can I take a crack at it even though it doesn't have a help wanted label just yet?

Please do! You should send your CL to @jba for review. Thanks.

@gopherbot
Copy link

Change https://go.dev/cl/574719 mentions this issue: static/frontend: position pilcrow right next to h4 header text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants