diff --git a/ui/less/ad_controls.less b/ui/less/ad_controls.less index 73e5b65db4..92e6259916 100644 --- a/ui/less/ad_controls.less +++ b/ui/less/ad_controls.less @@ -82,7 +82,7 @@ * That divided by 2 is margin on one side, so we take that, and move the * button from its normal position to the right by that percentage. */ - right: (100 - @bottom-controls-width) / 2 * -1; + right: calc((100 - @bottom-controls-width) / 2 * -1); display: flex; flex-direction: row; margin: 0; diff --git a/ui/less/buttons.less b/ui/less/buttons.less index 6bbe896c50..fe9682df9e 100644 --- a/ui/less/buttons.less +++ b/ui/less/buttons.less @@ -26,7 +26,7 @@ * * Based on tips from https://stackoverflow.com/a/12925343 */ box-sizing: border-box; - padding: @play-button-size-percentage / 2; + padding: calc(@play-button-size-percentage / 2); width: 0; height: 0; diff --git a/ui/less/containers.less b/ui/less/containers.less index 7783dbc860..b4176195bf 100644 --- a/ui/less/containers.less +++ b/ui/less/containers.less @@ -263,8 +263,8 @@ .shaka-spinner { /* This uses the same trickery as the big play button define - the spinner's width and height. See .shaka-play-button - for the detailed explanation. */ + * the spinner's width and height. See .shaka-play-button + * for the detailed explanation. */ /* For the padding thing to work, spinner div needs to be an overlay-parent and spinner svg - an overlay child. */ @@ -272,11 +272,11 @@ margin: 0; box-sizing: border-box; - padding: @spinner-size-percentage / 2; + padding: calc(@spinner-size-percentage / 2); width: 0; height: 0; /* Add a bit of a white shadow to keep our black spinner visible - on a black background. */ + * on a black background. */ filter: drop-shadow(0 0 2px rgba(255 255 255 / 50%)); } diff --git a/ui/less/range_elements.less b/ui/less/range_elements.less index 903f4caf7b..15efeae529 100644 --- a/ui/less/range_elements.less +++ b/ui/less/range_elements.less @@ -39,7 +39,7 @@ .overlay-parent(); /* Vertical margins to occupy the same space as the thumb. */ - margin: (@thumb-size - @track-height)/2 6px; + margin: calc((@thumb-size - @track-height) / 2) 6px; /* Smaller height to contain the background for the virtual track. */ height: @track-height; @@ -109,7 +109,7 @@ /* Position the top of the range element so that it is centered on the * container. Note that the container is actually smaller than the thumb. */ - top: (@track-height - @thumb-size) / 2; + top: calc((@track-height - @thumb-size) / 2); /* Make sure clicking at the very top of the bar still takes effect and is not * confused with clicking the video to play/pause it. */