starlight icon indicating copy to clipboard operation
starlight copied to clipboard

Tables in Asides

Open torn4dom4n opened this issue 10 months ago • 15 comments

What version of starlight are you using?

v0.21.4

What version of astro are you using?

4.5.16

What package manager are you using?

bun

What operating system are you using?

Windows

What browser are you using?

Edge

Describe the Bug

The background of table is not harmonious when I add it to an aside component.

light mode: image

dark mode: image

The source code:

:::note

|     | Low       | Medium     | High       |
| --- | --------- | ---------- | ---------- |
| AFI | 25-30 cm  | 30.1-35 cm | > 35 cm    |
| SDP | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm |

:::

Link to Minimal Reproducible Example

none

Participation

  • [ ] I am willing to submit a pull request for this issue.

torn4dom4n avatar Apr 08 '24 17:04 torn4dom4n

Thanks for the issue @torn4dom4n! I agree this is not ideal styling. It might be possible to override some colours for tables inside asides. Would be curious to see anyone’s ideas for how best to solve this!

delucis avatar Apr 08 '24 18:04 delucis

Dear @torn4dom4n.

I am currently working on making PR that resolves this issue and here is what it currently looks like in my local environment. Are there any changes to the styling you want to make? If not, I will submit my code as a PR so it can be added to the Starlight package.

スクリーンショット 2024-04-15 21 29 24 スクリーンショット 2024-04-15 21 33 30

Thank you

Snowdingo

SnowDingo avatar Apr 15 '24 12:04 SnowDingo

Dear @torn4dom4n.

I am currently working on making PR that resolves this issue and here is what it currently looks like in my local environment. Are there any changes to the styling you want to make? If not, I will submit my code as a PR so it can be added to the Starlight package.

スクリーンショット 2024-04-15 21 29 24 スクリーンショット 2024-04-15 21 33 30 Thank you

Snowdingo

This is good but I think you should change the background between rows like GitHub markdown:

[!NOTE]

Low Medium High
AFI 25-30 cm 30.1-35 cm > 35 cm
SDP 8-11.9 cm 12-15.9 cm ≥ 16 cm

It made tables to be clear.

torn4dom4n avatar Apr 15 '24 15:04 torn4dom4n

@torn4dom4n, thank you for your suggestion on the styling of the table. Would it be possible for you to expand more on your idea of changing the background between the rows? I got a little confused about what you are suggesting.

Thank you @SnowDingo

SnowDingo avatar Apr 17 '24 11:04 SnowDingo

@torn4dom4n, thank you for your suggestion on the styling of the table. Would it be possible for you to expand more on your idea of changing the background between the rows? I got a little confused about what you are suggesting.

Thank you @SnowDingo

Sure. This is the image:

Screenshot_20240417-233217_Chrome

You can see the second row's background color is different from the third row.

torn4dom4n avatar Apr 17 '24 16:04 torn4dom4n

Dear, @torn4dom4n. Sorry for replying late. I figured out how to change the background colors of tables like the GitHub table. What do you think about this new version?

Thank you

Best Regards, Snowdingo

スクリーンショット 2024-04-26 14 54 38

SnowDingo avatar Apr 26 '24 05:04 SnowDingo

@SnowDingo It's too contrast for me

torn4dom4n avatar Apr 26 '24 13:04 torn4dom4n

Dear @torn4dom4n.

Thank you for your suggestion about the coloring of the table. I changed the colors so that it has less contrast with each other. It is not the official Starlight color pallet so it doesn't look good on both light & dark themes. What do you think about this?

スクリーンショット 2024-04-27 10 08 45 スクリーンショット 2024-04-27 10 14 50

Sincerely, Snowdingo.

SnowDingo avatar Apr 27 '24 01:04 SnowDingo

@SnowDingo great work. I like the light mode. Dark mode is still too contrast.

torn4dom4n avatar Apr 27 '24 01:04 torn4dom4n

Dear @torn4dom4n.

Thank you for your suggestion. I adjusted the alpha property so it looks better in dark mode. What do you think of the new coloring of tables in the aside element?

スクリーンショット 2024-04-28 8 02 25 スクリーンショット 2024-04-28 8 04 12

Best regards, SnowDingo

SnowDingo avatar Apr 27 '24 23:04 SnowDingo

@SnowDingo I love it 👍🏻. Hope the others also like it.

torn4dom4n avatar Apr 28 '24 00:04 torn4dom4n

Dear @torn4dom4n.

Thank you for your suggestion. I adjusted the alpha property so it looks better in dark mode. What do you think of the new coloring of tables in the aside element?

スクリーンショット 2024-04-28 8 02 25 スクリーンショット 2024-04-28 8 04 12 Best regards, SnowDingo

Let's create a PR.

torn4dom4n avatar Apr 29 '24 00:04 torn4dom4n

@torn4dom4n

Before I create a PR that resolves this issue, would you mind reviewing the rest of the coloring for the other types of Aside elements?

スクリーンショット 2024-04-29 17 20 37 スクリーンショット 2024-04-29 17 20 48 スクリーンショット 2024-04-29 17 21 11 スクリーンショット 2024-04-29 17 21 22 スクリーンショット 2024-04-29 17 21 54 スクリーンショット 2024-04-29 17 22 17

Best Regards, Snowdingo

SnowDingo avatar Apr 29 '24 08:04 SnowDingo

@SnowDingo I really love all of them.

torn4dom4n avatar Apr 29 '24 11:04 torn4dom4n

Dear @torn4dom4n. I created a PR that resolves this issue.

https://github.com/withastro/starlight/pull/1796

Thank you for contributing to Astro Starlight!

Sincerely, Snowdingo

SnowDingo avatar Apr 29 '24 23:04 SnowDingo