Skip to content

Commit

Permalink
refactor: Rename classes internally to better support rtl languages (
Browse files Browse the repository at this point in the history
  • Loading branch information
dermotduffy authored Dec 14, 2024
1 parent fdb25f3 commit dc5de02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/next-prev-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class FrigateCardNextPreviousControl extends LitElement {

const classes = {
controls: true,
previous: this.direction === 'previous',
next: this.direction === 'next',
left: this.direction === 'previous',
right: this.direction === 'next',
thumbnails: !renderIcon,
icons: renderIcon,
button: renderIcon,
Expand Down
16 changes: 8 additions & 8 deletions src/scss/next-previous-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
:host {
--frigate-card-next-prev-size: 48px;
--frigate-card-next-prev-size-hover: calc(var(--frigate-card-next-prev-size) * 2);
--frigate-card-prev-position: 45px;
--frigate-card-next-position: 45px;
--frigate-card-left-position: 45px;
--frigate-card-right-position: 45px;
--mdc-icon-button-size: var(--frigate-card-next-prev-size);
--mdc-icon-size: calc(var(--mdc-icon-button-size) / 2);
}
Expand All @@ -14,11 +14,11 @@
z-index: 1;
overflow: hidden;
}
.controls.previous {
left: var(--frigate-card-prev-position);
.controls.left {
left: var(--frigate-card-left-position);
}
.controls.next {
right: var(--frigate-card-next-position);
.controls.right {
right: var(--frigate-card-right-position);
}

.controls.icons {
Expand All @@ -42,14 +42,14 @@

.controls.previous.thumbnails:hover {
left: calc(
var(--frigate-card-prev-position) -
var(--frigate-card-left-position) -
(var(--frigate-card-next-prev-size-hover) - var(--frigate-card-next-prev-size)) / 2
);
}

.controls.next.thumbnails:hover {
right: calc(
var(--frigate-card-next-position) -
var(--frigate-card-right-position) -
(var(--frigate-card-next-prev-size-hover) - var(--frigate-card-next-prev-size)) / 2
);
}

0 comments on commit dc5de02

Please sign in to comment.