PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / manage / _cloud-community-cards.scss

_cloud-community-cards.scss in Code Snippets trunk, at css/manage/_cloud-community-cards.scss

180 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use '../common/theme';
2 @use '../common/cards';
3
4 .cloud-search-result {
5 p:last-child {
6 margin-block-end: 0;
7 }
8
9 .card-inner {
10 display: flex;
11 flex-flow: column;
12 gap: 16px;
13 }
14
15 .snippet-card-header {
16 display: flex;
17 align-items: center;
18 gap: 10px;
19
20 // Keep header content clear of the absolutely-positioned selection checkbox.
21 padding-inline-end: 32px;
22
23 h3 {
24 margin: 0;
25 font-size: 18px;
26 font-weight: 700;
27 line-height: 1.5;
28 min-inline-size: 0;
29 }
30
31 .cloud-snippet-title-button {
32 display: block;
33 max-inline-size: 100%;
34 margin: 0;
35 padding: 0;
36 border: none;
37 background: none;
38 font: inherit;
39 color: var(--cs-color-accent);
40 cursor: pointer;
41 text-align: start;
42 overflow: hidden;
43 white-space: nowrap;
44 text-overflow: ellipsis;
45
46 &:hover, &:focus {
47 text-decoration: underline;
48 }
49
50 &:focus-visible {
51 outline: 2px solid var(--cs-color-accent);
52 outline-offset: 2px;
53 border-radius: 5px;
54 }
55 }
56 }
57
58 .snippet-card-meta {
59 display: flex;
60 align-items: center;
61 flex-wrap: wrap;
62 gap: 16px;
63 font-size: 14px;
64 line-height: 1.5;
65 border-block-end: 1px solid var(--cs-color-border-subtle);
66 padding-block-end: 16px;
67
68 .cloud-snippet-tags {
69 color: var(--cs-color-accent);
70 }
71
72 .snippet-card-modified {
73 color: #6c7e7e;
74 margin-inline-start: auto;
75 }
76 }
77
78 .snippet-description-content {
79 display: -webkit-box;
80 -webkit-box-orient: vertical;
81 -webkit-line-clamp: 2;
82 line-clamp: 2;
83 overflow: hidden;
84 margin: 0;
85 font-size: 14px;
86 line-height: 1.5;
87 color: var(--cs-color-text-muted);
88 }
89
90 .cloud-snippet-author {
91 margin: 0;
92 font-size: 14px;
93 color: var(--cs-color-text-muted);
94
95 a {
96 color: var(--cs-color-accent);
97 }
98 }
99
100 footer {
101 .dashicons-warning {
102 color: var(--cs-color-error);
103 }
104
105 .cloud-snippet-update svg {
106 display: block;
107 }
108
109 .button {
110 font-size: 14px;
111 line-height: 2.5714;
112 border-radius: 5px;
113 }
114
115 .button:not(.button-primary, .cloud-pro-button) {
116 background: transparent;
117 }
118 }
119 }
120
121 .cloud-search-results .cloud-search-result footer .components-spinner {
122 margin: 0;
123 }
124
125 // Pro-only actions use the same quiet outline treatment in card and table views.
126 .cloud-pro-button.button {
127 background-color: transparent;
128 border-color: var(--cs-color-accent);
129 color: var(--cs-color-accent);
130
131 &:hover,
132 &:focus {
133 background-color: var(--cs-color-surface-info);
134 border-color: var(--cs-color-accent);
135 color: var(--cs-color-accent);
136 }
137 }
138
139 // Three equal-height snippet cards per row, matching the manage snippets
140 // grid. minmax(0, 1fr) lets columns shrink below their content width so
141 // the grid never overflows the page.
142 ul.cloud-search-results.code-snippets-cards {
143 grid-template-columns: repeat(3, minmax(0, 1fr));
144
145 @media (width <= 1100px) {
146 grid-template-columns: repeat(2, minmax(0, 1fr));
147 }
148
149 @media (width <= 782px) {
150 grid-template-columns: minmax(0, 1fr);
151 }
152
153 .code-snippets-card {
154 min-inline-size: 0;
155
156 footer {
157 flex-wrap: wrap;
158 }
159 }
160
161 // Reveal the bulk-select checkbox on hover or keyboard focus, and keep
162 // every checkbox visible while any card in the grid is selected so an
163 // in-progress selection is never hidden.
164 .snippet-card-select {
165 opacity: 0;
166 transition: opacity 0.15s ease;
167
168 @media (prefers-reduced-motion: reduce) {
169 transition-duration: 0.01s;
170 }
171 }
172
173 .snippet-card-select:checked,
174 &.has-selection .snippet-card-select,
175 .code-snippets-card:hover .snippet-card-select,
176 .code-snippets-card:focus-within .snippet-card-select {
177 opacity: 1;
178 }
179 }
180