Shape outside example

Wrapping text around images

The css property shape-outside defines a shape around which text will wrap. Shapes supported by the in-depth framework are circle, ellipse and polygon, and the effect may be applied to an image asset or any Presto asset if an image is configured to replace it.

Using this feature requires familiarity with the browser's web inspector. The basic worksflow is to set shapeOutside to one of the three shape options on an asset in the config editor, which will result in a default value — a starting point — that the producer can edit in the web inspector, manually changing the value of shape-outside on the asset container, along with a few other properties, then copying those values to the config editor. In addition to manually editing the raw value in the inspector, there are shape-outside editors available — natively in Firefox and via the CSS Shapes Editor plugin in Chrome.

The workflow

Use these steps as a tutorial to familiarize yourself with the shapeOutside feature. There are three images for testing listed here, but feel free to substitute your own images on the CDN.

Circle

{asset.12345}
shapeOutside: circle
shapeOutsideImage: https://www.gannett-cdn.com/usat-storytelling/testing/cutouts/baseball.jpg
{}

Shape outside controls

Ellipse

Shape outside ellipse

Polygon

Caution

IMPORTANT: Start with the default value for shape-outside. It uses percentages. If you don't use percentages for polygons, you will have a bad time.

Shape outside ellipse

Options

option purpose required default
shapeOutside Activates the shape-outside feature on the targeted asset or replacement image. Yes circle
shapeOutsideImage An image on the CDN. No

Examples