File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed
packages/site-kit/src/lib Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 61
61
position : absolute ;
62
62
top : 0 ;
63
63
height : var (--height );
64
+ padding : 0.3rem ;
64
65
65
66
&:has(.filename) {
66
67
position : relative ;
78
79
color : var (--sk-text-2 );
79
80
}
80
81
82
+ .ts-toggle {
83
+ appearance : none ;
84
+ display : flex ;
85
+ align-items : center ;
86
+ height : calc (var (--height ) - 0.6rem );
87
+ outline-offset : 0 ;
88
+ border-radius : var (--sk-border-radius );
89
+ padding : 0 0.4rem ;
90
+
91
+ &::before,
92
+ &::after {
93
+ width: 2rem ;
94
+ display : flex ;
95
+ justify-content : center ;
96
+ align-items : center ;
97
+ font-size : 1.2rem ;
98
+ font-weight : 600 ;
99
+ font-family : var (--sk-font-mono );
100
+ }
101
+
102
+ &::before {
103
+ content : ' JS' ;
104
+ opacity : 0.8 ;
105
+ }
106
+
107
+ &::after {
108
+ content : ' TS' ;
109
+ border-left : none ;
110
+ opacity : 0.2 ;
111
+ }
112
+
113
+ &:checked {
114
+ &::before {
115
+ opacity: 0.2 ;
116
+ }
117
+
118
+ &::after {
119
+ opacity : 0.8 ;
120
+ }
121
+ }
122
+ }
123
+
81
124
.copy-to-clipboard {
82
- height : var (--height );
125
+ height : calc ( var (--height ) - 0.6 rem );
83
126
aspect-ratio : 1 ;
84
127
background : url (../icons/copy-to-clipboard-empty-light.svg ) no-repeat 50% 50% / 2rem 2rem ;
128
+ border-radius : var (--sk-border-radius );
85
129
}
86
130
}
87
131
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export async function render_content_markdown(
163
163
}
164
164
165
165
if ( converted ) {
166
- html += `<input class="ts-toggle" type="checkbox">` ;
166
+ html += `<input class="ts-toggle" type="checkbox" aria-label="Toggle JS/TS" >` ;
167
167
}
168
168
169
169
if ( options . copy ) {
You can’t perform that action at this time.
0 commit comments