object.style.minInlineSize = "value"; <'min-inline-size'> = <'min-width'> <'min-width'> = auto | <length-percentage> | min-content | max-content | fit-content( <length-percentage> ) auto Automatically specified by the user agent.
<length-percentage> =
<length> |
<percentage> <length> Specifies the length using a number followed by a unit of measurement.
<percentage> Specifies the percentage using a number followed by a percent sign (%).
min-content Represents the largest min-content contribution of the items occupying the track.
max-content Represents the largest max-content contribution of the items occupying the track.
fit-content() Represents the formula max(minimum, min(limit, max-content)), where minimum represents an auto minimum (which is often, but not always, equal to a min-content minimum), and limit is the track sizing function passed as an argument to fit-content(). This is essentially calculated as the smaller of minmax(auto, max-content) and minmax(auto, limit).
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
min-inline-size: fit-content(200px);
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<div>fit-content</div>
<div>fit-content</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
min-inline-size: 200px;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<div>length</div>
<div>length</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
min-inline-size: max-content;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<div>max-content</div>
<div>max-content</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
min-inline-size: min-content;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<div>min-content</div>
<div>min-content</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
min-inline-size: 200%;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<div>percentage</div>
<div>percentage</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<button onmouseover="myfunction(innerHTML)">initial</button>
<button onmouseover="myfunction(innerHTML)">auto</button>
<button onmouseover="myfunction(value)" value="fit-content(200px)">fit-content</button>
<button onmouseover="myfunction(value)" value="200px">length</button>
<button onmouseover="myfunction(value)" value="max-content">max-content</button>
<button onmouseover="myfunction(value)" value="min-content">min-content</button>
<button onmouseover="myfunction(value)" value="200%">percentage</button>
<div>min-inline-size</div>
<div>min-inline-size</div>
<script>
function myfunction(myparameter)
{
const myelements = document.querySelectorAll("div");
for(let myelement of myelements)
{
myelement.style.minInlineSize = myparameter;
}
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-image: linear-gradient(135deg, white, yellow);
block-size: 100px;
inline-size: 100px;
}
div:nth-of-type(2)
{
writing-mode: vertical-lr;
}
</style>
</head>
<body>
<button>initial</button>
<button>auto</button>
<button value="fit-content(200px)">fit-content</button>
<button value="200px">length</button>
<button value="max-content">max-content</button>
<button value="min-content">min-content</button>
<button value="200%">percentage</button>
<div>min-inline-size</div>
<div>min-inline-size</div>
<script>
function myfunction(myparameter)
{
const myelements = document.querySelectorAll("div");
for(let myelement of myelements)
{
myelement.style.minInlineSize = myparameter;
}
}
const myelements = document.querySelectorAll("button");
for(let myelement of myelements)
{
let myargument = myelement.innerHTML;
if(myelement.value)
{
myargument = myelement.value;
}
myelement.addEventListener("mouseover", function(){myfunction(myargument)});
}
</script>
</body>
</html>