Default playr.io CSS generated with variables, allowing users to modify player appearance and functionality using CSS variables.
This is based on compiled SCSS code from https://github.com/sampotts/plyr.
The latest release in this repo adopts the version number of the code available in the playr.io repository.
10/02/2021 - 3.6.4
The compiled CSS is available using the following CDN sources. These will always be the latest version published in this repo. See revisions above.
https://cdn.jsdelivr.net/gh/EddieGreen/plyr.io-Variables@master/plyr.min.css
https://cdn.jsdelivr.net/gh/EddieGreen/plyr.io-Variables@master/plyr.css
The project can be opened and modified as a web site project - See solution file. Requires Web Essentials 2019 extension in VS2019 in order to compile scss/sass code - see https://github.com/madskristensen/WebEssentials2019
Set for all players - CSS selector targets :root
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/EddieGreen/plyr.io-Variables@master/plyr.min.css" />
<style>
:root {
--plyr-color-main: #d62a14;
--plyr-font-size-captions-large: 21px;
--plyr-control-radius: 50%; }
</style>
Set for a specific class of player
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/EddieGreen/plyr.io-Variables@master/plyr.min.css" />
<style>
.sample_player {
--plyr-color-main: #d62a14;
--plyr-font-size-captions-large: 21px;
--plyr-control-radius: 50%; }
</style>
Set to individual player
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/EddieGreen/plyr.io-Variables@master/plyr.min.css" />
<video class="player" style="--plyr-color-main: #d62a14; --plyr-font-size-captions-large: 21px; --plyr-control-radius: 50%;">
...
</video>
If you want to change any design tokens used for the rendering of the player, you can do so using CSS Custom Properties.
Here's a list of the properties and what they are used for: