Skip to content

Commit 2b132cb

Browse files
committed
Improve code highlighting, tweak language
1 parent 4e252c3 commit 2b132cb

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

site/src/content/docs/components/toggler.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
---
22
title: Toggler
3-
description: Toggle attributes or classes using nothing but data attributes.
3+
description: Toggle attributes or classes on click using only data attributes and our JavaScript plugin. Works with any attribute except `id`.
44
toc: true
55
js: required
66
---
77

88
Toggler is a pure JavaScript component that can be used to avoid writing small or one-off JavaScript snippets to create interactive elements. Instead of writing custom JavaScript, use data attributes to toggle attribute values, changes classes, and more on `click` events.
99

10-
<Callout type="warning">
11-
Toggler handles any attribute except `id`.
12-
</Callout>
13-
1410
## Examples
1511

1612
### Toggle class

site/src/content/docs/guides/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Get started using Bootstrap in seconds by including our production-ready CSS and
3434
<meta charset="utf-8">
3535
<meta name="viewport" content="width=device-width, initial-scale=1">
3636
<title>Bootstrap demo</title>
37-
<link href="[[config:cdn.css]]" rel="stylesheet" integrity="[[config:cdn.css_hash]]" crossorigin="anonymous"> // [!code ++]
37+
<link href="[[config:cdn.css]]" rel="stylesheet" integrity="[[config:cdn.css_hash]]" crossorigin="anonymous"><!--[!code highlight]-->
3838
</head>
3939
<body>
4040
<h1>Hello, world!</h1>
41-
<script type="module" src="[[config:cdn.js_bundle]]" integrity="[[config:cdn.js_bundle_hash]]" crossorigin="anonymous"></script> // [!code ++]
41+
<script type="module" src="[[config:cdn.js_bundle]]" integrity="[[config:cdn.js_bundle_hash]]" crossorigin="anonymous"></script><!--[!code highlight]-->
4242
</body>
4343
</html>
4444
```

site/src/scss/_syntax.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
> code {
2323
display: flex;
24+
flex-shrink: 0;
2425
flex-direction: column;
25-
width: fit-content;
26+
width: max-content;
2627
min-width: 100%;
2728

2829
.line:empty {
2930
min-height: 1lh;
3031
}
3132
}
32-
3333
}
3434

3535
.astro-code .line.highlighted {

0 commit comments

Comments
 (0)