-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
style.scss
85 lines (72 loc) · 1.87 KB
/
style.scss
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
.editor-post-featured-image {
padding: 0;
.components-spinner {
position: absolute;
top: 50%;
left: 50%;
margin-top: -9px;
margin-left: -9px;
}
}
.editor-post-featured-image__container {
position: relative;
&:hover,
&:focus,
&:focus-within {
.editor-post-featured-image__actions {
opacity: 1;
}
}
.components-drop-zone__content {
border-radius: $radius-small;
}
// Align text and icons horizontally to avoid clipping when the featured image is not set.
&:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner {
display: flex;
align-items: center;
gap: $grid-unit-10;
.components-drop-zone__content-icon {
margin: 0;
}
}
}
.editor-post-featured-image__toggle,
.editor-post-featured-image__preview {
width: 100%;
padding: 0;
transition: all 0.1s ease-out;
@include reduce-motion("transition");
box-shadow: 0 0 0 0 var(--wp-admin-theme-color);
overflow: hidden; // Ensure the focus style properly encapsulates the image.
outline-offset: -#{$border-width};
min-height: $grid-unit-50;
display: flex;
justify-content: center;
}
.editor-post-featured-image__preview {
height: auto !important;
outline: $border-width solid rgba($black, 0.1);
.editor-post-featured-image__preview-image {
object-fit: cover;
width: 100%;
object-position: 50% 50%;
aspect-ratio: 2/1;
}
}
.editor-post-featured-image__toggle {
box-shadow: inset 0 0 0 $border-width $gray-400;
}
.editor-post-featured-image__actions {
@include reduce-motion("transition");
bottom: 0;
opacity: 0; // Use opacity instead of visibility so that the buttons remain in the tab order.
padding: $grid-unit-10;
position: absolute;
transition: opacity 50ms ease-out;
}
.editor-post-featured-image__action {
backdrop-filter: blur(16px) saturate(180%);
background: rgba(255, 255, 255, 0.75);
flex-grow: 1;
justify-content: center;
}