Skip to content

Commit

Permalink
Adapt focus-visible styles for checkboxes on images
Browse files Browse the repository at this point in the history
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

(cherry picked from commit 062819c)
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
  • Loading branch information
JuliaKirschenheuter committed Dec 22, 2023
1 parent bee68bc commit e6ea5f0
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 36 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_FaceContent_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_FaceContent_vue.js.map

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions src/components/File.vue
Expand Up @@ -73,10 +73,9 @@

<NcCheckboxRadioSwitch v-if="allowSelection"
class="selection-checkbox"
:aria-label="t('photos', 'Select image {imageName}', {imageName: file.basename})"
:checked="selected"
@update:checked="onToggle">
<span class="input-label">{{ t('photos', 'Select image {imageName}', {imageName: file.basename}) }}</span>
</NcCheckboxRadioSwitch>
@update:checked="onToggle" />

<FavoriteIcon v-if="file.favorite === 1"
v-once
Expand Down Expand Up @@ -333,15 +332,21 @@ export default {
z-index: 1;
width: fit-content;
// Make the checkbox background round on hover.
:deep .checkbox-radio-switch__label {
:deep .checkbox-radio-switch__input:focus-visible + .checkbox-radio-switch__content,
.checkbox-radio-switch__input:focus-visible {
outline: 2px solid var(--color-main-text);
box-shadow: 0 0 0 3px var(--color-main-background);
outline-offset: 0px;
}
:deep .checkbox-radio-switch__content {
padding: 10px;
box-sizing: border-box;
background: var(--color-main-background);
// Add a background to the checkbox so we do not see the image through it.
&::after {
content: '';
background: var(--color-primary-element-light);
width: 16px;
height: 16px;
position: absolute;
Expand Down

0 comments on commit e6ea5f0

Please sign in to comment.