diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-12-01 11:02:46 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-12-01 11:02:46 +0000 |
| commit | fdfb8810c1d8ab64969c38aa1a6bce1daf013249 (patch) | |
| tree | 14efedfdbbfca297da51819235c71ca685cc9902 /src/components/attachment/attachment.vue | |
| parent | c655699935ce6fd8b5d0a744dafd6403e32277b7 (diff) | |
| parent | 655d985a82d194cd38c5ec75f1b0153804965d5f (diff) | |
Merge branch 'fix/use-semantically-correct-buttons' into 'develop'
Fix #1001 Accessibility: Use semantically correct buttons (almost) everywhere
Closes #1001
See merge request pleroma/pleroma-fe!1293
Diffstat (limited to 'src/components/attachment/attachment.vue')
| -rw-r--r-- | src/components/attachment/attachment.vue | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index f1fac2c8..2c1c1682 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -42,15 +42,13 @@ icon="play-circle" /> </a> - <div + <button v-if="nsfw && hideNsfwLocal && !hidden" - class="hider" + class="button-unstyled hider" + @click.prevent="toggleHidden" > - <a - href="#" - @click.prevent="toggleHidden" - >Hide</a> - </div> + <FAIcon icon="times" /> + </button> <a v-if="type === 'image' && (!hidden || preloadImage)" @@ -234,15 +232,23 @@ .hider { position: absolute; right: 0; - white-space: nowrap; margin: 10px; - padding: 5px; - background: rgba(230,230,230,0.6); - font-weight: bold; + padding: 0; z-index: 4; - line-height: 1; border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); + text-align: center; + width: 2em; + height: 2em; + font-size: 1.25em; + // TODO: theming? hard to theme with unknown background image color + background: rgba(230, 230, 230, 0.7); + .svg-inline--fa { + color: rgba(0, 0, 0, 0.6); + } + &:hover .svg-inline--fa { + color: rgba(0, 0, 0, 0.9); + } } video { |
