Skip to content

Commit 3bf6c3b

Browse files
committed
some CSS stuff
1 parent 8460b9a commit 3bf6c3b

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

packages/site-kit/src/lib/components/Text.svelte

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,38 @@
5050
.code-block {
5151
position: relative;
5252
box-shadow: 1px 2px 1rem hsla(0 0 0 / 0.08);
53+
border-radius: var(--sk-border-radius);
54+
overflow: hidden;
5355
margin: 2rem 0;
5456
5557
.controls {
56-
position: relative;
58+
--height: 3.6rem;
59+
display: flex;
60+
align-items: center;
61+
position: absolute;
62+
top: 0;
63+
height: var(--height);
5764
58-
.ts-toggle {
59-
position: absolute;
65+
&:has(.filename) {
66+
position: relative;
67+
background: var(--sk-back-4);
68+
}
69+
70+
.filename {
71+
content: attr(data-file);
72+
display: block;
73+
flex: 1;
74+
font-family: var(--sk-font-mono);
75+
font-size: 1.2rem;
76+
font-weight: 400;
77+
padding: 0 1rem;
78+
color: var(--sk-text-2);
79+
}
80+
81+
.copy-to-clipboard {
82+
height: var(--height);
83+
aspect-ratio: 1;
84+
background: url(../icons/copy-to-clipboard-empty-light.svg) no-repeat 50% 50% / 2rem 2rem;
6085
}
6186
}
6287
@@ -68,20 +93,6 @@
6893
display: none;
6994
}
7095
71-
.filename {
72-
content: attr(data-file);
73-
display: block;
74-
width: 100%;
75-
font-family: var(--sk-font-mono);
76-
font-size: 1.2rem;
77-
font-weight: 400;
78-
padding: 1rem 1rem 0.8rem 1rem;
79-
color: var(--sk-text-2);
80-
background: var(--sk-back-4);
81-
border-radius: var(--sk-border-radius) var(--sk-border-radius) 0 0;
82-
box-sizing: border-box;
83-
}
84-
8596
pre {
8697
position: relative;
8798
margin: 0;

0 commit comments

Comments
 (0)