<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thematic/react](./react.md) &gt; [mark2style](./react.mark2style.md)

## mark2style() function

Converts a basic mark config to CSS-compatible object suitable for merging with other styles that will be added to a component. The main function here really is to convert fill and stroke colors to use the opacity def. Note that we return the style attrs as using the deconstructed form, not the CSS shorthand.

<b>Signature:</b>

```typescript
export declare function mark2style(config: SVGMark, datum?: any): CSSProperties;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  config | SVGMark | the mark configuration |
|  datum | any | <i>(Optional)</i> optional data item if the theme has been configured with underlying scales. |

<b>Returns:</b>

CSSProperties

