_panel.scss 5.54 KB
Newer Older
1
.panel-items.js-masonry {
Naomi Guyer's avatar
Naomi Guyer committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    margin-left: -3%; //take away left margin added again by .panel
    margin-bottom: 100px; //buffer
    .panel {
        width: 30.3%;
        float:left;
        margin-left:3%;
        margin-bottom: 35px;
        @media (max-width: $screen-sm-min) {
            width: 50 - 3%;
        }
        @media (max-width: $screen-xs-min) {
            width: 97%;
        }
        &.double {
Naomi Guyer's avatar
Naomi Guyer committed
16
17
18
19
20
21
22
            width: 30.3% * 2 + 3%; //double width panel
        }
        &.panel-half {
            width: 50 - 3%;
            @media (max-width: $screen-sm-min) {
            width: 97%;
            }
Naomi Guyer's avatar
Naomi Guyer committed
23
24
        }
    }
25
26
}

Naomi Guyer's avatar
Naomi Guyer committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.panel-items {
    form {
        margin:0;
    }
    table {
        font-size: 0.9em;
    }
    small {
        margin-top:5px;
        line-height: 1.5em;
        font-size: 0.8em;
        color: $gray;
        display: block;
    }
41

Naomi Guyer's avatar
Naomi Guyer committed
42
43
44
45
46
47
48
49
50
51
    dl {
        dt {
            font-weight:normal;
            clear: both;
            margin-right:10px;
        }
        dd, dt {
            display:inline-block;
            float:left;
        }
52

Naomi Guyer's avatar
Naomi Guyer committed
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
        dd {
            color: $gray;
            line-height: 1.5em;
        font-size: 0.9em;
        }
    }
    .nav-pills {
        margin: 0;
    }
}

.panel-half {
    width: 48%;
    float: left;
    margin-left: 4%;
    &.first {
        margin-left:0;
    }
    @media (max-width: $screen-sm-min) {
        width: 100%;
        margin-left:0;
    }
}

a.panel-footer {
Naomi Guyer's avatar
Naomi Guyer committed
78
79
80
81
82
83
84
85
    text-align:center;
    color: #555;
    display: block;
    &:hover {
        color: #222;
        background: $gray-lighter;
        .fa {
            color: $link-color;
Naomi Guyer's avatar
Naomi Guyer committed
86
        }
Naomi Guyer's avatar
Naomi Guyer committed
87
88
89
90
91
92
    }
    .fa.pull-right {
        margin-top: 3px;
    }
}

Naomi Guyer's avatar
Naomi Guyer committed
93
//Display ul's in panels differentyly
Naomi Guyer's avatar
Naomi Guyer committed
94
.panel-body {
Pat Kira's avatar
Pat Kira committed
95
96
97
    &.listing {
        padding: 0;
    }
Naomi Guyer's avatar
Naomi Guyer committed
98
99
100
101
102
    ul {
        padding-left: 20px;
        margin: 0 0 20px;
        font-size: 0.9em;
    }
Naomi Guyer's avatar
Naomi Guyer committed
103
104
105
106
    .unstyled {
        text-decoration: none;
        color: inherit;
    }
Naomi Guyer's avatar
Naomi Guyer committed
107
108
109
110
111
112
113
114
    .form-group {
        padding: 0;
    }
    .panel-footer {
        clear:both;
        margin: 15px -15px -16px; //alter padding for panel footers inside panel-body (needed for some forms)
    }

Naomi Guyer's avatar
Naomi Guyer committed
115
116
117
118
119
120
121
122
123
124
125
126
}

.collapsible legend h4,
.panel-heading {
    position: relative;
    display: block;
    &.has-link {
        padding: 0;
    }
    a {
        display: block;
        color: #333;
Naomi Guyer's avatar
Naomi Guyer committed
127
        padding: 10px 15px;
Naomi Guyer's avatar
Naomi Guyer committed
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
        
        &.collapsed, &.title-link {
            background-color: #f9f9f9;
            color: #333;
            padding: 10px 15px;
        }
        &:hover, &:focus {
            background-color: darken(#f5f5f5, 1%);
            text-decoration: none;
            .link-indicator {
                color: $link-hover-color;
            }
        }
        .pieform > .collapsible-group:first-child &,
        .first & {
            @include border-top-radius(3px);
        }
    }
Naomi Guyer's avatar
Naomi Guyer committed
146
147
148
149
150
151
    .help a { //fix css on contextual help icons
        padding: 0;
        &:hover {
            background:none;
        }
    }
Naomi Guyer's avatar
Naomi Guyer committed
152
}
Naomi Guyer's avatar
Naomi Guyer committed
153
154
155
156
157
158

/*
 * Input boxes positioned on the right over the panel header
 */
.panel-control {
    display: block;
Naomi Guyer's avatar
Naomi Guyer committed
159
160
161
162
    font-size: $font-size-base - 2;
    margin: 0;
    min-width: 0;
    padding: 12px 0 12px 15px;
Naomi Guyer's avatar
Naomi Guyer committed
163
    position: absolute;
Naomi Guyer's avatar
Naomi Guyer committed
164
165
    width: auto;
    z-index: 5;
Naomi Guyer's avatar
Naomi Guyer committed
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
    input {
        margin-top:0;
    }
    .control {
        display: inline-block;
        .control-wrapper {
            display: inline-block;
        }
    }
    .content-expanded {
        font-size: $font-size-small;
        color: $link-color;
    }
}


.panel-collapse {
    border: 0;

     // Remove border from heading - add to link tag. 
     // In this case we have a nested a tag that takes up the whole of the heading space
     // rather than applying the panel-header to the link
    .panel-heading {
        border: 0;
        a {
            @include text-shadow(1px 0 0 #fff);
        }
    }

    &.panel-primary{
        .panel-heading a {
            font-weight: bold;
        }
    }

    .panel-body,
    .panel-footer,
    .panel-heading a {
        border: 1px solid $panel-default-border;
    }
    .panel-heading a,
    .panel-body:not(.no-footer) {
        border-bottom-width:0;
    }

    &.last .panel-heading a.collapsed {
        border-bottom-width: 1px;
    }
    // Style variations
    @each $status, $bgcolor in $panel-background {
         &.panel-#{$status} {
            .panel-heading a {
                background-color: darken($bgcolor, 3%);
                &.collapsed {
                    background-color: $bgcolor;
                }
                &:hover,
                &:focus {
                   background-color: darken($bgcolor, 3%);
                }
            }
            .panel-footer,
            .panel-body,
            .panel-heading a {
                border: 1px solid darken($bgcolor, 15%);
            }
            .panel-heading a,
            .panel-body:not(.no-footer) {
                border-bottom-width:0;
            }
        }
    }
    .panel-footer a {
        color: #333;
    }
}

.panel-footer {
    &.has-form {
        @include clearfix;
        .control {
            display: inline-block;
        }
    }
Pat Kira's avatar
Pat Kira committed
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
    &.has-link {
        a {
            display: block;
        }
    }
    &.has-attachment {
        position: relative;
        z-index: 999;
    }
    .expand-add-button {
        .show-form {
            display: none;
        }
        .hide-form {
            display: inline-block;
        }
        &.collapsed {
            .show-form {
                display: inline-block;
            }
            .hide-form {
                display: none;
            }
Naomi Guyer's avatar
Naomi Guyer committed
273
274
275
        }
    }
}