aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/buttons/button.component.scss
blob: 964590e29a89887127fc704b21bd54704209f658 (plain) (blame)
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
@use '_variables' as *;
@use '_mixins' as *;

@mixin responsive-label {
  .action-button {
    padding: 0 13px;
  }

  .button-label {
    display: none;
  }

  my-global-icon {
    margin: 0 !important;
  }
}

:host {
  display: inline-block;
}

a[class$=-button],
span[class$=-button] {
  > span {
    @include margin-left(5px);
  }
}

.action-button {
  width: 100%; // useful for ellipsis, allow to define a max-width on host component

  my-loader.displayed {
    @include margin-right(3px);

    display: inline-flex;
    vertical-align: middle;
    margin-top: -1px;
  }

  &.has-icon {
    @include button-with-icon(21px);
  }

  &.icon-only my-global-icon {
    margin: 0 !important;
  }
}

.orange-button,
.grey-button {
  @include peertube-button;
}

.orange-button-link,
.grey-button-link {
  @include peertube-button-link;
}

.orange-button,
.orange-button-link {
  @include orange-button;
}

.grey-button,
.grey-button-link {
  @include grey-button;
}

.button-label {
  @include ellipsis;
}

// In a table, try to minimize the space taken by this button
@media screen and (max-width: 1400px) {
  :host-context(td) {
    @include responsive-label;
  }
}

@media screen and (max-width: $small-view) {
  .responsive-label {
    @include responsive-label;
  }
}