mirror of
https://github.com/servo/servo.git
synced 2025-09-05 12:38:21 +01:00
For inline-block correctly use min-width
With inline-block elements set the width to max(min width, specified width) instead of only using the specified width.
This commit is contained in:
parent
2f3697f5f3
commit
a35ffe1c6e
4 changed files with 59 additions and 5 deletions
26
tests/ref/inline_block_min_width.html
Normal file
26
tests/ref/inline_block_min_width.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
div {
|
||||
display: inline-block;
|
||||
min-width: 200px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.red {
|
||||
background-color: red;
|
||||
}
|
||||
.green {
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="red"></div><div class="green"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue