Repository navigation
Expand file tree
/
Copy pathStarterPromptsCardAction.module.css
More file actions
131 lines (113 loc) · 3.2 KB
/
Copy pathStarterPromptsCardAction.module.css
File metadata and controls
131 lines (113 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
:global(.webchat-fluent) .pre-chat-message-activity__card-action-box {
appearance: none;
background-color: var(--webchat-colorNeutralBackground1);
border: 0;
border-radius: 16px;
box-shadow: var(--webchat-shadow2);
color: var(--webchat-colorNeutralForeground1);
cursor: pointer;
display: grid;
gap: var(--webchat-spacingVerticalS);
grid-template-areas: 'title' 'subtitle';
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
overflow: hidden;
padding: 16px 20px;
text-align: left;
transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
user-select: none;
&:has(.pre-chat-message-activity__card-action-image) {
grid-template-areas: 'image title' 'empty subtitle';
grid-template-columns: 20px 1fr;
}
&:empty {
row-gap: 14px;
}
&[aria-disabled='true'],
&:empty {
cursor: default;
}
&[aria-disabled='true']:not(:empty) {
background-color: var(--webchat-colorNeutralBackgroundDisabled);
}
&:hover:not([aria-disabled='true'], :empty) {
background-color: var(--webchat-colorNeutralBackground1Hover);
}
&:active:not([aria-disabled='true'], :empty) {
background-color: var(--webchat-colorNeutralBackground1Pressed);
}
&:focus-visible {
outline: solid 2px var(--webchat-colorStrokeFocus2);
outline-offset: -2px;
}
/* Forced colors remove the card shadow and fill, so draw a border as a native button does. */
@media (forced-colors: active) {
border: var(--webchat-strokeWidthThin) solid ButtonText;
}
&:empty::after,
&:empty::before {
animation: blueprintAnimation 3s linear infinite;
background-attachment: fixed;
background-image: linear-gradient(
-90deg,
var(--webchat-colorNeutralStencil1) 0%,
var(--webchat-colorNeutralStencil2) 50%,
var(--webchat-colorNeutralStencil1) 100%
);
background-size: 300% 100%;
content: '';
display: block;
}
/* animation-* needs to position after animation shorthand. */
@media (prefers-reduced-motion: reduce) {
&:empty::after,
&:empty::before {
animation-delay: -1s;
animation-play-state: paused;
}
}
&:dir(rtl) {
&:empty::after,
&:empty::before {
animation-direction: reverse;
}
}
&:empty::after {
border-radius: 16px;
height: 16px;
width: 100%;
}
&:empty::before {
border-radius: 18px;
height: 18px;
width: 66%;
}
}
@keyframes blueprintAnimation {
from {
background-position-x: 0%;
}
to {
background-position-x: -300%;
}
}
:global(.webchat-fluent) .pre-chat-message-activity__card-action-image {
color: var(--webchat-colorNeutralForeground4);
font-size: 20px;
grid-area: image;
}
:global(.webchat-fluent) .pre-chat-message-activity__card-action-subtitle {
font-family: var(--webchat-fontFamilyBase);
font-size: 14px;
font-weight: var(--webchat-fontWeightRegular);
grid-area: subtitle;
line-height: 20px;
pointer-events: none; /* Links in subtitle are not clickable. */
}
:global(.webchat-fluent) .pre-chat-message-activity__card-action-title {
font-family: var(--webchat-fontFamilyBase);
font-size: 14px;
font-weight: var(--webchat-fontWeightSemibold);
grid-area: title;
line-height: 20px;
}