File tree Expand file tree Collapse file tree 3 files changed +38
-24
lines changed
apps/svelte.dev/src/routes/(authed)/playground/[id]
site-kit/src/lib/styles/utils Expand file tree Collapse file tree 3 files changed +38
-24
lines changed Original file line number Diff line number Diff line change 206206
207207 <div class =" buttons" >
208208 <button
209- class =" raised icon"
209+ class =" raised icon tooltip "
210210 disabled ={saving || ! user }
211211 onclick ={() => fork (false )}
212212 aria-label ={user ? ' fork' : ' log in to fork' }
219219 </button >
220220
221221 <button
222- class =" raised icon"
222+ class =" raised icon tooltip "
223223 disabled ={saving || ! user }
224224 onclick ={save }
225225 aria-label ={user
267267 background-size : 1.8rem ;
268268 z-index : 999 ;
269269
270- &[aria-label ]:hover::before {
271- content : ' ' ;
272- width : 1rem ;
273- height : 1rem ;
274- position : absolute ;
275- background : var (--sk-text-3 );
276- top : calc (100% + 0.5rem );
277- rotate : 45deg ;
278- }
279-
280- &[aria-label ]:hover ::after {
281- content : attr (aria-label );
282- position : absolute ;
283- top : calc (100% + 1rem );
284- background : var (--sk-text-3 );
285- color : var (--sk-back-4 );
286- padding : 0.5em 0.5em ;
287- border-radius : var (--sk-border-radius );
288- }
289-
290270 &.login {
291271 width : auto ;
292272 background-image : url ($lib/icons/user-light.svg );
Original file line number Diff line number Diff line change 77 </script >
88
99<button
10- class =" raised"
10+ class =" raised tooltip-left "
1111 disabled ={! can_migrate }
1212 onclick ={migrate }
13- title = " Migrate this component towards the new syntax "
13+ aria-label = " Convert syntax from Svelte 4 to 5 if possible "
1414>
1515 migrate
1616</button >
Original file line number Diff line number Diff line change 4444 background-position : 50% 50% ;
4545 background-size : 2.3rem 2.3rem ;
4646}
47+
48+ button : where (.tooltip , .tooltip-left )[aria-label ]: where (: hover , : focus ) {
49+ --arrow-size : 1rem ;
50+
51+ & ::before {
52+ content : '' ;
53+ width : var (--arrow-size );
54+ height : var (--arrow-size );
55+ position : absolute;
56+ background : var (--sk-text-3 );
57+ top : calc (100% + var (--arrow-size ) * 0.5 );
58+ left : calc (50% - var (--arrow-size ) * 0.5 );
59+ rotate : 45deg ;
60+ }
61+
62+ & ::after {
63+ content : attr (aria-label);
64+ position : absolute;
65+ top : calc (100% + var (--arrow-size ));
66+ left : 50% ;
67+ translate : -50% 0 ;
68+ background : var (--sk-text-3 );
69+ color : var (--sk-back-4 );
70+ padding : 0.5em 0.8em ;
71+ border-radius : var (--sk-border-radius );
72+ font : var (--sk-font-ui-small );
73+ text-transform : none;
74+ white-space : pre;
75+ }
76+
77+ & .tooltip-left ::after {
78+ translate : calc (-100% + 2rem ) 0 ;
79+ }
80+ }
You can’t perform that action at this time.
0 commit comments