-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_forms.scss
96 lines (72 loc) · 2.54 KB
/
_forms.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
/* FORM STYLES */
// Trigger form styles only in the content
// This makes forms outside of the content, such as search forms, easier to style
.content form, form.content {
margin-bottom: 1.5rem;
}
// Turn every immediate child element of the form into its own block-level element
form.content > div, .content form > div, form.content > fieldset, .content form > fieldset {
border-top: 1px solid var(--tertiary-color);
display: block;
padding: 1rem;
}
// Basic styles for the most common form elements
input[type=text], input[type=email], input[type=number], input[type=password], input[type=file], textarea, select {
box-sizing: border-box;
display: block;
font-family: var(--monospace-font);
}
.content, .content form {
input[type=text], input[type=email], input[type=number], input[type=password], input[type=file], textarea, select {
background: rgb(240, 240, 240);
border-radius: .3rem;
border: 1px solid var(--secondary-color);
box-shadow: inset 0px 0px .15em 0px rgba(0,0,0,0.3);
font-size: .8rem;
margin-top: .5rem;
padding: .3rem;
width: 100%;
&:focus {
border-color: var(--primary-color);
outline: var(--primary-color);
}
}
> label {
font-weight: bold;
}
textarea {
height: 5rem;
}
}
@media (prefers-color-scheme: dark) {
.content, .content form {
input[type=text], input[type=email], input[type=number], input[type=password], input[type=file], textarea, select {
background: var(--background-color-2);
color: var(--text-color-2);
}
}
}
// Styles for fieldsets, checkboxes, and radio boxes
.content fieldset, .content form fieldset {
border-top: 1px solid var(--tertiary-color);
legend {
font-weight: bold;
padding: 0rem .5rem 0rem .5rem;
}
}
input[type=checkbox], input[type=radio] {
margin-right: .3rem;
& + label {
font-family: var(--monospace-font);
}
}
// Styles for submit and button elements
input[type=submit], button {
background-color: var(--secondary-color);
border: 1px solid var(--secondary-color);
color: var(--text-color-2);
border-radius: .3rem;
font-size: 1em;
padding: .5em;
font-family: var(--monospace-font);
}