File tree Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Original file line number Diff line number Diff line change 1
1
<div local-class =" crate-row" data-test-crate-row ...attributes>
2
2
<div local-class =" description-box" >
3
- <div >
3
+ <div local-class = " crate-spec " >
4
4
{{ #let (link " crate" @crate.id ) as |l |}}
5
5
<a href ={{ l.url }} local-class =" name" data-test-crate-link {{ on " click" l.transitionTo }} >
6
6
{{ @crate.name }}
Original file line number Diff line number Diff line change 23
23
overflow-wrap : break-word;
24
24
}
25
25
26
- .version {
27
- margin-left : var (--space-2xs );
28
- }
29
-
30
26
.copy-button {
31
27
composes : button-reset from '../styles/shared/buttons.module.css' ;
32
- padding : 0 var (--space-2xs );
33
28
color : var (--main-color );
34
29
cursor : pointer;
35
- opacity : 0 ;
36
- transition : var (--transition-medium );
37
30
38
- .crate-row : hover & {
39
- opacity : .8 ;
40
- transition : var (--transition-instant );
41
- }
31
+ /* Hover selector for pointer only */
32
+ /* See: https://github.com/rust-lang/crates.io/issues/10772 */
33
+ @media (pointer : fine) {
34
+ opacity : 0 ;
35
+ transition : var (--transition-medium );
42
36
43
- .crate-row : hover & : hover , & : focus {
44
- opacity : 1 ;
45
- transition : var (--transition-instant );
37
+ .crate-row : hover & {
38
+ opacity : .8 ;
39
+ transition : var (--transition-instant );
40
+ }
41
+
42
+ .crate-row : hover & : hover , & : focus {
43
+ opacity : 1 ;
44
+ transition : var (--transition-instant );
45
+ }
46
46
}
47
47
48
48
svg {
49
+ vertical-align : top;
49
50
height : 1rem ;
50
51
width : 1rem ;
51
52
}
52
53
}
53
54
55
+ .crate-spec {
56
+ display : flex;
57
+ flex-wrap : wrap;
58
+ align-items : center;
59
+
60
+ & > * {
61
+ margin-bottom : calc (var (--space-xs ) / 2 );
62
+ }
63
+ & > : not (last-child ) {
64
+ margin-right : var (--space-2xs );
65
+ }
66
+ }
67
+
54
68
.description {
55
69
composes : small from '../styles/shared/typography.module.css' ;
56
- margin-top : var (--space-xs );
70
+ margin-top : calc ( var (--space-xs ) / 2 );
57
71
line-height : 1.5 ;
58
72
}
59
73
You can’t perform that action at this time.
0 commit comments