Files
notifications-admin/app/assets/stylesheets/_grids.scss
Chris Hill-Scott c9b2211bd3 Let users download a CSV of inbound messages
In user research, we’ve seen users copy/pasting the contents of the
inbound SMS page into a spreadsheet, in order to keep a record of the
messages they receive. They even went as far as to write a macro which
fixed the errors caused by copying and pasting.

It would be much easier if we just gave them the data already in a
spreadsheet format. Which is what this commit does.

One caveat is that, because spreadsheets can contain executable code (ie
formulas), and because we’re populating the spreadsheet with
user-submitted data (albeit via SMS) we need to be careful about
injection attacks.

The details of how these attacks work are detailed here (interesting
reading): http://georgemauer.net/2017/10/07/csv-injection.html

The mitigation is to not allow characters which initialise a formula
at the start of the cell.
2017-10-18 10:27:37 +01:00

113 lines
1.6 KiB
SCSS

.column-whole {
@include grid-column(1/1);
}
.column-three-quarters {
@include grid-column(3/4);
}
.column-one-sixth {
@include grid-column(1/6);
}
.column-five-sixths {
@include grid-column(5/6);
}
.column-one-eighth {
@include grid-column(1/8);
}
.column-five-eighths {
@include grid-column(5/8);
}
.column-seven-eighths {
@include grid-column(7/8);
}
%top-gutter,
.top-gutter {
@extend %contain-floats;
display: block;
margin-top: $gutter;
clear: both;
}
.top-gutter-4-3 {
@extend %top-gutter;
margin-top: $gutter * 4 / 3;
}
.top-gutter-2-3 {
@extend %top-gutter;
margin-top: $gutter-half;
}
%bottom-gutter,
.bottom-gutter {
@extend %contain-floats;
margin-bottom: $gutter;
clear: both;
}
.bottom-gutter-2-3 {
@extend %bottom-gutter;
margin-bottom: $gutter-two-thirds;
}
.bottom-gutter-1-2 {
@extend %bottom-gutter;
margin-bottom: $gutter-half;
}
.bottom-gutter-1-3 {
@extend %bottom-gutter;
margin-bottom: $gutter/3;
}
.bottom-gutter-3-2 {
@extend %bottom-gutter;
margin-bottom: $gutter * 3/2;
}
.bottom-gutter-2 {
@extend %bottom-gutter;
margin-bottom: $gutter * 2;
}
.align-with-heading {
display: block;
text-align: center;
margin-top: 13px;
padding-left: 2px;
padding-right: 2px;
}
.align-with-heading-copy {
display: block;
margin-top: 25px;
}
.align-with-heading-copy-right {
display: block;
margin-top: 35px;
text-align: right;
}
.global-cookie-message {
p {
@extend %site-width-container;
}
}
.footer-nav {
@include copy-16;
margin-bottom: $gutter-two-thirds;
a {
display: inline-block;
margin-right: $gutter-half;
}
}