--- title: CSS Conditional Rules slug: Web/CSS/CSS_Conditional_Rules tags: - CSS - CSS Conditional Rules - Guide - NeedsTranslation - Overview - Reference - TopicStub translation_of: Web/CSS/CSS_Conditional_Rules ---
{{CSSRef}}

CSS Conditional Rules is a CSS module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.

Reference

At-rules

Specifications

Specification Status Comment
{{SpecName('CSS3 Conditional')}} {{Spec2('CSS3 Conditional')}} Initial definition

Browser compatibility

@document rule

{{Compat("css.at-rules.document")}}

@import rule

{{Compat("css.at-rules.import")}}

@media rule

{{Compat("css.at-rules.media")}}

@supports rule

{{Compat("css.at-rules.supports")}}