Skip to content

Commit aeb9687

Browse files
authored
[5.4] Fancy select: mark already selected elements with checkmark (joomla#46328)
1 parent 2ae53f1 commit aeb9687

File tree

2 files changed

+42
-0
lines changed
  • build/media_source/templates

2 files changed

+42
-0
lines changed

build/media_source/templates/administrator/atum/scss/vendor/choicesjs/choices.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,24 @@
239239
}
240240
}
241241
}
242+
243+
// Mark already selected elements with checkmark
244+
.choices[data-type*="select-multiple"] {
245+
.choices__item.is-selected {
246+
&::before {
247+
position: absolute;
248+
top: 50%;
249+
inset-inline-end: .2em;
250+
display: block;
251+
padding: 0 .2em;
252+
font-size: 1.2em;
253+
font-weight: bold;
254+
color: var(--success);
255+
content: "";
256+
background: var(--body-bg);
257+
border-radius: 2.5px;
258+
opacity: 1;
259+
transform: translateY(-50%);
260+
}
261+
}
262+
}

build/media_source/templates/site/cassiopeia/scss/vendor/choicesjs/choices.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,24 @@
165165
.choices__heading {
166166
font-size: 1.2rem;
167167
}
168+
169+
// Mark already selected elements with checkmark
170+
.choices[data-type*="select-multiple"] {
171+
.choices__item.is-selected {
172+
&::before {
173+
position: absolute;
174+
top: 50%;
175+
inset-inline-end: .2em;
176+
display: block;
177+
padding: 0 .2em;
178+
font-size: 1.2em;
179+
font-weight: bold;
180+
color: var(--success);
181+
content: "";
182+
background: var(--body-bg);
183+
border-radius: 2.5px;
184+
opacity: 1;
185+
transform: translateY(-50%);
186+
}
187+
}
188+
}

0 commit comments

Comments
 (0)