-
-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved table element styles & fixed table styles inside asides (#2064)
Co-authored-by: HiDeoo <[email protected]> Co-authored-by: Eva Decker <[email protected]> Co-authored-by: Chris Swithinbank <[email protected]> Co-authored-by: Lorenzo Lewis <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]>
- Loading branch information
1 parent
47f32c1
commit c5b47cb
Showing
3 changed files
with
166 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astrojs/starlight": minor | ||
--- | ||
|
||
Improves styling of Markdown tables to work better in different contexts, including against different background colours like when used in asides. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
--- | ||
title: ⚠️ Table styles test ⚠️ | ||
--- | ||
|
||
:::danger | ||
TODO(delucis): Delete me! | ||
::: | ||
|
||
| Framework | CO₂ per page visit | | ||
| ---------------------- | ------------------ | | ||
| [Starlight][sl-carbon] | 0.01g | | ||
| [VitePress][vp-carbon] | 0.05g | | ||
| [Docus][dc-carbon] | 0.05g | | ||
|
||
:::note | ||
| Framework | CO₂ per page visit | | ||
| ---------------------- | ------------------ | | ||
| [Starlight][sl-carbon] | 0.01g | | ||
| [VitePress][vp-carbon] | 0.05g | | ||
| [Docus][dc-carbon] | 0.05g | | ||
::: | ||
|
||
:::caution | ||
| Framework | CO₂ per page visit | | ||
| ---------------------- | ------------------ | | ||
| [Starlight][sl-carbon] | 0.01g | | ||
| [VitePress][vp-carbon] | 0.05g | | ||
| [Docus][dc-carbon] | 0.05g | | ||
::: | ||
|
||
[sl-carbon]: https://www.websitecarbon.com/website/starlight-astro-build-getting-started/ | ||
[vp-carbon]: https://www.websitecarbon.com/website/vitepress-dev-guide-what-is-vitepress/ | ||
[dc-carbon]: https://www.websitecarbon.com/website/docus-dev-introduction-getting-started/ | ||
|
||
## Unbalanced content example | ||
|
||
Taken from [Carbon Design System “Structured List” example](https://carbondesignsystem.com/components/structured-list/usage/#live-demo). | ||
|
||
| ColumnA | ColumnB | ColumnC | | ||
| ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| Row 1 | Row 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna, finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a porttitor interdum. | | ||
| Row 2 | Row 2 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna, finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a porttitor interdum. | | ||
|
||
## Small table example | ||
|
||
Taken from the [Bootstrap docs](https://getbootstrap.com/docs/5.3/content/tables/#overview). | ||
|
||
| # | First | Last | Handle | | ||
| --- | -------------- | -------- | -------- | | ||
| 1 | Mark | Otto | @mdo | | ||
| 2 | Jacob | Thornton | @fat | | ||
| 3 | Larry the Bird | | @twitter | | ||
|
||
## Kitchen Sink | ||
|
||
| | 1 | 2 | 3 | | ||
| ------- | --------- | ---------- | ------- | | ||
| Patrick | 25-30 cm | 30.1-35 cm | > 35 cm | | ||
| Samuel | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
| Anna | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Vianca | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Jacob | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
|
||
:::note | ||
| | 1 | 2 | 3 | | ||
| ------- | --------- | ---------- | ------- | | ||
| Patrick | 25-30 cm | 30.1-35 cm | > 35 cm | | ||
| Samuel | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
| Anna | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Vianca | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Jacob | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
::: | ||
|
||
:::tip | ||
| | 1 | 2 | 3 | | ||
| ------- | --------- | ---------- | ------- | | ||
| Patrick | 25-30 cm | 30.1-35 cm | > 35 cm | | ||
| Samuel | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
| Anna | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Vianca | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Jacob | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
::: | ||
|
||
:::caution | ||
| | 1 | 2 | 3 | | ||
| ------- | --------- | ---------- | ------- | | ||
| Patrick | 25-30 cm | 30.1-35 cm | > 35 cm | | ||
| Samuel | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
| Anna | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Vianca | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Jacob | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
::: | ||
|
||
:::danger | ||
| | 1 | 2 | 3 | | ||
| ------- | --------- | ---------- | ------- | | ||
| Patrick | 25-30 cm | 30.1-35 cm | > 35 cm | | ||
| Samuel | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
| Anna | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Vianca | 8-11.9 cm | 12-15.9 cm | 16 cm | | ||
| Jacob | 8-11.9 cm | 12-15.9 cm | ≥ 16 cm | | ||
::: | ||
|
||
## Another example | ||
|
||
| Destination | Web | Mobile | Server | Web | Mobile | | ||
| ---------------------- | --- | ------ | ------ | --- | ------ | | ||
| 1Flow | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
| 1Flow Mobile Plugin ℹ️ | ⬜️ | ✅ | ⬜️ | ⬜️ | ⬜️ | | ||
| 1Flow Web (Actions) ℹ️ | ✅ | ⬜️ | ⬜️ | ⬜️ | ⬜️ | | ||
| 2mee | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
| Aampe | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
| AB Smartly | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
| AB Tasty client side | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
| ABsmartly (Actions) | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | | ||
| Acoustic (Actions) ℹ️ | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | | ||
| Actable Predictive ℹ️ | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | | ||
| Actions Pipedrive ℹ️ | ✅ | ⬜️ | ✅ | ⬜️ | ⬜️ | | ||
| ActiveCampaign | ✅ | ✅ | ✅ | ⬜️ | ⬜️ | | ||
|
||
## Inside `<details>` | ||
|
||
<details open> | ||
<summary>View data</summary> | ||
|
||
| # | First | Last | Handle | | ||
| --- | -------------- | -------- | -------- | | ||
| 1 | Mark | Otto | @mdo | | ||
| 2 | Jacob | Thornton | @fat | | ||
| 3 | Larry the Bird | | @twitter | | ||
|
||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters