Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
webjsavella committed Jan 13, 2025
1 parent be27787 commit 7249501
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
12 changes: 1 addition & 11 deletions eds/blocks/columns/columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,14 @@
}

.columns .play-button {
align-items: center;
background-color: var(--calcite-ui-foreground-2);
block-size: 50px;
border-radius: 50px;
color: var(--calcite-ui-text-1);
display: flex;
inline-size: 50px;
align-items: center;
inset-block-start: calc(50% - 25px);
inset-inline-end: calc(50% - 25px);
justify-content: center;
position: absolute;
}

.columns .play-button:is(:hover,:focus) {
background-color: var(--calcite-ui-foreground-1);
color: var(--calcite-ui-text-1);
}

.columns .video-link {
display: flex;
position: relative;
Expand Down
24 changes: 12 additions & 12 deletions eds/blocks/columns/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ export default function decorate(block) {
if (vidURL) {
vidURL.innerHTML = '';
vidURL.appendChild(picture);
const playButton = document.createElement('div');
playButton.classList.add('play-button');
playButton.setAttribute('aria-label', 'play video');
playButton.setAttribute('tabindex', '0');
playButton.setAttribute('aria-hidden', 'false');
const calciteIcon = document.createElement('calcite-icon');
calciteIcon.setAttribute('scale', 's');
calciteIcon.setAttribute('appearance', 'solid');
calciteIcon.setAttribute('icon', 'play-f');
calciteIcon.setAttribute('aria-hidden', 'true');
calciteIcon.setAttribute('calcite-hydrated', '');
playButton.appendChild(calciteIcon);
const playButton = calciteButton({
class: 'play-button',
'icon-start': 'play-f',
label: 'play video',
'aria-hidden': 'false',
'aria-label': 'play video',
appearance: 'solid',
kind: 'inverse',
scale: 'l',
round: '',
});

Check failure on line 77 in eds/blocks/columns/columns.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
vidURL.appendChild(playButton);
}
});
Expand Down

0 comments on commit 7249501

Please sign in to comment.