codecheck
128 строк · 2.5 Кб
1// core
2.p-image-mask {
3display: flex;
4align-items: center;
5justify-content: center;
6}
7
8.p-image-preview-container {
9position: relative;
10display: inline-block;
11line-height: 0;
12}
13
14.p-image-preview-indicator {
15position: absolute;
16left: 0;
17top: 0;
18width: 100%;
19height: 100%;
20display: flex;
21align-items: center;
22justify-content: center;
23opacity: 0;
24transition: opacity 0.3s;
25border: none;
26padding: 0;
27}
28
29.p-image-preview-container:hover > .p-image-preview-indicator {
30opacity: 1;
31cursor: pointer;
32}
33
34.p-image-preview-container > img {
35cursor: pointer;
36}
37
38.p-image-toolbar {
39position: absolute;
40top: 0;
41right: 0;
42display: flex;
43z-index: 1;
44}
45
46.p-image-action.p-link {
47display: flex;
48justify-content: center;
49align-items: center;
50}
51
52.p-image-action.p-disabled {
53pointer-events: auto;
54}
55
56.p-image-preview {
57transition: transform 0.15s;
58max-width: 100vw;
59max-height: 100vh;
60}
61
62.p-image-preview-enter-active {
63transition: all 150ms cubic-bezier(0, 0, 0.2, 1);
64}
65.p-image-preview-leave-active {
66transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
67}
68.p-image-preview-enter-from,
69.p-image-preview-leave-to {
70opacity: 0;
71transform: scale(0.7);
72}
73
74// theme
75.p-image-mask {
76--maskbg: #{$imageMaskBg};
77}
78
79.p-image-preview-indicator {
80background-color: transparent;
81color: $imagePreviewIndicatorColor;
82transition: $actionIconTransition;
83
84.p-icon {
85width: $imagePreviewActionIconFontSize;
86height: $imagePreviewActionIconFontSize;
87}
88}
89
90.p-image-preview-container {
91&:hover {
92> .p-image-preview-indicator {
93background-color: $imagePreviewIndicatorBg;
94}
95}
96}
97
98.p-image-toolbar {
99padding: $imagePreviewToolbarPadding;
100}
101
102.p-image-action.p-link {
103color: $imagePreviewActionIconColor;
104background-color: $imagePreviewActionIconBg;
105width: $imagePreviewActionIconWidth;
106height: $imagePreviewActionIconHeight;
107border-radius: $imagePreviewActionIconBorderRadius;
108transition: $actionIconTransition;
109margin-right: $inlineSpacing;
110
111&:last-child {
112margin-right: 0;
113}
114
115&:hover {
116color: $imagePreviewActionIconHoverColor;
117background-color: $imagePreviewActionIconHoverBg;
118}
119
120i {
121font-size: $imagePreviewActionIconFontSize;
122}
123
124.p-icon {
125width: $imagePreviewActionIconFontSize;
126height: $imagePreviewActionIconFontSize;
127}
128}