Skip to content

Commit

Permalink
Programmatically-generated colours
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Feb 28, 2016
1 parent 966a84b commit 8da50dc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
9 changes: 5 additions & 4 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import 'nav';
@import 'slider';
@import 'buttons';
@import 'table-rows';

html {
position: relative;
Expand All @@ -21,14 +22,14 @@ h1, h2 {
}

.bg-high {
color: $bg-high;
background-color: lighten($bg-high, 50%);
color: lighten($glucose-measurement, 30%);
background-color: saturate($glucose-measurement, 50%);
font-weight: bold;
}

.bg-low {
color: $bg-low;
background-color: lighten($bg-low, 50%);
color: saturate($glucose-measurement, 50%);
background-color: lighten($glucose-measurement, 30%);
font-weight: bold;
}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

.btn-glycated-haemoglobin {
background-color: $glycated-haemoglibin;
background-color: $glycated-haemoglobin;
}

.btn-blood-pressure {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/colours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $glucose-measurement: $orange;
$medication-event: $blue;
$carbohydrate-intake: $yellow;
$physical-exercise: $green;
$glycated-haemoglibin: $pale-blue;
$glycated-haemoglobin: $pale-blue;
$blood-pressure: $dirty-yellow;

$bg-high: $purple;
Expand Down
23 changes: 23 additions & 0 deletions app/assets/stylesheets/table-rows.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tr.glucose-measurement {
background-color: lighten($glucose-measurement, 45%);
}

tr.carbohydrate-intake {
background-color: lighten($carbohydrate-intake, 45%);
}

tr.medication-event {
background-color: lighten($medication-event, 45%);
}

tr.physical-exercise {
background-color: lighten($physical-exercise, 45%);
}

tr.glycated-haemoglobin {
background-color: lighten($glycated-haemoglobin, 45%);
}

tr.blood-pressure {
background-color: lighten($blood-pressure, 45%);
}

0 comments on commit 8da50dc

Please sign in to comment.