File tree 2 files changed +64
-13
lines changed
2 files changed +64
-13
lines changed Original file line number Diff line number Diff line change
1
+ <script module >
2
+ import table from " ./table.svelte" ;
3
+ export { table };
4
+ </script >
5
+
1
6
<script lang =" ts" >
2
7
import type { Snippet } from " svelte" ;
3
8
import { format } from " date-fns" ;
27
32
28
33
<style >
29
34
.article {
30
- display : flex ;
31
- flex-direction : column ;
32
- gap : 2rem ;
33
35
max-width : 67ch ;
36
+ width : 100% ;
34
37
font-size : 1.125rem ;
35
38
}
39
+ .article :global(h1 ) {
40
+ margin-block : 0.67em ;
41
+ }
42
+ .article :global(h2 ) {
43
+ margin-block : 0.83em ;
44
+ }
45
+ .article :global(h3 ) {
46
+ margin-block : 1em ;
47
+ }
48
+ .article :global(p ) {
49
+ margin-block : 1em ;
50
+ }
51
+ .article :global(ul ),
52
+ .article :global(ol ) {
53
+ margin-block : 1em ;
54
+ }
55
+ .article :global(pre ) {
56
+ overflow-x : auto ;
57
+ padding : 0.5rem ;
58
+ }
59
+ .article :global(blockquote ) {
60
+ border-left : 0.5rem solid var (--color-primary );
61
+ padding : 1rem ;
62
+ background-color : color-mix(in srgb , var (--color-primary ) 10% , white );
63
+ }
64
+ .article :global(table ) {
65
+ overflow-x : auto ;
66
+ width : 100% ;
67
+ max-width : 100% ;
68
+ border-collapse : collapse ;
69
+ }
70
+ .article :global(thead ) {
71
+ display : table-header-group ;
72
+ vertical-align : middle ;
73
+ }
74
+ .article :global(tr ) {
75
+ display : table-row ;
76
+ vertical-align : inherit ;
77
+ }
78
+ .article :global(th ) {
79
+ vertical-align : bottom ;
80
+ border-bottom : 2px solid #dee2e6 ;
81
+ text-align : inherit ;
82
+ }
83
+ .article :global(th ),
84
+ .article :global(td ) {
85
+ vertical-align : top ;
86
+ padding : 0.75rem ;
87
+ border-top : 1px solid #dee2e6 ;
88
+ }
36
89
.byline {
37
90
font-style : italic ;
38
91
font-size : 1rem ;
44
97
flex-direction : column ;
45
98
align-items : center ;
46
99
}
47
-
48
- :global(pre ) {
49
- overflow-x : auto ;
50
- padding : 0.5rem ;
51
- }
52
- :global(blockquote ) {
53
- border-left : 0.5rem solid var (--color-primary );
54
- padding : 1rem ;
55
- background-color : color-mix(in srgb , var (--color-primary ) 10% , white );
56
- }
57
100
</style >
Original file line number Diff line number Diff line change
1
+ <div class =" table-wrapper" ><table ><slot /></table ></div >
2
+
3
+ <style >
4
+ .table-wrapper {
5
+ width : 100% ;
6
+ overflow-x : auto ;
7
+ }
8
+ </style >
You can’t perform that action at this time.
0 commit comments