Skip to content

Commit

Permalink
fix(player): webpack parse error in regions css calc
Browse files Browse the repository at this point in the history
ref #842
  • Loading branch information
mihar-22 committed Nov 19, 2023
1 parent c577e60 commit 3ca3213
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions packages/vidstack/player/styles/default/captions.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
*/

:where(.vds-captions [data-part='region']) {
--anchor-x-percent: calc(var(--region-anchor-x) / 100);
--anchor-x: calc(var(--region-width) * var(--anchor-x-percent));
--anchor-y-percent: calc(var(--region-anchor-y) / 100);
--anchor-y: calc(var(--region-height) * var(--anchor-y-percent));
--vp-anchor-x: calc(var(--region-viewport-anchor-x) * 1%);
--vp-anchor-y-percent: calc(var(--region-viewport-anchor-y) / 100);
--vp-anchor-y: calc(var(--overlay-height) * var(--vp-anchor-y-percent));
position: absolute;
display: inline-flex;
flex-flow: column;
Expand All @@ -123,22 +130,8 @@
min-height: 0px;
max-height: var(--region-height);
writing-mode: horizontal-tb;
top: calc(
var(
--region-top,
calc(
calc(calc(var(--overlay-height) * var(--region-viewport-anchor-y)) / 100) -
calc(var(--region-height) * calc(var(--region-anchor-y) / 100))
)
)
);
left: var(
--region-left,
calc(
calc(var(--region-viewport-anchor-x) * 1%) -
calc(var(--region-width) * var(--region-anchor-x) / 100)
)
);
top: var(--region-top, calc(var(--vp-anchor-y) - var(--anchor-y)));
left: var(--region-left, calc(var(--vp-anchor-x) - var(--anchor-x)));
right: var(--region-right);
bottom: var(--region-bottom);
overflow: hidden;
Expand Down

0 comments on commit 3ca3213

Please sign in to comment.