2020-11-13 12:39:40 +01:00
|
|
|
|
2020-06-10 19:29:10 +02:00
|
|
|
@mixin type-colors($types) {
|
2020-11-13 12:39:40 +01:00
|
|
|
$numbers: ('int','tinyint','smallint','mediumint','float','double','decimal');
|
|
|
|
|
2020-07-31 18:16:28 +02:00
|
|
|
@each $type, $color in $types {
|
|
|
|
.type-#{$type} {
|
|
|
|
color: $color;
|
2020-06-10 19:29:10 +02:00
|
|
|
|
2020-11-13 12:39:40 +01:00
|
|
|
@if index($numbers, $type) {
|
2020-07-31 18:16:28 +02:00
|
|
|
text-align: right;
|
2020-06-10 19:29:10 +02:00
|
|
|
}
|
2020-07-31 18:16:28 +02:00
|
|
|
}
|
|
|
|
}
|
2020-06-10 19:29:10 +02:00
|
|
|
}
|
|
|
|
|
2020-07-24 13:26:56 +02:00
|
|
|
@include type-colors(
|
2020-07-31 18:16:28 +02:00
|
|
|
(
|
2020-10-23 13:58:47 +02:00
|
|
|
"char": $string-color,
|
|
|
|
"varchar": $string-color,
|
|
|
|
"text": $string-color,
|
2020-11-13 12:39:40 +01:00
|
|
|
"tinytext": $string-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"mediumtext": $string-color,
|
|
|
|
"longtext": $string-color,
|
2020-11-13 12:39:40 +01:00
|
|
|
"json": $string-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"name": $string-color,
|
|
|
|
"character": $string-color,
|
|
|
|
"character_varying": $string-color,
|
|
|
|
"cidr": $string-color,
|
|
|
|
"inet": $string-color,
|
|
|
|
"macaddr": $string-color,
|
|
|
|
"macaddr8": $string-color,
|
|
|
|
"uuid": $string-color,
|
2021-04-09 19:31:41 +02:00
|
|
|
"regproc": $string-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"int": $number-color,
|
|
|
|
"tinyint": $number-color,
|
|
|
|
"smallint": $number-color,
|
|
|
|
"mediumint": $number-color,
|
|
|
|
"float": $number-color,
|
|
|
|
"double": $number-color,
|
|
|
|
"decimal": $number-color,
|
|
|
|
"bigint": $number-color,
|
2021-03-04 19:34:18 +01:00
|
|
|
"newdecimal": $number-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"integer": $number-color,
|
|
|
|
"numeric": $number-color,
|
|
|
|
"smallserial": $number-color,
|
|
|
|
"serial": $number-color,
|
|
|
|
"bigserial": $number-color,
|
|
|
|
"real": $number-color,
|
|
|
|
"double_precision": $number-color,
|
|
|
|
"oid": $number-color,
|
|
|
|
"xid": $number-color,
|
|
|
|
"money": $number-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"datetime": $date-color,
|
|
|
|
"date": $date-color,
|
|
|
|
"time": $date-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"time_with_time_zone": $date-color,
|
2020-11-13 12:39:40 +01:00
|
|
|
"year": $date-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"timestamp": $date-color,
|
2021-03-17 18:06:17 +01:00
|
|
|
"timestamp_without_time_zone": $date-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"timestamp_with_time_zone": $date-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"bit": $bit-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"bit_varying": $bit-color,
|
2020-11-13 12:39:40 +01:00
|
|
|
"binary": $blob-color,
|
|
|
|
"varbinary": $blob-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"blob": $blob-color,
|
2020-11-13 12:39:40 +01:00
|
|
|
"tinyblob": $blob-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"mediumblob": $blob-color,
|
2021-03-03 19:31:05 +01:00
|
|
|
"medium_blob": $blob-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"longblob": $blob-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"bytea": $blob-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"enum": $enum-color,
|
|
|
|
"set": $enum-color,
|
2021-11-04 21:54:42 +01:00
|
|
|
"bool": $enum-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"boolean": $enum-color,
|
|
|
|
"interval": $array-color,
|
|
|
|
"array": $array-color,
|
|
|
|
"anyarray": $array-color,
|
2021-03-17 18:06:17 +01:00
|
|
|
"tsvector": $array-color,
|
|
|
|
"tsquery": $array-color,
|
2021-03-16 18:42:03 +01:00
|
|
|
"pg_node_tree": $array-color,
|
2021-04-09 19:31:41 +02:00
|
|
|
"aclitem": $array-color,
|
2020-10-23 13:58:47 +02:00
|
|
|
"unknown": $unknown-color,
|
2020-07-31 18:16:28 +02:00
|
|
|
)
|
2020-07-24 13:26:56 +02:00
|
|
|
);
|
2020-06-18 19:01:09 +02:00
|
|
|
|
2020-07-24 13:26:56 +02:00
|
|
|
.is-null {
|
2020-10-23 13:58:47 +02:00
|
|
|
color: $unknown-color;
|
2020-06-18 19:01:09 +02:00
|
|
|
|
2020-07-31 18:16:28 +02:00
|
|
|
&::after {
|
|
|
|
content: "NULL";
|
|
|
|
}
|
2020-07-24 13:26:56 +02:00
|
|
|
}
|