-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(card): Add primary action element with hover, focused, and pressed states #2039
Changes from 89 commits
f9e256f
d7c537f
1cbe378
d3bace3
51fa44d
d363411
4c08741
aac2ca2
3604c49
da234a4
059a325
b6a5993
e27c1c1
e41ddbf
bb574cc
0bcb922
aeaa446
482dbe8
06c0920
1750a9f
c9b6278
86f2083
6fb8e12
0cb61b0
3997ad8
4bbfd02
dc4c5c3
6f4acb8
6836c5e
1f32dcd
974edd6
8ce2bac
5a72bf1
6c5970f
dafbd04
8f0db4d
9fdced1
45e98de
414c981
87980a4
c0f4e51
b7627db
49469c0
24b794b
fa9073b
420a1ec
ff57974
f4731c1
70e7c49
3364d96
75f81dc
137b74d
7c0f775
51de056
689290d
1503a2f
90840cf
0a81243
3c5f572
fc36930
f177ce0
25a70ca
3a74182
d26281d
8e24e56
cf07755
4ed5f6a
d36e518
2576113
4f0958c
5bce402
f0eb759
0129f53
2cba692
fdd4eb1
8f000b6
379c541
baacdd2
2069984
c498e8b
0a96446
70d23bf
70e0e90
9050309
276b221
1a0ac4d
bdba1d8
671f128
17fb14f
d1563ce
5659d54
6a30d54
e3648a8
aff87a1
d1b92bc
9287220
9a74141
5080a86
941c6f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,9 @@ | |
.mdc-card__media { | ||
@include mdc-card-media-aspect-ratio-base_; | ||
|
||
display: flex; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this makes much sense here, but also it seems like it would make more sense (and also work) if we added display / flex-direction to In fact the 3 styles (not counting mixins) currently applied to |
||
position: relative; | ||
flex-direction: column; | ||
box-sizing: border-box; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
|
@@ -81,6 +83,32 @@ | |
box-sizing: border-box; | ||
} | ||
|
||
// | ||
// Primary action | ||
// | ||
|
||
.mdc-card__primary-action { | ||
@include mdc-ripple-surface; | ||
@include mdc-ripple-radius-bounded; | ||
@include mdc-states; | ||
|
||
box-sizing: border-box; | ||
outline: 0 none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
color: inherit; | ||
text-decoration: none; | ||
overflow: hidden; | ||
} | ||
|
||
.mdc-card__primary-action:first-child { | ||
border-top-left-radius: inherit; | ||
border-top-right-radius: inherit; | ||
} | ||
|
||
.mdc-card__primary-action:last-child { | ||
border-bottom-left-radius: inherit; | ||
border-bottom-right-radius: inherit; | ||
} | ||
|
||
// | ||
// Action row | ||
// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to further qualify that this is only applicable to cards that have a primary action that the main surface should trigger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done