-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy path_gallery.scss
More file actions
116 lines (97 loc) · 2.64 KB
/
Copy path_gallery.scss
File metadata and controls
116 lines (97 loc) · 2.64 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
/* ==========================================================================
Gallery
Override styles of Gallery widget
========================================================================== */
$gallery-screen-lg: $screen-lg;
$gallery-screen-md: $screen-md;
@mixin grid-items($number, $suffix) {
@for $i from 1 through $number {
&.widget-gallery-#{$suffix}-#{$i} {
grid-template-columns: repeat($i, minmax(0, 1fr));
}
}
}
@mixin grid-span($number, $type) {
@for $i from 1 through $number {
.widget-gallery-#{$type}-span-#{$i} {
grid-#{$type}: span $i;
}
}
}
.widget-gallery {
.widget-gallery-items {
display: grid;
grid-gap: var(--spacing-small, $dg-spacing-small);
/*
Desktop widths
*/
@media screen and (min-width: $gallery-screen-lg) {
@include grid-items(12, "lg");
}
/*
Tablet widths
*/
@media screen and (min-width: $gallery-screen-md) and (max-width: ($gallery-screen-lg - 1px)) {
@include grid-items(12, "md");
}
/*
Phone widths
*/
@media screen and (max-width: ($gallery-screen-md - 1)) {
@include grid-items(12, "sm");
}
}
.widget-gallery-clickable {
cursor: pointer;
&:focus:not(:focus-visible) {
outline: none;
}
&:focus-visible {
outline: 1px solid var(--brand-primary, $dg-brand-primary);
outline-offset: -1px;
}
}
&:not(.widget-gallery-disable-selected-items-highlight) {
.widget-gallery-item.widget-gallery-clickable.widget-gallery-selected {
background: $dg-brand-light;
}
}
.infinite-loading {
overflow: auto;
}
.widget-gallery-filter,
.widget-gallery-empty,
.widget-gallery-pagination {
flex: 1;
}
/**
Helper classes
*/
@include grid-span(12, "column");
@include grid-span(12, "row");
}
.widget-gallery-item-button {
width: inherit;
}
:where(.widget-gallery-footer-controls) {
display: flex;
flex-flow: row nowrap;
}
:where(.widget-gallery-fc-start) {
margin-block: var(--spacing-medium);
padding-inline: var(--spacing-medium);
}
:where(.widget-gallery-fc-start, .widget-gallery-fc-middle, .widget-gallery-fc-end) {
flex-grow: 1;
flex-basis: 33.33%;
min-height: 20px;
}
.widget-gallery-clear-selection {
cursor: pointer;
background: transparent;
border: none;
text-decoration: underline;
color: var(--link-color);
padding: 0;
display: inline-block;
}