summaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/less/init/links.less
blob: d2eb30dfcb5164a409690f9fd5008623f4c1dfc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
 * SonarQube
 * Copyright (C) 2009-2017 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
@import (reference) "../variables";
@import (reference) "../mixins";

// Base

.link-variant(@baseColor, @hoverColor, @borderColor) {
  border-bottom: 1px solid @borderColor;
  color: @baseColor;

  &:hover,
  &:active,
  &:focus {
    color: @hoverColor;
  }
}

a {
  .link-variant(@darkBlue, @blue, @lightBlue);
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.link-base-color {
  .link-variant(@baseFontColor, @blue, mix(@baseFontColor, @barBackgroundColor, 20%));

  &:hover {
    border-bottom-color: @lightBlue;
  }
  &:active,
  &:focus {
    border-bottom-color: @lightBlue;
  }
}

.tooltip a {
  color: @lightBlue;
}

// Misc

.link-no-underline {
  border-bottom: none;
}
.link-underline {
  border-bottom: 1px solid #cae3f2 !important;
}

.link-with-icon {
  border-bottom: none;
}
.link-with-icon > span:last-child {
  border-bottom: 1px solid @lightBlue;
}

.link-checkbox {
  color: inherit;
  border-bottom: none;
  &:hover,
  &:active,
  &:focus {
    color: inherit;
  }
}

.link-checkbox-control {
  display: inline-block;
  padding: 4px 0 5px;
  line-height: 16px;
}

a.active-link,
.link-active {
  .link-no-underline;
  cursor: default;
}

// Color

.link-red,
/* deprecated */ a.text-danger {
  .link-variant(@red, darken(@red, 10%), lighten(@red, 40%));
}
a.text-muted {
  .link-variant(@secondFontColor, darken(@secondFontColor, 10%), lighten(@secondFontColor, 40%));
}
a.text-warning {
  .link-variant(@orange, lighten(@orange, 10%), lighten(@orange, 40%));
}
a.text-info {
}
a.text-success {
  .link-variant(@green, darken(@green, 10%), lighten(@green, 40%));
}