-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy path_m-radio-custom.scss
More file actions
55 lines (49 loc) · 1.17 KB
/
_m-radio-custom.scss
File metadata and controls
55 lines (49 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@use "../01-abstract/variables" as *;
@use "m-checkbox-custom";
@use "sass:math";
/**
* Radio custom - must be used with checkbox custom
*
* @author Nicolas Langle
*
* @param $include-checkbox-style
* @param $color
* @param $size
* @param $border-width
*
* Examples :
*
* input[type="radio"] {
* @include checkbox-custom;
*
* &:checked {
* @include checkbox-custom-checked;
* }
* }
*
* input[type="radio"] {
* @include radio-custom(true);
* }
*
*/
@mixin radio-custom($include-checkbox-style: false, $color: $color-primary, $size: 18px, $border-width: 1px) {
@if ($include-checkbox-style) {
@include m-checkbox-custom.checkbox-custom($color, $size, $border-width);
}
+ label {
&::before {
border-radius: 50%;
}
&::after {
top: #{1px + math.div($size, 2)};
width: math.div($size, 2);
height: math.div($size, 2);
background: $color;
border: none;
border-radius: 50%;
}
}
}
@mixin radio-custom-checked() {
@include m-checkbox-custom.checkbox-custom-checked;
}