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

Difficult to click on an example link on Chrome 86 with default CSS #1799

Closed
erickt opened this issue Oct 18, 2020 · 4 comments
Closed

Difficult to click on an example link on Chrome 86 with default CSS #1799

erickt opened this issue Oct 18, 2020 · 4 comments
Labels

Comments

@erickt
Copy link

erickt commented Oct 18, 2020

I'm finding the hitbox for getting an example on Chrome 86 to be quite tiny with the default CSS. For example, for https://tabatkins.github.io/bikeshed/#example-e79df413, it seems the hitbox is approximately 2 pixels wide. In comparison, it looks like whatwg style has this rule:

a.self-link::before {
    content: "¶";
}

You can see this in use here: https://url.spec.whatwg.org/#example-12672b6a. Would it be worthwhile adding something like that in the default CSS?

@tabatkins
Copy link
Collaborator

The default styles also have that rule. It turns out that what you're seeing is the effect of an overflow: hidden rule on the .example class that didn't use to be there; it's just coincidence that the self-link positioning happens to put approximately 2px of it within the example's content box while the rest gets cut off.

I'll investigate where this rule came from, it wasn't originally in the W3C stylesheet.

@tabatkins
Copy link
Collaborator

Welp, no, that rule's been there for 5 years, and I just never noticed. Huh.

Will fix.

@tabatkins tabatkins added the bug label Oct 18, 2020
@svgeesus
Copy link
Contributor

I came here to report that example self-links were not working, realized it was this bug, and was able to fix it on a per-spec basis with

div.example {
	overflow: visible;
}
div.example>a.self-link::before {
    content: "¶";
}

svgeesus added a commit to w3c/csswg-drafts that referenced this issue Aug 26, 2022
svgeesus added a commit to w3c/csswg-drafts that referenced this issue Aug 26, 2022
@svgeesus
Copy link
Contributor

@tabatkins By the way this is worth fixing, because otherwise people say fragile things like "there is an error in example 4" which later becomes example 6 because others were added mean time.

Making it easy to get a link to an example makes accurate reporting possible for people who don't typically use devtools to inspect specifications.

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

3 participants