-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdcf.scss
135 lines (124 loc) · 2.09 KB
/
dcf.scss
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@charset "utf-8";
/**
* @file
* Drupal Custom Form
*
* This is part of the dcf library to have custom...
* - checkboxes
* - radios
* - selects
* - filefields
*
* @author: Peter Briers
* @version: 0.0.2
*/
/**
* RESET
*/
input,
button,
textarea,
select {
padding: 0;
outline: 0;
outline-offset: 0px;
border: none;
&:focus {
outline: #dcf solid 1px;
}
}
// Custom form replacement container
.dcf-container {
position: relative;
display: inline-block;
}
// Redo Focus
.dcf-input:focus + .dcf-replacement,
.dcf-input:active + .dcf-replacement {
outline: #dcf solid 1px;
}
// Custom select
.dcf-select,
.dcf-file {
.dcf-replacement {
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
background-color: white;
z-index: 10;
cursor: pointer;
}
.dcf-feedback {
display: block;
padding: 0.25ex 1ex;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dcf-button {
float: right;
text-align: center;
padding: 0.25ex 1ex;
position: relative;
}
.dcf-input {
position: relative;
z-index: 20;
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; // IE8
cursor: pointer;
&:focus {
outline: none;
border: none !important;
}
}
}
.dcf-select {
.dcf-button:before {
content: '▼';
}
}
.form-type-radio,
.form-type-checkbox {
position: relative;
input {
left: -2000px;
position: absolute;
&:focus + label:before {
outline: #dcf solid 1px;
}
}
label {
padding: 0 0 0 25px;
min-height: 20px;
&:before {
text-align: center;
content: '';
position: absolute;
left: 0;
top: 0;
display: block;
background-color: white;
width: 20px;
height: 20px;
line-height: 20px;
}
}
}
.form-type-radio label {
&:before {
border-radius: 20px;
}
&.checked:before {
content: '●';
}
}
.form-type-checkbox label {
&:before {
border-radius: 3px;
}
&.checked:before {
content: '✔';
font-size: 22px;
text-indent: 5px;
}
}