# Ensure that CSS and JavaScript codes are not embedded in the HTML code of the page, with the exception of any configuration variables for JavaScript objects (`@greenpoint/outsource-css`)

⚠️ This rule _warns_ in the ✅ `recommended` config.

<!-- end auto-generated rule header -->

## Rule Details

This rule aims to ensure that CSS and JavaScript codes are not embedded in the HTML code of the page, with the exception of any configuration variables for JavaScript objects.

## Examples

Examples of **non-compliant** code for this rule:

```js
<div style={{ color: "red", margin: 10 }} />
```

or

```js

<style type="text/css" media="screen">
    p { color: #333; margin: 2px 0 }
</style>

```

Examples of **compliant** code for this rule:

```js

<link href="css/styles.css" rel="stylesheet">

```

## Further Reading

- [cnumr/best-practices/Externalize CSS and Javascript](https://github.com/cnumr/best-practices/blob/fc5a1f865bafb196e4775cce8835393751d40ed8/chapters/BP_032_en.md)
