Skip to content

Commit b8e0028

Browse files
authored
docs: Update card link title style (#2331)
1 parent 897a12a commit b8e0028

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/src/styles/docs/cardLink.scss

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
&:hover {
1414
transform: translate3d(0, -2px, 0);
1515
.docs-cardLink-title {
16-
text-decoration: underline;
16+
--amplify-border-animation-offset: 100%;
1717
}
1818
}
1919
}
@@ -34,10 +34,14 @@
3434
}
3535

3636
.docs-cardLink-title {
37+
display: inline-block;
3738
font-weight: bold;
39+
background: linear-gradient(var(--amplify-colors-font-primary) 0 0) 0 100% /
40+
var(--amplify-border-animation-offset, 0)
41+
var(--amplify-border-widths-medium) no-repeat;
42+
transition: 0.5s;
3843
}
3944

40-
4145
// Plain (default) variation
4246
.docs-cardLink--plain {
4347
gap: var(--amplify-space-medium);
@@ -46,8 +50,6 @@
4650
align-items: center;
4751
}
4852

49-
50-
5153
// Branded and Home variations
5254
%docs-cardLink--branded {
5355
background: var(--amplify-colors-background-primary);
@@ -68,14 +70,16 @@
6870
font-weight: var(--amplify-font-weights-semibold);
6971
margin-block-end: var(--amplify-space-xxxs);
7072
}
71-
.docs-cardLink-title, .docs-cardLink-desc {
73+
.docs-cardLink-title,
74+
.docs-cardLink-desc {
7275
color: var(--amplify-colors-font-primary);
7376
}
7477
}
7578

7679
.docs-cardLink--branded {
7780
@extend %docs-cardLink--branded;
78-
border: var(--amplify-border-widths-small) solid var(--amplify-colors-border-secondary);
81+
border: var(--amplify-border-widths-small) solid
82+
var(--amplify-colors-border-secondary);
7983
}
8084

8185
.docs-cardLink--home {
@@ -98,7 +102,7 @@
98102
padding-top: var(--amplify-space-large);
99103
border-top: 1px solid var(--amplify-colors-border-secondary);
100104
a {
101-
transform: translate(0,-3px);
105+
transform: translate(0, -3px);
102106
.icon-link {
103107
font-size: 1.4em;
104108
}

0 commit comments

Comments
 (0)