---
url: /reference/@cssdoc/core/interfaces/CompileCustomMediaOptions.md
---
# Interface: CompileCustomMediaOptions

Defined in: [packages/core/src/compile.ts:35](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/compile.ts#L35)

Options for [compileCustomMediaDeclarations](../functions/compileCustomMediaDeclarations.md).

## Extends

* [`ParseOptions`](ParseOptions.md).[`BuildCustomMediaOptions`](BuildCustomMediaOptions.md)

## Properties

### configuration?

```ts
optional configuration?: CssDocConfiguration;
```

Defined in: [packages/core/src/model.ts:481](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/model.ts#L481)

The tag configuration (standard + custom tags, and which are supported). Defaults to a fresh
[CssDocConfiguration](../classes/CssDocConfiguration.md) with every standard tag enabled — i.e. the full built-in vocabulary.
Supply one (e.g. from `@cssdoc/config`) to register custom tags or disable standard ones.

#### Inherited from

[`ParseOptions`](ParseOptions.md).[`configuration`](ParseOptions.md#configuration)

***

### fileName?

```ts
optional fileName?: string;
```

Defined in: [packages/core/src/model.ts:497](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/model.ts#L497)

The source file name to record on each entry's [CssSource](CssSource.md), enabling source links. The parser
always records line/column; supply this to also record the file.

#### Inherited from

[`ParseOptions`](ParseOptions.md).[`fileName`](ParseOptions.md#filename)

***

### isRecordBoundary?

```ts
optional isRecordBoundary?: (commentText) => string | undefined;
```

Defined in: [packages/core/src/model.ts:475](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/model.ts#L475)

How records are delimited. By default a new record begins at any doc comment (`/** … */`) that
carries an `@component` or `@name` tag, which is the recommended, framework-agnostic convention.
Supply a custom test to split on something else (e.g. a per-component header comment).

#### Parameters

##### commentText

`string`

#### Returns

`string` | `undefined`

#### Inherited from

[`ParseOptions`](ParseOptions.md).[`isRecordBoundary`](ParseOptions.md#isrecordboundary)

***

### modifierConvention?

```ts
optional modifierConvention?: ModifierConventionInput;
```

Defined in: [packages/core/src/model.ts:487](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/model.ts#L487)

The modifier convention — how modifier classes are spelled (BEM `.button--primary` by default;
`rscss`, `bare`, or a custom `ModifierConvention` for SUIT/CUBE/etc.). Overrides the
`configuration`'s convention when both are given.

#### Inherited from

[`ParseOptions`](ParseOptions.md).[`modifierConvention`](ParseOptions.md#modifierconvention)

***

### parse?

```ts
optional parse?: CssParse;
```

Defined in: [packages/core/src/model.ts:492](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/model.ts#L492)

The PostCSS parser to read `css` with. Defaults to `postcss.parse` (plain CSS). Inject a dialect
parser (e.g. `postcss-scss`/`postcss-less` via `@cssdoc/dialects`) to document `.scss`/`.less`.

#### Inherited from

[`ParseOptions`](ParseOptions.md).[`parse`](ParseOptions.md#parse)

***

### resolveValue?

```ts
optional resolveValue?: (profile, refs) => string | boolean | undefined;
```

Defined in: [packages/core/src/customMedia.ts:30](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/customMedia.ts#L30)

Resolve each profile's declaration value. Defaults to `true`.

Return a media query list string (for example `(width >= 64rem)`), `true`, or `false`.

#### Parameters

##### profile

`string`

##### refs

readonly [`StructureCustomMediaRef`](StructureCustomMediaRef.md)\[]

#### Returns

`string` | `boolean` | `undefined`

#### Inherited from

[`BuildCustomMediaOptions`](BuildCustomMediaOptions.md).[`resolveValue`](BuildCustomMediaOptions.md#resolvevalue)

***

### sort?

```ts
optional sort?: boolean;
```

Defined in: [packages/core/src/customMedia.ts:37](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/customMedia.ts#L37)

Sort declarations by profile name (default `true`) for stable output.

#### Inherited from

[`BuildCustomMediaOptions`](BuildCustomMediaOptions.md).[`sort`](BuildCustomMediaOptions.md#sort)
