What I want
I want to have a button with a really long label, but it gets cut off at 700px with ellipses. When the viewport is smaller than 700px, the button should fit the available space. The label can be super long but also super short, the button should always fit the content, but not longer than 700px.
My Problem
The button fits the text and at 700px cuts the text off, but when shrinking the viewport the button stays at 700px and is not shrinking with it.
My Demo
https://codesandbox.io/s/mui-testing-forked-opmp8?file=/src/App.js
I am using React and Material-UI. But this is a styling problem.
What I tried
Different variations of putting max-width
, width
and min-width
to different containers, could not find a solution so far.