forked from GetmeUK/ContentTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_sections.scss
More file actions
116 lines (102 loc) · 3.14 KB
/
Copy path_sections.scss
File metadata and controls
116 lines (102 loc) · 3.14 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
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
/**
* Sections are used to divide up configuration blocks within a dialog's view.
* They contain wither a switch or an input, for example the table dialog has
* header (switch), body (input - e.g number of columns) and footer (switch)
* sections.
*/
.ct-widget {
.ct-section {
border-bottom: 1px solid #eee;
@include clearfix;
color: lighten($text-color, 35%);
cursor: pointer;
font-style: italic;
height: 48px;
padding: 0 16px;
@include type-text($font-size: 16px, $line-height: 48px);
&:hover {
background: #f6f6f6;
}
/**
* If the section is a switch then the `applied` modifier is set when
* the switch is on.
*/
&--applied {
color: $text-color;
font-style: normal;
.ct-section__switch {
background-color: #27ae60;
border: 1px solid darken(#27ae60, 10%);
&:before {
left: 25px;
@include transition-property(left);
@include transition-duration(0.1s);
@include transition-timing-function(ease-in);
}
}
}
/**
* If the section contains an input field the `contains-input` modifier
* is set.
*/
&--contains-input {
.ct-section__label {
width: 75%;
}
}
/**
* Each section has a label describing the purpose of the switch or
* input within the section.
*/
&__label {
float: left;
overflow: hidden;
text-overflow: ellipsis;
width: 472px;
white-space: nowrap;
}
&__switch {
background-color: #ccc;
border: 1px solid darken(#ccc, 10%);
border-radius: 12px;
box-shadow: inset 0px 0 2px rgba(black, 0.1);
float: right;
height: 24px;
margin-top: 12px;
position: relative;
width: 48px;
&:before {
background: white;
border-radius: 10px;
content: '';
height: 20px;
left: 1px;
position: absolute;
top: 1px;
@include transition-property(left);
@include transition-duration(0.1s);
@include transition-timing-function(ease-in);
width:20px;
}
}
&__input {
background: white;
border: none;
color: $text-color;
float: right;
height: 47px;
outline: none;
padding: 0 16px;
text-align: right;
@include type-text($line-height: 48px);
width: 25%;
/**
* If the contents of the sections input is invalid then the
* `invalid` modifier is set against the input (programmatically).
*/
&--invalid {
color: $cancel-action-color;
}
}
}
}