Skip to content

Commit b1fa2d7

Browse files
Merge pull request #295 from DemocracyLab/peter/reactstrap4
Peter/reactstrap4
2 parents c4c21ae + a248f54 commit b1fa2d7

File tree

150 files changed

+2707
-1692
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+2707
-1692
lines changed

civictechprojects/static/css/_bootstrapoverride.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//create an XXL viewport (grid breakpoint and container)
2+
13
$grid-breakpoints: (
24
// Extra small screen / phone
35
xs: 0,
@@ -21,4 +23,17 @@ $container-max-widths: (
2123
xxl: 1400px
2224
);
2325

26+
//define our font stack
2427
$font-family-sans-serif: 'Montserrat',-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
28+
29+
//add DL colors to themes for button variants, etc
30+
$theme-colors: (
31+
"primary": #f79e02, // use this for "action"
32+
"success": #528305, // check for hover #395e00
33+
"danger": #e4100e, // check for hover #b20000
34+
"info": #107fb0 // check for hover #025d87
35+
);
36+
37+
38+
//disables dropdown caret by default
39+
$enable-caret: false;

civictechprojects/static/css/_vars.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33

44
//colors
55
$color-orange: #f79e02; // brand
6-
$color-orange-darker: #de8e01; // for button hover, border, whatever
6+
$color-orange-dark: #de8e01; // accent/button borders
7+
$color-orange-light: #f7cf88; // footer button hover
78
$color-green: #86c232; //confirm-role buttons
89
$color-green-dark: #61892f; //tag selectors and selected tags
910
$color-text-light: #ffffff;
1011
$color-text-dark: #222629;
1112
$color-text-grey: #535A5F; //lightest we can go without brekaing accessibility
1213
$color-grey-medium: #dddddd;
1314
$color-grey-disabled: #cecece; // any item in a disabled state
15+
$color-disabled-border: #a8a8a8; // for e.g. a disabled state button border
1416
$color-grey-frame-border: #6b6e70; // from design guide
1517

1618
//background colors

civictechprojects/static/css/partials/_AboutProject.scss

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,19 @@
88
background: $color-background-light;
99
border-radius: 12px;
1010
border: $color-grey-disabled solid 1px;
11+
}
1112

12-
/* this whole section is potentially placeholder */
13-
a {
14-
color: $color-orange;
15-
text-decoration: none;
16-
-webkit-appearance: none;
17-
}
18-
a:hover {
19-
color: $color-orange-darker;
20-
text-decoration: underline;
21-
}
22-
a[type="button"] {
23-
color: $color-text-light;
24-
}
25-
a[type="button"]:hover {
26-
color: $color-text-light;
27-
}
13+
/* to avoid conflict with a href styled as buttons, only put this rule in sections where required */
14+
.AboutProjects-details, .AboutProjects-team, .AboutProjects-files, .Position-description-link {
15+
a {
16+
color: $color-orange;
17+
text-decoration: none;
18+
}
19+
a:hover {
20+
color: $color-orange-dark;
21+
text-decoration: underline;
2822
}
23+
}
2924

3025
.AboutProjects-infoColumn {
3126
order: 1;
@@ -220,7 +215,10 @@
220215
width: 100%;
221216
}
222217
}
223-
218+
.AboutProjects-jumplink {
219+
/* anchor tag is moved "higher up" than its content to account for Bootstrap fixed nav bar */
220+
top: -$header-height;
221+
}
224222
.AboutProjects-positions-available {
225223
padding: 25px 10px; /*as with description-details consider maxwidth */
226224

@@ -267,23 +265,12 @@
267265
}
268266

269267
.AboutProject-button {
270-
background-color: $color-green;
271-
border: 0;
272-
border-radius: 5px;
273-
color: $color-text-light;
274-
cursor: pointer;
268+
/* note these are in addition to the DL theme button rules */
275269
float: right;
276270
font-size: 14px;
277-
padding: 8px 8px 8px 8px;
278-
margin-right: 8px;
279271
margin-top: 16px;
280272
}
281273

282-
button.AboutProject-button:disabled {
283-
background-color: $color-grey-disabled;
284-
color: $color-text-light;
285-
}
286-
287274
@media (max-width: 1000px) {
288275
// buttons will align below "-description"
289276
.AboutProjects-introTop {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.about-user-section {
2+
margin-bottom: 1.5rem;
3+
}
4+
.about-user-section:last-of-type {
5+
margin-bottom: 2rem;
6+
}
7+
.about-user-section a {
8+
color: $color-orange;
9+
text-decoration: none;
10+
&:hover {
11+
text-decoration: underline;
12+
}
13+
}
14+
.about-user-name {
15+
font-size: 24px;
16+
padding-top: 0.25rem;
17+
}

civictechprojects/static/css/partials/_AlertHeader.scss

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
flex-direction: row;
44
justify-content: flex-end;
55
background-color: $color-orange;
6-
color: $color-text-light;
6+
color: $color-text-dark;
77
width: 100%;
88
line-height: 1.2em;
99
min-height: 34px;
@@ -13,20 +13,23 @@
1313
.AlertHeader-text {
1414
padding-left: 10px;
1515
width: auto;
16-
margin: 0 auto 0px auto;
16+
margin: 0.25rem auto;
1717
}
1818

1919
.AlertHeader-text a {
2020
text-decoration: underline;
21-
color: $color-text-light;
21+
color: $color-text-dark;
2222
}
2323

2424
.AlertHeader-text p,i {
2525
text-align: center;
2626
}
27+
.AlertHeader-text p {
28+
margin: 0;
29+
}
2730

2831
.AlertHeader-close {
29-
width: 30px;
30-
padding-right: 10px;
32+
min-width: 30px;
33+
padding: 0 10px;
3134
cursor: pointer;
3235
}

civictechprojects/static/css/partials/_CreateProjectForm.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,12 @@
2323
margin-right: 1rem;
2424
font-weight: bold;
2525
color: $color-orange;
26-
}
26+
}
27+
.create-form-buttonrow {
28+
display: flex;
29+
justify-content: space-between;
30+
}
31+
32+
.create-form-project-example {
33+
padding-left: 0.5rem;
34+
}

