This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The shape-margin
CSS property adds a margin to shape-outside
.
/* <length> values */ shape-margin: 10px; shape-margin: 20mm; /* <percentage> value */ shape-margin: 60%; /* Global values */ shape-margin: inherit; shape-margin: initial; shape-margin: unset;
Initial value | 0 |
---|---|
Applies to | floats |
Inherited | no |
Percentages | refer to the width of the containing block |
Media | visual |
Computed value | as specified, but with relative lengths converted into absolute lengths |
Animation type | a length, percentage or calc(); |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
Syntax
Values
<length-percentage>
- Sets the margin of the shape to a
<length>
value or to a<percentage>
of the width of the element's containing block.
Formal syntax
<length-percentage>where
<length-percentage> = <length> | <percentage>
Specifications
Specification | Status | Comment |
---|---|---|
CSS Shapes Module Level 1 The definition of 'shape-margin' in that specification. |
Candidate Recommendation | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | Yes | ? | No | No | No | 7 -webkit- |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | Yes | ? | ? | No | No | No | ? |