Skip to content

Commit

Permalink
Better <Digits />
Browse files Browse the repository at this point in the history
  • Loading branch information
barvian committed Nov 23, 2024
1 parent 228110c commit d8a1875
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 2 additions & 5 deletions site/src/pages/[...framework]/_Digits.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<span
class="text-muted *:*:text-primary whitespace-nowrap text-center text-[.75em] leading-none *:*:absolute *:relative *:*:bottom-full *:*:left-0 *:inline-block *:*:w-full *:w-[1.5ch] *:*:text-[.75em] *:*:font-medium *:*:normal-nums *:*:tracking-tighter"
><span>4<span>1</span></span><span>2<span>0</span></span>.<span>1<span>-1</span></span><span
>5<span>-2</span></span
></span
<span class="*:text-muted whitespace-nowrap"
>3<sup>2</sup>4<sup>1</sup>2<sup>0</sup>.5<sup>-1</sup></span
>
2 changes: 1 addition & 1 deletion site/src/pages/[...framework]/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ See the [input example](/examples/#input) for a usage scenario.
<code>digits<Type>: Record{'<number, { max?: number }>'}</Type></code>
</h3>

Configure digits based on their position in the number (i.e. <Digits/>). This can be helpful for time-related displays,
Configure digits based on their position in the number (i.e. for 342.5, the positions are: <Digits />). This can be helpful for time-related displays,
to ensure e.g. 59 -> 00. See the [countdown example](/examples/#countdown) for a demo.

<Note>
Expand Down
4 changes: 4 additions & 0 deletions site/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export default {
css: {
'line-height': '1.7',

th: {
'@apply font-semibold': {}
},

a: {
'font-weight': 'unset',
'@apply link-underline': {}
Expand Down

0 comments on commit d8a1875

Please sign in to comment.