PluginProbe
Code Snippets / 3.10.0-beta.1
Code Snippets v3.10.0-beta.1
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 3.10.0-beta.1, 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 'sass:color';
2 @use '../common/theme';
3 @use '../common/cards';
4
5 .cloud-search-result {
6 p:last-child {
7 margin-block-end: 0;
8 }
9
10 .card-inner {
11 display: flex;
12 flex-flow: column;
13 gap: 16px;
14 }
15
16 .snippet-card-header {
17 display: flex;
18 align-items: center;
19 gap: 10px;
20
21 // Keep header content clear of the absolutely-positioned selection checkbox.
22 padding-inline-end: 32px;
23
24 h3 {
25 margin: 0;
26 font-size: 18px;
27 font-weight: 700;
28 line-height: 1.5;
29 min-inline-size: 0;
30 }
31
32 .cloud-snippet-title-button {
33 display: block;
34 max-inline-size: 100%;
35 margin: 0;
36 padding: 0;
37 border: none;
38 background: none;
39 font: inherit;
40 color: theme.$accent;
41 cursor: pointer;
42 text-align: start;
43 overflow: hidden;
44 white-space: nowrap;
45 text-overflow: ellipsis;
46
47 &:hover, &:focus {
48 text-decoration: underline;
49 }
50
51 &:focus-visible {
52 outline: 2px solid theme.$accent;
53 outline-offset: 2px;
54 border-radius: 2px;
55 }
56 }
57 }
58
59 .snippet-card-meta {
60 display: flex;
61 align-items: center;
62 flex-wrap: wrap;
63 gap: 16px;
64 font-size: 14px;
65
66 .cloud-snippet-tags {
67 color: theme.$accent;
68 }
69
70 .snippet-card-modified {
71 color: #6c7e7e;
72 margin-inline-start: auto;
73 }
74 }
75
76 .snippet-description-content {
77 display: -webkit-box;
78 -webkit-box-orient: vertical;
79 -webkit-line-clamp: 2;
80 line-clamp: 2;
81 overflow: hidden;
82 margin: 0;
83 font-size: 14px;
84 color: #646970;
85 border-block-start: 1px solid #dcdcde;
86 padding-block-start: 16px;
87 }
88
89 .cloud-snippet-author {
90 margin: 0;
91 font-size: 14px;
92 color: #646970;
93
94 a {
95 color: theme.$accent;
96 }
97 }
98
99 footer {
100 .dashicons-warning {
101 color: #b32d2e;
102 }
103
104 .cloud-snippet-update svg {
105 display: block;
106 }
107
108 .button {
109 font-size: 14px;
110 line-height: 2.5714;
111 border-radius: 5px;
112 }
113
114 .button:not(.button-primary, .cloud-pro-button) {
115 background: #fff;
116 }
117 }
118 }
119
120 .cloud-search-results .cloud-search-result footer .components-spinner {
121 margin: 0;
122 }
123
124 // Anchored to the card container so this keeps its brand-orange fill above the WP-admin
125 // compatibility layer's secondary-button styling (equal specificity, resolved by source order).
126 .cloud-search-result .cloud-pro-button.button {
127 background-color: theme.$secondary;
128 border-color: theme.$secondary;
129 color: #fff;
130
131 &:hover,
132 &:focus {
133 background-color: color.adjust(theme.$secondary, $lightness: -10%);
134 border-color: color.adjust(theme.$secondary, $lightness: -10%);
135 color: #fff;
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