⚪ Toggle Switches in Advanced

+ Added themed toggle switches in advanced settings
This commit is contained in:
Front committed 2021-12-01 16:46:56 -05:00
1 parent 7e112452f1
commit 9cbc0e8c7f
7 files changed
+138 -216

No files matched your search

+56 -1
View File
@@ -1,8 +1,11 @@
/* Variables */
:root {
--primary: #CC2929;
--accent: #581111;
--background: #111;
--primary: #ff4444;
--secondary: #272727;
--lightGrey: #999;
--white: #fff;
}
@@ -41,4 +44,56 @@ button {
border: 2px solid var(--secondary);
border-radius: 4px;
padding: 0.5em;
}
/* Switches */
.switch {
position: relative;
display: inline-block;
width: 30px;
height: 17px;
margin-bottom: 0.5em;
}
.switch input {
display: none;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--secondary);
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: '';
height: 13px;
width: 13px;
left: 2px;
bottom: 2px;
background: var(--lightGrey);
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background: var(--accent);
}
input:checked+.slider:before {
transform: translateX(13px);
background: var(--primary);
}
.switchLabel {
width: 250px !important;
transform: translateX(35px);
display: inline-block;
}
+13 -1
View File
@@ -23,7 +23,19 @@
</center>
<div id="advancedSettings">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo laboriosam, veritatis sint dolores assumenda harum quidem molestiae ad repellendus aliquid?
<label class="switch">
<input type="checkbox" id="disable_ratio_bar" />
<span class="slider" />
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
</label><br>
<label class="switch">
<input type="checkbox" id="disable_api_unlisted" />
<span class="slider" />
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
</label><br>
</div>
+56 -1
View File
@@ -1,8 +1,11 @@
/* Variables */
:root {
--primary: #CC2929;
--accent: #581111;
--background: #111;
--primary: #ff4444;
--secondary: #272727;
--lightGrey: #999;
--white: #fff;
}
@@ -42,4 +45,56 @@ button {
border-radius: 4px;
padding: 0.5em;
margin-right: 1em; /* FIREFOX ONLY */
}
/* Switches */
.switch {
position: relative;
display: inline-block;
width: 30px;
height: 17px;
margin-bottom: 0.5em;
}
.switch input {
display: none;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--secondary);
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: '';
height: 13px;
width: 13px;
left: 2px;
bottom: 2px;
background: var(--lightGrey);
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background: var(--accent);
}
input:checked+.slider:before {
transform: translateX(13px);
background: var(--primary);
}
.switchLabel {
width: 250px !important;
transform: translateX(35px);
display: inline-block;
}
+13 -1
View File
@@ -23,7 +23,19 @@
</center>
<div id="advancedSettings">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo laboriosam, veritatis sint dolores assumenda harum quidem molestiae ad repellendus aliquid?
<label class="switch">
<input type="checkbox" id="disable_ratio_bar" />
<span class="slider" />
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
</label><br>
<label class="switch">
<input type="checkbox" id="disable_api_unlisted" />
<span class="slider" />
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
</label><br>
</div>