civictechprojects/static/css/partials/_DonateController.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,21 @@
2323
}
2424

2525
.radio-button {
26-
border: 1px solid;
27-
background-color: transparent;
28-
border-radius: 5px;
29-
padding: 6px 12px;
3026
margin: 0px 0px 10px 15px;
31-
cursor: pointer;
3227
min-width: 70px;
3328
&:hover {
3429
color: $color-orange;
3530
border-color: $color-orange;
31+
background: none;
32+
}
33+
&:focus {
34+
box-shadow: 0 0 0 .2rem rgba($color-orange-dark, 0.5)
3635
}
3736
}
3837

3938
.checked .radio-button {
40-
color: $color-orange-darker;
41-
border-color: $color-orange-darker;
39+
color: $color-orange-dark;
40+
border-color: $color-orange-dark;
4241
}
4342

4443
@media (min-width: 900px) {
@@ -78,4 +77,4 @@
7877
width: 150px;
7978
height: 40px;
8079
}
81-
}
80+
}

civictechprojects/static/css/partials/_EditProjectForm.scss

Lines changed: 0 additions & 4 deletions
This file was deleted.

civictechprojects/static/css/partials/_EmailVerifiedController.scss

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,11 @@
2525
display: inline-block;
2626
}
2727

28-
.EmailVerified-find-projects-btn {
29-
border: 1px solid $color-orange;
30-
color: $color-text-light;
31-
background-color: $color-orange;
32-
border-radius: 5px;
33-
padding: 6px 12px;
34-
margin-bottom: 10px;
35-
transition: 300ms;
36-
cursor: pointer;
37-
min-width: 80px;
38-
}
39-
4028
@include media-breakpoint-up(md) {
4129
// This is where width of the screen > 768 px
4230
.EmailVerifiedController-logo {
4331
width: 70px;
4432
padding-left: 10px;
4533
padding-bottom: 0px;
4634
}
47-
}
35+
}

civictechprojects/static/css/partials/_Global.scss

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,46 @@ body {
22
background-color: $color-background-default;
33
}
44

5-
// uses democracyLab orange for a "themed button", use class="btn btn-theme"
6-
.btn-theme {
7-
background-color: $color-orange;
8-
color: $color-text-light;
5+
// footer buttons are difficult to theme in Bootstrap, so define manually
6+
//TODO: Sass variables
7+
.btn-footer {
8+
background-color: $color-background-light;
9+
color: $color-text-dark;
910
}
10-
.btn-theme a, .btn-theme a[type="button"] {
11-
color: $color-text-light;
11+
.btn-footer a, .btn-footer a[type="button"] {
12+
color: $color-text-dark;
1213
text-decoration: none;
1314
}
14-
.btn-theme:hover {
15-
background-color: $color-orange-darker;
16-
color: $color-text-light;
15+
.btn-footer:hover, .btn-footer:active {
16+
background-color: $color-orange-light;
17+
color: $color-text-dark;
18+
border-color: $color-orange-dark;
1719
}
18-
a.btn-theme:hover, a[type="button"].btn-theme:hover {
20+
a.btn-footer:hover, a.btn-footer:active, a[type="button"].btn-footer:hover, a[type="button"].btn-footer:active {
1921
text-decoration: none;
2022
}
2123

22-
//use to clear specific button appearance settings, e.g. fix webkit-appearance problem on react-bootstrap <Button href=""> components
23-
button.clear-button-appearance, a.clear-button-appearance, a[type="button"].clear-button-appearance {
24-
-webkit-appearance: none;
25-
-moz-appearance: none;
24+
//Sets button states to be our specific values instead of default computed by Bootstrap
25+
//I don't think we're going to call these colors manually at any point so no vars here
26+
.btn-success:active, .btn-success:hover {
27+
background-color: #395e00;
28+
}
29+
.btn-danger:active, .btn-danger:hover {
30+
background-color: #b20000;
31+
}
32+
.btn-info:active, .btn-info:hover {
33+
background-color: #025d87;
2634
}
2735

28-
//fixing a conflict between Bootstrap 4 CSS and our version of React-Bootstrap (targeting BS3)
29-
//remove this declaration when react-bootstrap is upgraded
30-
.modal-backdrop.fade.in {
31-
opacity: 0.5;
36+
37+
//Global override of disabled state input elements
38+
input[type="submit"]:disabled {
39+
background: $color-grey-disabled;
40+
border: $color-disabled-border;
3241
}
3342

43+
44+
3445
//for on-page actions we want to appear as links
3546
.pseudo-link {
3647
color: $color-orange;

0 commit comments

Comments
 (0)