]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/sass/include/_mixins.scss
Fix button height when the icon is wrapped
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _mixins.scss
index 9d3700e15ee196ce1841ee9d3ec3d95bb36b8fae..79d3506295cdd95cab2aea1a6320605adda7b658 100644 (file)
@@ -27,6 +27,7 @@
   /* Fallback for non-webkit */
   display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */
   -webkit-line-clamp: $number-of-lines;
+  -webkit-box-orient: vertical;
   /* Fallback for non-webkit */
   font-size: $font-size;
   line-height: $font-size;
   max-height: $font-size * $number-of-lines;
 }
 
+@mixin muted {
+  color: pvar(--greyForegroundColor) !important;
+}
+
 @mixin fade-text ($fade-after, $background-color) {
   position: relative;
   overflow: hidden;
 
   border: 0;
   font-weight: $font-semibold;
-  height: $button-height;
+  min-height: $button-height;
   line-height: $button-height;
 
   // Because of primeng that redefines border-radius of all input[type="..."]
   [type=radio]:checked,
   [type=radio]:not(:checked) {
     position: absolute;
-    left: -9999px;
+    opacity: 0;
+    cursor: pointer;
+    height: 0;
+    width: 0;
   }
 
   [type=radio]:checked + label,
       height: 12px;
       opacity: 0;
       transform: rotate(45deg) scale(0);
-      border-right: 2px solid $bg-color;
-      border-bottom: 2px solid $bg-color;
+      border-right: 2px solid pvar(--mainBackgroundColor);
+      border-bottom: 2px solid pvar(--mainBackgroundColor);
     }
   }
 
 }
 
 @mixin chip {
-  --chip-radius: 5rem;
-  --chip-padding: .2rem .4rem;
-  $avatar-height: 1.2rem;
+  --avatar-size: 1.2rem;
 
-  align-items: center;
-  border-radius: var(--chip-radius);
   display: inline-flex;
-  font-size: 90%;
   color: pvar(--mainForegroundColor);
-  height: $avatar-height;
-  line-height: 1rem;
-  margin: .1rem;
+  height: var(--avatar-size);
   max-width: 320px;
   overflow: hidden;
-  padding: var(--chip-padding);
   text-decoration: none;
   text-overflow: ellipsis;
   vertical-align: middle;
   white-space: nowrap;
 
-  &.rectangular {
-    --chip-radius: .2rem;
-    --chip-padding: .2rem .3rem;
-  }
-
   my-actor-avatar {
-    @include margin-left(-.4rem);
     @include margin-right(.2rem);
+
+    border-radius: 5rem;
+    width: var(--avatar-size);
+    height: var(--avatar-size);
   }
 
   &.two-lines {
-    $avatar-height: 2rem;
+    --avatar-size: 2rem;
 
-    height: $avatar-height;
+    font-size: 14px;
+    line-height: 1rem;
 
     my-actor-avatar {
       display: inline-block;
     }
 
-    div {
-      margin: 0 .1rem;
-
+    > div {
       display: flex;
       flex-direction: column;
-      height: $avatar-height;
       justify-content: center;
     }
   }