summaryrefslogtreecommitdiffstats
path: root/public/css/mixins.less
blob: c6607c295562fc696edca1641345a93dfb963698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */

.line-clamp(@numOfLines: 2) when (@numOfLines > 1) {
  display: -webkit-box;
  -webkit-line-clamp: @numOfLines;
  -webkit-box-orient: vertical;
}
.line-clamp(@numOfLines: 2) when (@numOfLines = "reset") {
  display: block; // Would have used "revert", but browser support is still poor and it's not final yet
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
}

.text-ellipsis() {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monospace() {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}