mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
409 stars 92 forks source link

Styling: inaccurate click area in functions #160

Closed sizmailov closed 4 years ago

sizmailov commented 4 years ago

Click area in function names is shortened from right hand side (approximately by 1.5 chars)

For example it's not possible to click on x property on Range2D.x link

image

crisluengo commented 4 years ago

I see this too. Only for function names, not other items in the list. For both the list of functions in a module/namespace as for the heading in the detailed function description.

The span that contains the function parameters (m-doc-wrap) has a 1 rem padding on the left side that causes this. Changing the padding to a margin fixes the issue.

This is what it looks like in my (modified and compiled) CSS:

span.m-doc-wrap {
  padding-left: 1rem;   /* <-- changing this to margin-left fixes it. */
  display: inline-block;
  vertical-align: text-top;
  white-space: pre-line;
  max-width: 100%;
}

I haven't yet checked to see what else this change affects.

sizmailov commented 4 years ago

@crisluengo Nice! Looks like a fix to me. Can you make a PR out of it?

crisluengo commented 4 years ago

@sizmailov I was thinking of doing that, but then I realized that all test outputs will change, so I got lazy... :)

I can’t run the tests locally because for some reason spacing is not exactly the same on a Mac. So updating the test cases is a whole lot of manual work. At least this was the case the previous time I did a PR.

sizmailov commented 4 years ago

@crisluengo I've pushed a PR with your change. Tests didn't need an update to pass all checks. I've mentioned you in comment, hope it's fine and you care about credits as less as I do :wink:

mosra commented 4 years ago

Magic. I have no idea why I used padding instead of margin. Thank you both, #162 is merged now.