mirror of
https://github.com/ApfelTeeSaft/LiveSplitOne.git
synced 2026-08-26 19:23:40 +00:00
This replaces the context menu with our own. By doing that we no longer need to force install our npm packages, as there are no longer any conflicts. In fact, as part of this change, I updated us to the latest React 19 and even enabled the React compiler. I also explored CSS modules for the first time, which are going to allow us to reduce conflicts between CSS rules and possibly even allow us to fully remove SASS, as the need for it is going to be reduced. I also found out that the latest Rust nightly is broken due to their update to LLVM 20. So I pinned the version to the last working nightly version.
57 lines
1012 B
SCSS
57 lines
1012 B
SCSS
.label {
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.switch {
|
|
position: relative;
|
|
width: 35px;
|
|
height: 20px;
|
|
display: inline-block;
|
|
|
|
span {
|
|
position: absolute;
|
|
background-color: #ffffff20;
|
|
border-radius: 20px;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
transition: background-color .25s;
|
|
}
|
|
|
|
span::before {
|
|
background-color: white;
|
|
border-radius: 50%;
|
|
content: "";
|
|
position: absolute;
|
|
transition: all .25s;
|
|
left: 3px;
|
|
bottom: 3px;
|
|
height: 14px;
|
|
width: 14px;
|
|
}
|
|
|
|
&:hover input+span {
|
|
background-color: #ffffff40;
|
|
}
|
|
|
|
&:hover input:checked+span {
|
|
background-color: #ffffff80;
|
|
}
|
|
|
|
input:checked+span {
|
|
background-color: #ffffff60;
|
|
}
|
|
|
|
input:checked+span::before {
|
|
transform: translateX(15px);
|
|
}
|
|
|
|
input {
|
|
display: none;
|
|
}
|
|
}
|