Skip to content

Refactor styles #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: refactor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 85 additions & 29 deletions style.less
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
width: 6em;
}

td.dir{
display: flex;
border: none;
padding-top: .5em;
}

th.local,
td.local,
th.remote,
Expand All @@ -62,50 +68,100 @@
td.diff {
width: 4em;
}
}
}

// general setup for custom radio buttons
label input {
visibility: hidden;
width: 2em;
height: 2em;
// custom radio icons

&::before {
cursor: pointer;
visibility: visible;
display: block;
width: 2em;
height: 2em;
.sync-dir {

color: @ini_text;
fill: red;
position: relative;
cursor: pointer;
margin: 5px;
width: 15px;
height: 15px;

&__input {
position: absolute;
top: 0;
right: 0;
opacity: 0;
cursor: pointer;
z-index: 1;

&-push {
&:checked ~ .sync-dir__svg-push {
&::after {
display: block;
content: url(pix/arrow-right-bold-circle.svg);
}
}
}

// custom radio icons
label.push input {
&::before {
content: url(pix/arrow-right-bold-circle-outline.svg);
&-skip {
&:checked ~ .sync-dir__svg-skip {
&::after {
display: block;
content: url(pix/pause-circle.svg);
}
}
&:checked::before {
content: url(pix/arrow-right-bold-circle.svg);
}

&-pull {
&:checked ~ .sync-dir__svg-pull {
&::after {
display: block;
content: url(pix/arrow-left-bold-circle.svg);
}
}
}
}

label.skip input {
&::before {
content: url(pix/pause-circle-outline.svg);
&__svg {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
cursor: pointer;

&-push {
&::after {
display: block;
content: url(pix/arrow-right-bold-circle-outline.svg);
position: absolute;
top: 50%;
transform: translate(-20%,-105%);
height: 70%;
color: @ini_text;
fill: red;
}
&:checked::before {
content: url(pix/pause-circle.svg);
}

&-skip {
&::after {
display: block;
content: url(pix/pause-circle-outline.svg);
position: absolute;
top: 50%;
transform: translate(-20%,-105%);
height: 70%;
color: @ini_text;
fill: red;
}
}

label.pull input {
&::before {
&-pull {
&::after {
display: block;
content: url(pix/arrow-left-bold-circle-outline.svg);
}
&:checked::before {
content: url(pix/arrow-left-bold-circle.svg);
position: absolute;
top: 50%;
transform: translate(-20%,-105%);
height: 70%;
color: @ini_text;
fill: red;

}
}
}
Expand Down
6 changes: 3 additions & 3 deletions sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ jQuery(function () {
row++;

var $html = jQuery(
'<label class="push"><input /></label>' +
'<label class="skip"><input /></label>' +
'<label class="pull"><input /></label>'
'<label class="sync-dir push"><input class="sync-dir__input sync-dir__input-push" /><span class="sync-dir__svg sync-dir__svg-push "></span></label>' +
'<label class="sync-dir skip"><input class="sync-dir__input sync-dir__input-skip" /><span class="sync-dir__svg sync-dir__svg-skip"></span></label>' +
'<label class="sync-dir pull"><input class="sync-dir__input sync-dir__input-pull" /><span class="sync-dir__svg sync-dir__svg-pull"></span></label>'
);
var $radios = $html.find('input');
$radios.attr({
Expand Down