spin-wheel
Version:
An easy to use, themeable component for randomising choices and prizes.
73 lines (60 loc) • 1.42 kB
CSS
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pragati+Narrow&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap');
* {
margin: 0;
padding: 0;
font-family: 'Lucida Grande', sans-serif;
font-size: 15px;
-webkit-tap-highlight-color: transparent;
user-select: none; /* Prevent selecting ui text when dragging */
}
html, body {
height: 100%;
}
body {
/* Prevent pull-down-to-refresh gesture */
overscroll-behavior-y: contain;
/* Prevent iOS rubber-band effect */
position: fixed;
width: 100%;
/* Prevent browser from handling touch events */
touch-action: none;
display: flex;
flex-direction: column;
justify-items: stretch;
align-items: stretch;
}
.wheel-wrapper {
/* Hide UI during page load */
visibility: hidden;
overflow: hidden;
height: 100%;
width: 100%;
}
.gui-wrapper {
padding: 10px;
background-color: #f3f3f3;
display: flex;
flex-direction: column;
gap: 10px;
}
.gui-wrapper > div {
display: flex;
flex-direction:row;
gap: 10px;
align-items: center;
}
select {
padding: 2px;
}
label {
margin-right: 5px;
}
button {
padding: 10px 20px;
cursor: pointer;
margin-right: 10px;
max-width: 100px;
}