aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/less/init/links.less
blob: 4f47e67b8bfbcdfbdbcabf6b62b8e538aa372f5f (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
/*
 * SonarQube
 * Copyright (C) 2009-2016 SonarSource SA
 * mailto:contact 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-with-icon { border-bottom: none; }
.link-with-icon > span:last-child { border-bottom: 1px solid @lightBlue; }

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%)); }