Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/player-max-width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@interactive-learning/player': patch
---

On a wide page the player no longer stretches across it: it grows to 1100 px at most and stays centered. `--il-max-width` changes that width, and `none` lets it fill its container. Full screen still uses the whole screen.
1 change: 1 addition & 0 deletions packages/player/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ interactive-learning {
| `--il-focus` | Keyboard focus ring | Accent or white |
| `--il-radius` | Corner radius | `0px`, square corners |
| `--il-screen-padding` | Room around the video | `12px`, `0` full width |
| `--il-max-width` | Widest the player grows, centered | `1100px`, `none` |

The default look is plain, with square corners, a neutral accent and the page font. The video keeps 12 px of room on each side, 8 px at most in a narrow player and none in full screen; `--il-screen-padding: 0` runs it to the edges.

Expand Down
4 changes: 4 additions & 0 deletions packages/player/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
--_bar-veil-middle: light-dark(rgb(255 255 255 / 78%), rgb(10 14 22 / 60%));
--_bar-veil-end: light-dark(rgb(255 255 255 / 94%), rgb(10 14 22 / 80%));
width: 100%;
/* On a wide page the player keeps a reading width, centered; full screen lifts it. */
max-width: var(--il-max-width, 1100px);
margin-inline: auto;
isolation: isolate;
container: il-player / inline-size;
border-radius: var(--_radius);
Expand Down Expand Up @@ -951,6 +954,7 @@
display: flex;
flex-direction: column;
width: 100%;
max-width: none;
height: 100dvh;
max-height: 100dvh;
margin: 0;
Expand Down