]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/buttons/button.component.scss
Auto update publishedAt in live restream
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / buttons / button.component.scss
index 5b27af3f4cef2b0f511627ab30463686ea2f5f48..c782ac3ef218b55b27af2163f2bfb9298e0facce 100644 (file)
@@ -1,5 +1,20 @@
-@import '_variables';
-@import '_mixins';
+@use '_variables' as *;
+@use '_mixins' as *;
+
+@mixin responsive-label {
+  .action-button {
+    padding: 0 13px;
+  }
+
+  .button-label {
+    display: none;
+  }
+}
+
+:host {
+  outline: none;
+  display: inline-block;
+}
 
 my-small-loader ::ng-deep .root {
   display: inline-block;
@@ -7,13 +22,18 @@ my-small-loader ::ng-deep .root {
   width: 20px;
 }
 
+a[class$=-button],
+span[class$=-button] {
+  > span {
+    @include margin-left(5px);
+  }
+}
+
 .action-button {
   @include peertube-button-link;
-  @include button-with-icon(21px, 0, -2px);
+  @include button-with-icon(21px);
 
-  > :nth-child(2) {
-    margin-left: 5px;
-  }
+  width: 100%; // useful for ellipsis, allow to define a max-width on host component
 }
 
 .orange-button {
@@ -36,15 +56,19 @@ my-small-loader ::ng-deep .root {
   @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) {
-    .action-button {
-      padding: 0 13px;
-    }
+    @include responsive-label;
+  }
+}
 
-    .button-label {
-      display: none;
-    }
+@media screen and (max-width: $small-view) {
+  .responsive-label {
+    @include responsive-label;
   }
 }