Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Commit e17430e

Browse files
committed
Add a wrapper <div> and Fix css classes
1 parent e55f98d commit e17430e

2 files changed

Lines changed: 37 additions & 17 deletions

File tree

src/EnhancedXcodeTags.user.js

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/xcode-switch.css

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
1-
.input-container {
1+
div.xcode_container {
22
position: relative;
3-
float: right;
43
}
54

6-
.setting {
5+
div.xcode_container > .input-container {
6+
position: absolute;
7+
top: 1.3em;
8+
right: .6em;
9+
transition: opacity 0.3s ease-in-out;
10+
opacity: 0;
11+
}
12+
13+
div.xcode_container:hover > .input-container {
14+
opacity: 1;
15+
}
16+
17+
div.xcode_container:focus-within > .input-container {
18+
opacity: 1;
19+
}
20+
21+
div.xcode_container > .input-container > .xcode_switch {
722
cursor: pointer;
823
display: block;
924
position: relative;
1025
height: 14px;
1126
}
12-
.setting::selection {
27+
div.xcode_container > .input-container > .xcode_switch::selection {
1328
background: transparent;
1429
}
1530

16-
.input-container input[type=checkbox] + label:before {
31+
div.xcode_container > .input-container input[type=checkbox] + label:before {
1732
box-shadow: none;
1833
}
1934

20-
.input-container input[type=checkbox]:checked + label:before {
21-
background: #7192a8; /*#27a6e5;*/
35+
div.xcode_container > .input-container input[type=checkbox]:checked + label:before {
36+
background: #7192a8;
2237
}
2338

24-
.input-container input[type=checkbox] + label:before {
25-
background: #e9e9e9; /*#808080;*/
39+
div.xcode_container > .input-container input[type=checkbox] + label:before {
40+
background: #e9e9e9;
2641
border-radius: 100px;
2742
box-shadow: 0 0 2px 0 #333 inset;
2843
box-sizing: border-box;
@@ -39,11 +54,11 @@
3954
transform: translateY(-50%);
4055
}
4156

42-
.input-container input[type=checkbox]:not(:checked) + label:after {
57+
div.xcode_container > .input-container input[type=checkbox]:not(:checked) + label:after {
4358
left: 8px;
4459
}
4560

46-
.input-container input[type=checkbox] + label:after {
61+
div.xcode_container > .input-container input[type=checkbox] + label:after {
4762
background: #fff;
4863
border-radius: 90px;
4964
box-shadow: 0 0 3px 0 #333;
@@ -62,11 +77,11 @@
6277
margin-right: 6px;
6378
}
6479

65-
.input-container input[type=checkbox] + label {
80+
div.xcode_container > .input-container input[type=checkbox] + label {
6681
padding-left: 46px;
6782
}
6883

69-
.input-container input[type=checkbox] {
84+
div.xcode_container > .input-container input[type=checkbox] {
7085
display: none;
7186
height: 0;
7287
visibility: hidden;

0 commit comments

Comments
 (0)