The env() CSS function can be used to insert the value of an environment variable, which is global to a particular document, unlike custom property. The env() function can then be used to substitute the value into arbitrary locations, similar to the var() function.

The env() function can be used in place of any part of a value in any property on any element, or any part of a value in any descriptor on any at-rule, and in several other places where CSS values are allowed.

CSS Environment Variable are currently being defined in a draft Recommandation: CSS Environment Variables Module Level 1.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support ? ? ? ? ?

11.1

11 — 111

FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? ? ? ? ?

11.1

11 — 111

?

1. Supported as constant.

 

Document Tags and Contributors

Contributors to this page: nhoizey
Last updated by: nhoizey,