Files
notifications-admin/app/assets/stylesheets/components/table.scss
T

362 lines
4.8 KiB
SCSS
Raw Normal View History

2016-01-19 09:55:13 +00:00
.table {
margin-bottom: $gutter;
2016-06-08 13:41:02 +01:00
width: 100%;
2016-01-19 09:55:13 +00:00
}
2015-12-17 11:14:19 +00:00
.table-heading {
text-align: left;
2019-06-21 14:39:02 +01:00
margin: $gutter-half 0 $gutter-half 0;
2015-12-17 11:14:19 +00:00
}
2016-06-09 15:52:10 +01:00
.dashboard-table {
2016-08-09 10:39:57 +01:00
.heading-medium {
margin-bottom: 5px;
}
2016-06-09 15:52:10 +01:00
.table {
table-layout: fixed;
2016-02-19 15:02:13 +00:00
}
2016-08-09 10:39:57 +01:00
.table-field-headings {
th {
font-size: 1px;
2016-08-09 10:39:57 +01:00
}
}
.table-field-headings-visible {
2016-06-09 15:52:10 +01:00
th {
padding-bottom: 5px;
2016-06-08 13:41:02 +01:00
}
}
2016-06-09 15:52:10 +01:00
.table-field-heading-first {
2016-09-29 18:44:10 +01:00
width: 52.5%;
}
2016-06-09 15:52:10 +01:00
.table-row {
th {
display: table-cell;
width: 52.5%;
font-weight: normal;
.hint,
p {
2016-06-09 15:52:10 +01:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
2016-06-08 13:41:02 +01:00
}
2019-04-23 10:21:19 +01:00
.settings-table {
table {
table-layout: fixed;
2019-07-22 11:36:40 +01:00
margin-bottom: $gutter / 6;
2019-04-23 10:21:19 +01:00
}
th {
2019-04-29 16:15:55 +01:00
&:first-child {
2019-04-23 10:21:19 +01:00
width: 35%; // 33.33% + fudge
}
&:last-child {
width: 17.5% // 16.67% + fudge
}
}
2019-04-29 16:21:47 +01:00
td.table-field-left-aligned {
2019-04-23 10:21:19 +01:00
&:first-child {
div {
white-space: normal;
}
}
div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-23 11:26:36 +01:00
ul li {
margin-bottom: 5px;
}
2019-04-23 10:21:19 +01:00
}
2019-07-22 11:36:40 +01:00
.table-heading {
margin-bottom: 20px;
}
2019-04-23 10:21:19 +01:00
}
2015-12-17 11:14:19 +00:00
%table-field,
.table-field {
vertical-align: top;
2015-12-17 11:14:19 +00:00
&:last-child {
padding-right: 0;
}
&-error {
border-left: 5px solid $error-colour;
padding-left: 7px;
display: block;
&-label {
display: block;
color: $error-colour;
font-weight: bold;
}
}
&-invisible-error {
border-left: 5px solid transparent;
padding-left: 7px;
display: block;
}
2015-12-17 11:14:19 +00:00
&-status {
&-default {
color: $secondary-text-colour;
}
&-error {
2016-01-19 09:55:13 +00:00
2015-12-17 11:14:19 +00:00
color: $error-colour;
font-weight: bold;
2016-01-19 09:55:13 +00:00
2016-02-08 11:11:55 +00:00
a {
&:link,
&:visited {
color: $error-colour;
}
2016-01-19 09:55:13 +00:00
}
.status-hint {
display: block;
font-weight: normal;
color: $red;
margin-top: 5px;
}
2015-12-17 11:14:19 +00:00
}
2015-12-10 17:54:05 +00:00
2016-02-19 15:02:13 +00:00
&-yes,
&-no {
display: block;
text-indent: -999em;
background-size: 19px 19px;
background-repeat: no-repeat;
background-position: 50% 50%;
}
&-yes {
background-image: file-url('tick.png');
}
2015-12-10 17:54:05 +00:00
}
&-noborder {
border: 0px;
}
2016-04-05 11:16:29 +01:00
&-index {
2018-01-15 11:35:45 +00:00
2017-05-23 14:24:42 +01:00
@include bold-16;
2016-04-05 11:16:29 +01:00
width: 15px;
2018-01-15 11:35:45 +00:00
a {
&:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
&:focus {
&:before {
background: $yellow;
z-index: -1;
}
}
}
2016-04-05 11:16:29 +01:00
}
2016-04-12 15:05:27 +01:00
p {
margin: 0 0 5px 0;
}
2015-12-10 17:54:05 +00:00
}
2015-12-17 11:14:19 +00:00
2017-05-23 14:24:42 +01:00
.table-font-xsmall td.table-field-index { // overrides GOV.UK Elements
@include bold-16;
}
2017-07-12 15:50:11 +01:00
.table-field-headings {
th {
padding: 1px; /* needs some height for the grey border to show */
}
}
.table-field-headings-visible {
height: auto;
th {
padding: .75em 1.25em .5625em 0;
}
}
.table-field-headings,
.table-field-headings-visible {
th {
@include bold-19;
}
2015-12-17 11:14:19 +00:00
2016-06-09 15:52:10 +01:00
.dashboard-table &-first {
width: 52.5%;
}
2016-09-12 11:30:25 +01:00
}
.table-field-heading {
2015-12-17 11:14:19 +00:00
&:last-child {
padding-right: 0;
}
&-right-aligned {
display: block;
text-align: right;
}
}
.table-field-right-aligned {
2016-02-08 11:11:55 +00:00
@extend %table-field;
2015-12-17 11:14:19 +00:00
text-align: right;
a {
display: block;
2019-02-13 13:28:32 +00:00
position: relative;
&:before {
content: "";
display: block;
position: absolute;
top: -$gutter-half;
right: 0;
bottom: -$gutter-half + 4px;
left: -$gutter-half;
background: transparent;
}
&:hover {
color: $link-hover-colour;
}
2019-02-13 13:28:32 +00:00
&:active,
&:focus {
color: $black;
&:before {
border-color: $yellow;
border-style: solid;
border-width: 15px 3px 15px 15px;
right: -3px;
}
}
}
2015-12-17 11:14:19 +00:00
}
.table-row-group {
border-top: 1px solid $border-colour;
border-bottom: 1px solid $border-colour;
}
.table-empty-message {
@include core-16;
color: $secondary-text-colour;
border-bottom: 1px solid $border-colour;
2016-01-26 16:20:57 +00:00
padding: 0.75em 0 0.5625em 0;
}
2016-02-04 17:13:57 +00:00
.table-show-more-link {
2018-01-26 16:08:48 +00:00
@include core-16;
color: $secondary-text-colour;
2016-04-18 11:10:47 +01:00
margin-bottom: $gutter * 1.3333;
2016-02-04 17:13:57 +00:00
border-bottom: 1px solid $border-colour;
padding: 10px 0 10px 0;
2016-02-19 15:02:13 +00:00
text-align: center;
2018-01-26 16:08:48 +00:00
.table + & {
margin-top: -$gutter;
}
2016-02-04 17:13:57 +00:00
}
a.table-show-more-link {
color: $link-colour;
}
2017-02-16 15:08:16 +00:00
.table-no-data {
@include core-16;
color: $secondary-text-colour;
margin-top: 10px;
margin-bottom: $gutter * 1.3333;
border-top: 1px solid $border-colour;
border-bottom: 1px solid $border-colour;
padding: 0.75em 0 0.5625em 0;
}
2017-05-22 17:02:03 +01:00
.wide-left-hand-column {
display: block;
max-width: 560px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2018-06-07 10:55:48 +01:00
.truncate-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}