Skip to content

[Bug]: documentation examples: too much padding #1076

@judfs

Description

@judfs

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Despite having plenty of screen real estate, I cannot sufficiently view your side-by-side code examples. In order to appreciate your samples, I've needed to open dev tools and hack at the style.

The original sample page with firefox maximized.
Screenshot 2022-10-21 at 16-18-40 Gradient Chart react-chartjs-2

Notably there is horizontal text overflow in the code sample even though it has a humble 80 char line length.

After turning off this style, the page is much more reasonable

--ifm-container-width-xl: 1320px;

Screenshot 2022-10-21 at 16-26-47 Gradient Chart react-chartjs-2

But with just that style changed, the page breaks at non maximized window size. The chart is fully gone. But unhelpful padding persists on the right.
Screenshot 2022-10-21 at 16-49-20 Gradient Chart react-chartjs-2

Also turning off this rule leaves something reasonable:

.docItemCol_pwNb {
	/* max-width: 75% !important; */
}

Screenshot 2022-10-21 at 16-55-18 Gradient Chart react-chartjs-2

Using more vertical space might be nice too, but at least 20 lines is workable.

My display is 3840x2160 at 100% scaling (Gnome desktop). Looking at it on a 1080p display on windows is also disappointing.

Please update your styles to better use space.

Reproduction

https://react-chartjs-2.js.org/examples/gradient-chart/

chart.js version

unknown

react-chartjs-2 version

master

Possible solution

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions