button.component.scss 1.16 KB
Newer Older
Chocobozzz's avatar
Chocobozzz committed
1
2
@use '_variables' as *;
@use '_mixins' as *;
Chocobozzz's avatar
Chocobozzz committed
3

Chocobozzz's avatar
Chocobozzz committed
4
5
6
7
8
9
10
11
12
13
@mixin responsive-label {
  .action-button {
    padding: 0 13px;
  }

  .button-label {
    display: none;
  }
}

14
15
:host {
  outline: none;
16
  display: inline-block;
17
18
}

Chocobozzz's avatar
Chocobozzz committed
19
my-small-loader ::ng-deep .root {
Chocobozzz's avatar
Chocobozzz committed
20
21
22
23
24
  display: inline-block;
  margin: 0 3px 0 0;
  width: 20px;
}

Rigel Kent's avatar
Rigel Kent committed
25
a[class$=-button],
26
27
span[class$=-button] {
  > span {
Chocobozzz's avatar
Chocobozzz committed
28
    @include margin-left(5px);
29
30
31
  }
}

Chocobozzz's avatar
Chocobozzz committed
32
33
.action-button {
  @include peertube-button-link;
Chocobozzz's avatar
Chocobozzz committed
34
  @include button-with-icon(21px);
35
36

  width: 100%; // useful for ellipsis, allow to define a max-width on host component
Chocobozzz's avatar
Chocobozzz committed
37
}
Chocobozzz's avatar
Chocobozzz committed
38

Chocobozzz's avatar
Chocobozzz committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.orange-button {
  @include peertube-button;
  @include orange-button;
}

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

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

.grey-button-link {
  @include peertube-button-link;
  @include grey-button;
Chocobozzz's avatar
Chocobozzz committed
57
}
58

59
60
61
62
.button-label {
  @include ellipsis;
}

63
64
65
// In a table, try to minimize the space taken by this button
@media screen and (max-width: 1400px) {
  :host-context(td) {
Chocobozzz's avatar
Chocobozzz committed
66
67
68
    @include responsive-label;
  }
}
69

Chocobozzz's avatar
Chocobozzz committed
70
71
72
@media screen and (max-width: $small-view) {
  .responsive-label {
    @include responsive-label;
73
74
  }
}