antares/src/renderer/scss/_data-types.scss

58 lines
1.2 KiB
SCSS
Raw Normal View History

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,
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,
"datetime": $date-color,
"date": $date-color,
"time": $date-color,
2020-11-13 12:39:40 +01:00
"year": $date-color,
2020-10-23 13:58:47 +02:00
"timestamp": $date-color,
"bit": $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,
"longblob": $blob-color,
"enum": $enum-color,
"set": $enum-color,
"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
}