Skip to content

Instantly share code, notes, and snippets.

@chestozo
Created October 13, 2016 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chestozo/18e3c1eeb032fe1185d254cd5cca106b to your computer and use it in GitHub Desktop.
Save chestozo/18e3c1eeb032fe1185d254cd5cca106b to your computer and use it in GitHub Desktop.
/**
* Задача
* - container резиновый
* - внутри 2 колонки
* - левая - резиновая
* - при этой левая не тянется больше, чем позволяет контейнер
* - правая - фиксированной ширины
*
* HTML
* <div class="parent">
* <div class="left">left normal</div>
* <div class="right">right normal</div>
* </div>
*/
.parent {
width: 500px;
display: flex;
}
.left {
flex-grow: 1;
overflow-y: hidden;
text-overflow: ellipsis;
}
.right {
/*
* Пробовал ещё flex-basis + flex-shrink = не работало
*/
width: 200px;
flex-shrink: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment