Skip to content

Commit f1cf752

Browse files
Merge branch 'master' into mtsvyatkova/fix-8786-master
2 parents bc2f22d + 2da802b commit f1cf752

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

projects/igniteui-angular/src/lib/core/styles/base/utilities/_mixins.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,16 @@
345345
@content;
346346
}
347347
}
348+
349+
/// Truncates text at a specific number of lines
350+
/// @param {number|string} $lines - The number of lines to show
351+
/// @param {Boolean} $inline - Sets whether an element displays inline-box or box
352+
/// @param {Boolean} $vertical - Sets whether an element lays out its contents horizontally or vertically
353+
/// @example scss Truncates text after the fourth line
354+
/// @include line-clamp(4, true, true);
355+
@mixin line-clamp($lines, $inline, $vertical) {
356+
display: if($inline, -webkit-inline-box, -webkit-box);
357+
-webkit-line-clamp: if($lines, $lines, initial);
358+
-webkit-box-orient: if($vertical, vertical, initial);
359+
overflow: hidden;
360+
}

projects/igniteui-angular/src/lib/core/styles/components/navbar/_navbar-theme.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
@mixin igx-navbar($theme) {
9191
@include igx-root-css-vars($theme);
9292

93-
$navbar-padding: 0 rem(16px);
93+
$navbar-padding: rem(16px);
9494
$navbar-title-fz: rem(18px, 16px);
9595
$navbar-title-lh: rem(18px, 16px);
9696
$navbar-title-margin: 0;
@@ -103,12 +103,14 @@
103103
align-items: center;
104104
justify-content: space-between;
105105
width: 100%;
106-
height: 56px;
106+
min-height: 56px;
107+
max-height: 128px;
107108
padding: $navbar-padding;
108109
background: --var($theme, 'background');
109110
color: --var($theme, 'text-color');
110111
box-shadow: --var($theme, 'shadow');
111112
z-index: 4;
113+
overflow: hidden;
112114
}
113115

114116
%igx-navbar-part {
@@ -117,6 +119,7 @@
117119
}
118120

119121
%igx-navbar-title {
122+
@include line-clamp(4, true, true);
120123
margin: $navbar-title-margin;
121124
flex-grow: 1;
122125
user-select: text;

0 commit comments

Comments
 (0)