Skip to content

Commit d6794a1

Browse files
committed
fix( scss ): Margin right variable
1 parent 443cc6b commit d6794a1

File tree

3 files changed

+65
-71
lines changed

3 files changed

+65
-71
lines changed

dist/maps/pretty-checkbox.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/_core.scss

Lines changed: 63 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,78 @@
11
@charset 'utf-8';
2-
32
.#{$pretty--class-name} * {
4-
box-sizing: border-box;
3+
box-sizing: border-box;
54
}
65

76
//Throw error on invalid input types.
87
.#{$pretty--class-name} input:not([type='checkbox']):not([type='radio']) {
9-
display: none;
10-
11-
@if $pretty--debug {
12-
+ *:after {
13-
content: $pretty--err-message;
14-
border: 1px solid #dedede;
15-
border-left: 3px solid #d9534f;
16-
padding: 9px;
17-
font-size: 1em;
18-
font-weight: 600;
19-
color: #d9534f;
20-
position: absolute;
21-
z-index: 3;
22-
background: #fbfbfb;
23-
top: 0;
24-
left: 0;
8+
display: none;
9+
@if $pretty--debug {
10+
+*:after {
11+
content: $pretty--err-message;
12+
border: 1px solid #dedede;
13+
border-left: 3px solid #d9534f;
14+
padding: 9px;
15+
font-size: 1em;
16+
font-weight: 600;
17+
color: #d9534f;
18+
position: absolute;
19+
z-index: 3;
20+
background: #fbfbfb;
21+
top: 0;
22+
left: 0;
23+
}
2524
}
26-
}
2725
}
2826

2927
.#{$pretty--class-name} {
30-
position: relative;
31-
display: inline-block;
32-
margin-right: 1em;
33-
white-space: nowrap;
34-
line-height: 1;
35-
36-
input {
37-
position: absolute;
38-
left: 0;
39-
top: 0;
40-
min-width: 1em;
41-
width: 100%;
42-
height: 100%;
43-
z-index: $pretty--z-index-front;
44-
opacity: 0;
45-
margin: 0;
46-
padding: 0;
47-
cursor: pointer;
48-
}
49-
50-
.state {
51-
label {
52-
position: initial;
53-
display: inline-block;
54-
font-weight: normal;
55-
margin: 0;
56-
text-indent: $pretty--label-text-offset;
57-
min-width: $pretty--box-size;
58-
59-
&:before,
60-
&:after {
61-
content: '';
62-
width: $pretty--box-size;
63-
height: $pretty--box-size;
64-
display: block;
65-
box-sizing: border-box;
66-
border-radius: 0;
67-
border: 1px solid transparent;
68-
z-index: $pretty--z-index-back;
28+
position: relative;
29+
display: inline-block;
30+
margin-right: $pretty--margin-right;
31+
white-space: nowrap;
32+
line-height: 1;
33+
input {
6934
position: absolute;
7035
left: 0;
71-
top: $pretty-top-offset;
72-
background-color: transparent;
73-
}
74-
75-
&:before {
76-
border-color: $pretty--color-default;
77-
}
36+
top: 0;
37+
min-width: 1em;
38+
width: 100%;
39+
height: 100%;
40+
z-index: $pretty--z-index-front;
41+
opacity: 0;
42+
margin: 0;
43+
padding: 0;
44+
cursor: pointer;
7845
}
79-
80-
&.p-is-hover,
81-
&.p-is-indeterminate {
82-
display: none;
46+
.state {
47+
label {
48+
position: initial;
49+
display: inline-block;
50+
font-weight: normal;
51+
margin: 0;
52+
text-indent: $pretty--label-text-offset;
53+
min-width: $pretty--box-size;
54+
&:before,
55+
&:after {
56+
content: '';
57+
width: $pretty--box-size;
58+
height: $pretty--box-size;
59+
display: block;
60+
box-sizing: border-box;
61+
border-radius: 0;
62+
border: 1px solid transparent;
63+
z-index: $pretty--z-index-back;
64+
position: absolute;
65+
left: 0;
66+
top: $pretty-top-offset;
67+
background-color: transparent;
68+
}
69+
&:before {
70+
border-color: $pretty--color-default;
71+
}
72+
}
73+
&.p-is-hover,
74+
&.p-is-indeterminate {
75+
display: none;
76+
}
8377
}
84-
}
8578
}

src/scss/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $pretty--z-index-between: 1 !default;
1515
$pretty--z-index-front: 2 !default;
1616

1717
// box
18+
$pretty--margin-right:1em !default;
1819
$pretty--curve-radius: 20% !default;
1920
$pretty--box-size: calc(1em + 2px) !default;
2021

0 commit comments

Comments
 (0)