Skip to content

Commit

Permalink
fix issue with calc in less
Browse files Browse the repository at this point in the history
Ticket: ENT-9757
Changelog: None
Signed-off-by: Mikita Pilinka <[email protected]>
  • Loading branch information
mineralsfree committed Nov 28, 2023
1 parent b7e261e commit 493142f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generator/_assets/styles/less/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
flex-direction: column;
background: #FFFFFF;
z-index: 10;
width: ~"calc(433px + (243 - 433) / (320 - 1023) * (100vw - 1023px))";
// (243 - 433) / (320 - 1023) = 0.27
width: ~"calc(433px @{space} + @{space} (0.27 @{space} * @{space} (100vw @{space} - @{space} 1023px)))";
min-width: 24.3rem;
order: 10;
right: 0;
Expand Down
2 changes: 2 additions & 0 deletions generator/_assets/styles/less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@
@desktop-down: ~'(max-width: 1279px)';
@tablet-down: ~'(max-width: 1023px)';
@phone-down: ~'(max-width: 589px)';

@space: ' ';

0 comments on commit 493142f

Please sign in to comment.