arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
454 stars 129 forks source link

Docs rendering weird, text vertical #488

Closed Andrewp2 closed 7 months ago

Andrewp2 commented 8 months ago

Describe the bug

Text is vertical

image

To Reproduce

  1. Go to here https://docs.rs/async-stripe/latest/stripe/index.html
  2. Webpage looks weird

Expected behavior

Text should be horizontal

Code snippets

No response

OS

Windows

Rust version

N/A

Library version

async-stripe 0.31.0

API version

2023-10-16

Additional context

No response

Andrewp2 commented 8 months ago

Disabling overflow-wrap: break-word; or display: table-row; seems to fix the issue on the doc

Andrewp2 commented 8 months ago

It seems like somewhat of a tough situation, the docs are this way do to some exceptionally long type names PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization which we don't have a huge amount of control over, we can modify the CSS using --extend-css when using rustdoc but I don't know if docs.rs has a way to do that.

arlyon commented 8 months ago

On mobile they wrap correctly so it seems like one of rustdoc's media queries for desktop is not built ideally. I don't want to do anything regarding trying to collapse the names as we use the types verbatim from stripe so my best suggestion is we open an issue with rustdoc. If you'd like to open one please link back to this issue.

I'll investigate overriding css on docs.rs in the meantime.

pati08 commented 7 months ago

For now, here's a quick bookmarklet that will make it readable:

javascript:(function() {     var style = document.createElement('style');     style.type = 'text/css';     style.innerHTML = '.item-table > li > div { display: inherit !important; }';     document.head.appendChild(style); })();
arlyon commented 7 months ago

Thanks for opening that issue and the owrkaround.

arlyon commented 7 months ago

I think I will close this issue, since there is not much more we can do here. Thanks again for opening another ticket upstream.