Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/content/docs/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ description: Learn how to customize your Starlight site and the Starlight Rapide

## Custom CSS

To customize the styles applied to your Starlight site when using the Starlight Rapide theme, you can providing additional CSS files to modify or extend the Starlight and the Starlight Rapide theme default styles.
To customize the styles applied to your Starlight site when using the Starlight Rapide theme, you can provide additional CSS files to modify or extend the Starlight and Starlight Rapide theme default styles.

[Learn more about custom CSS in the Starlight documentation.](https://starlight.astro.build/guides/css-and-tailwind/#custom-css-styles)

## Cascade layers

Like Starlight, the Starlight Rapide theme uses [cascade layers](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_layers) internally to manage the order of its styles.
This ensures a predictable CSS order and allows for simpler overrides.
Any custom unlayered CSS will override the default styles from the `starlight` and `rapide` layers.
Any custom unlayered CSS will override the default styles from Starlight and the Starlight Rapide theme.

If you are using cascade layers, you can use [`@layer`](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) in your [custom CSS](https://starlight.astro.build/guides/css-and-tailwind/#custom-css-styles) to define the order of precedence for different layers relative to the Starlight and Starlight Rapide theme styles:
If you are using cascade layers, you can use [`@layer`](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) in your [custom CSS](https://starlight.astro.build/guides/css-and-tailwind/#custom-css-styles) to define the order of precedence for different layers relative to styles from the `starlight` and `rapide` layers:

```css "starlight" "rapide"
/* src/styles/custom.css */
Expand Down
65 changes: 30 additions & 35 deletions docs/src/content/docs/examples/asides.mdx
Original file line number Diff line number Diff line change
@@ -1,68 +1,63 @@
---
title: Asides
pagefind: false
---

## Markdown asides

Asides rendered with the [custom Markdown syntax](https://starlight.astro.build/guides/authoring-content/#asides) using a pair of triple colons `:::` to wrap your content.

:::note

Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper posuere lacinia.
A `note` aside with a [link](#_) in the content.

:::

:::tip

Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper posuere lacinia.
A `tip` aside with a [link](#_) in the content.

:::

:::caution

Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper posuere lacinia.
A `caution` aside with a [link](#_) in the content.

:::

:::danger

Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper posuere lacinia.
A `danger` aside with a [link](#_) in the content.

:::

## Component asides

Asides rendered with the [`<Aside>` component](https://starlight.astro.build/components/asides/).

import { Aside } from '@astrojs/starlight/components'

<Aside>
Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper
posuere lacinia.
</Aside>
<Aside>A `note` aside with a [link](#_) in the content.</Aside>

<Aside type="tip">
Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper
posuere lacinia.
</Aside>
<Aside type="tip">A `tip` aside with a [link](#_) in the content.</Aside>

<Aside type="caution">
Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper
posuere lacinia.
A `caution` aside with a [link](#_) in the content.
</Aside>

<Aside type="danger">
Donec sollicitudin dolor et sollicitudin [efficitur](#_). Nullam semper
posuere lacinia.
</Aside>
<Aside type="danger">A `danger` aside with a [link](#_) in the content.</Aside>

## With content
## Asides with content

:::note

Some code:
A code block:

```js
const foo = 'bar'
```

Some `inline` code
A sentence with some `inline` code followed by an horizontal rule.

---

Expand All @@ -80,23 +75,23 @@ A table:
A disclosure:

<details>
<summary>Nullam nec posuere lorem.</summary>
<summary>The summary of the disclosure</summary>

Aenean tempor, orci eget ullamcorper luctus, nisl turpis pharetra mauris, sit amet tristique elit orci et sem. Aenean odio purus, suscipit quis accumsan in, blandit at ex.
The content of the [disclosure](https://starlight.astro.build/guides/authoring-content/#details) that can use any other Markdown syntax.

</details>

:::

:::tip

Some code:
A code block:

```js
const foo = 'bar'
```

Some `inline` code
A sentence with some `inline` code followed by an horizontal rule.

---

Expand All @@ -114,23 +109,23 @@ A table:
A disclosure:

<details>
<summary>Nullam nec posuere lorem.</summary>
<summary>The summary of the disclosure</summary>

Aenean tempor, orci eget ullamcorper luctus, nisl turpis pharetra mauris, sit amet tristique elit orci et sem. Aenean odio purus, suscipit quis accumsan in, blandit at ex.
The content of the [disclosure](https://starlight.astro.build/guides/authoring-content/#details) that can use any other Markdown syntax.

</details>

:::

:::caution

Some code:
A code block:

```js
const foo = 'bar'
```

Some `inline` code
A sentence with some `inline` code followed by an horizontal rule.

---

Expand All @@ -148,23 +143,23 @@ A table:
A disclosure:

<details>
<summary>Nullam nec posuere lorem.</summary>
<summary>The summary of the disclosure</summary>

Aenean tempor, orci eget ullamcorper luctus, nisl turpis pharetra mauris, sit amet tristique elit orci et sem. Aenean odio purus, suscipit quis accumsan in, blandit at ex.
The content of the [disclosure](https://starlight.astro.build/guides/authoring-content/#details) that can use any other Markdown syntax.

</details>

:::

:::danger

Some code:
A code block:

```js
const foo = 'bar'
```

Some `inline` code
A sentence with some `inline` code followed by an horizontal rule.

---

Expand All @@ -182,9 +177,9 @@ A table:
A disclosure:

<details>
<summary>Nullam nec posuere lorem.</summary>
<summary>The summary of the disclosure</summary>

Aenean tempor, orci eget ullamcorper luctus, nisl turpis pharetra mauris, sit amet tristique elit orci et sem. Aenean odio purus, suscipit quis accumsan in, blandit at ex.
The content of the [disclosure](https://starlight.astro.build/guides/authoring-content/#details) that can use any other Markdown syntax.

</details>

Expand Down
13 changes: 8 additions & 5 deletions docs/src/content/docs/examples/badges.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
title: Badges
pagefind: false
---

Badges rendered with the [`<Badge>` component](https://starlight.astro.build/components/badges/).

import { Badge } from '@astrojs/starlight/components'

<Badge text="New" variant="tip" size="small" />
<Badge text="Deprecated" variant="caution" size="medium" />
<Badge text="Rapide" variant="note" size="large" />
<Badge text="200" variant="success" />
<Badge text="Experimental" variant="danger" />
- <Badge text="New" variant="tip" size="small" />
- <Badge text="Deprecated" variant="caution" size="medium" />
- <Badge text="Demo" variant="note" size="large" />
- <Badge text="200" variant="success" />
- <Badge text="Experimental" variant="danger" />
5 changes: 3 additions & 2 deletions docs/src/content/docs/examples/banner-splash.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: Banner - Splash
pagefind: false
template: splash
banner:
content: |
Aenean eleifend, felis quis <a href="https://example.com">faucibus</a> lobortis, nunc erat interdum turpis, quis consectetur orci mauris eget leo.
A <a href="https://starlight.astro.build/reference/frontmatter/#banner">banner</a> displaying an announcement at the top of the page that can include HTML for links or other content.
---

A page using the splash template with a banner.
A page using the [`splash` template](https://starlight.astro.build/reference/frontmatter/#template) with a [banner](https://starlight.astro.build/reference/frontmatter/#banner).
5 changes: 3 additions & 2 deletions docs/src/content/docs/examples/banner.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: Banner
pagefind: false
banner:
content: |
Aenean eleifend, felis quis <a href="https://example.com">faucibus</a> lobortis, nunc erat interdum turpis, quis consectetur orci mauris eget leo.
A <a href="https://starlight.astro.build/reference/frontmatter/#banner">banner</a> displaying an announcement at the top of the page that can include HTML for links or other content.
---

A page with a banner
A page with a [banner](https://starlight.astro.build/reference/frontmatter/#banner).
50 changes: 30 additions & 20 deletions docs/src/content/docs/examples/cards.mdx
Original file line number Diff line number Diff line change
@@ -1,49 +1,59 @@
---
title: Cards
pagefind: false
---

import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components'

## Single card
## Card

<Card title="In consectetur diam">
Donec sollicitudin dolor et sollicitudin efficitur. Nullam semper posuere
lacinia.
A card rendered with the [`<Card>` component](https://starlight.astro.build/components/cards/).

<Card title="Card title">
The content of the card that can use any other Markdown syntax.
</Card>

## Cards in a grid
## Card grid

Cards rendered with the [`<Card>` component](https://starlight.astro.build/components/cards/) wrapped with the [`<CardGrid>` component](https://starlight.astro.build/components/card-grids/).

<CardGrid>
<Card title="Lorem" icon="star">
Fusce ornare ante est.
<Card title="Card title" icon="star">
The content of the card.
</Card>
<Card title="Ipsum" icon="moon">
Suspendisse ac tincidunt.
<Card title="Card title" icon="moon">
The content of the card.
</Card>
</CardGrid>

## Staggered cards in a grid
## Staggered card grid

[Staggered](https://starlight.astro.build/components/card-grids/#stagger-cards) cards rendered with the [`<Card>` component](https://starlight.astro.build/components/cards/) wrapped with the [`<CardGrid>` component](https://starlight.astro.build/components/card-grids/).

<CardGrid stagger>
<Card title="Lorem" icon="star">
Fusce ornare ante est.
<Card title="Card title" icon="star">
The content of the card.
</Card>
<Card title="Ipsum" icon="moon">
Suspendisse ac tincidunt.
<Card title="Card title" icon="moon">
The content of the card.
</Card>
</CardGrid>

## Single link card
## Link card

A link card rendered with the [`<LinkCard>` component](https://starlight.astro.build/components/link-cards/).

<LinkCard
title="In consectetur diam"
description="Donec sollicitudin dolor et sollicitudin efficitur"
title="Link title"
description="The description of the link."
href="#_"
/>

## Link cards in a grid
## Link card grid

Link cards rendered with the [`<LinkCard>` component](https://starlight.astro.build/components/link-cards/) wrapped with the [`<CardGrid>` component](https://starlight.astro.build/components/card-grids/).

<CardGrid>
<LinkCard title="Fusce ornare ante est" href="#_" />
<LinkCard title="Suspendisse ac tincidunt" href="#_" />
<LinkCard title="Link title" href="#_" />
<LinkCard title="Link title" href="#_" />
</CardGrid>
Loading