Class MediaFeatures
- Namespace
- WebDriverBiDi.Emulation
- Assembly
- WebDriverBiDi.dll
A data class representing the set of allowable CSS media feature override values.
public class MediaFeatures
- Inheritance
-
MediaFeatures
- Inherited Members
Constructors
MediaFeatures()
Initializes a new instance of the MediaFeatures class.
public MediaFeatures()
Fields
ResetColorIndexValue
Value to indicate resetting the emulation of the "color-index" CSS media feature.
public const long ResetColorIndexValue = -1
Field Value
ResetColorValue
Value to indicate resetting the emulation of the "color" CSS media feature.
public const long ResetColorValue = -1
Field Value
ResetGridValue
Value to indicate resetting the emulation of the "grid" CSS media feature.
public const long ResetGridValue = -1
Field Value
ResetHorizontalViewportSegmentsValue
Value to indicate resetting the emulation of the "horizontal-viewport-segments" CSS media feature.
public const long ResetHorizontalViewportSegmentsValue = -1
Field Value
ResetMonochromeValue
Value to indicate resetting the emulation of the "monochrome" CSS media feature.
public const long ResetMonochromeValue = -1
Field Value
ResetVerticalViewportSegmentsValue
Value to indicate resetting the emulation of the "vertical-viewport-segments" CSS media feature.
public const long ResetVerticalViewportSegmentsValue = -1
Field Value
Properties
AnyHover
Gets or sets the value to emulate for the "any-hover" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("any-hover")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AnyHoverMediaFeatureValue? AnyHover { get; set; }
Property Value
AnyPointer
Gets or sets the value to emulate for the "any-pointer" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("any-pointer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AnyPointerMediaFeatureValue? AnyPointer { get; set; }
Property Value
Color
Gets or sets the value to emulate for the "color" CSS media feature. Use ResetColorValue to reset the emulation.
[JsonPropertyName("color")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? Color { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or ResetColorValue to reset the emulation). This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetColorValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
ColorGamut
Gets or sets the value to emulate for the "color-gamut" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("color-gamut")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ColorGamutMediaFeatureValue? ColorGamut { get; set; }
Property Value
ColorIndex
Gets or sets the value to emulate for the "color-index" CSS media feature. Use ResetColorIndexValue to reset the emulation.
[JsonPropertyName("color-index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? ColorIndex { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or ResetColorIndexValue to reset the emulation). This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetColorIndexValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
DisplayMode
Gets or sets the value to emulate for the "display-mode" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("display-mode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DisplayModeMediaFeatureValue? DisplayMode { get; set; }
Property Value
DynamicRange
Gets or sets the value to emulate for the "dynamic-range" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("dynamic-range")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DynamicRangeMediaFeatureValue? DynamicRange { get; set; }
Property Value
EnvironmentBlending
Gets or sets the value to emulate for the "environment-blending" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("environment-blending")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EnvironmentBlendingMediaFeatureValue? EnvironmentBlending { get; set; }
Property Value
ForcedColors
Gets or sets the value to emulate for the "forced-colors" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("forced-colors")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ForcedColorsMediaFeatureValue? ForcedColors { get; set; }
Property Value
Grid
Gets or sets the value to emulate for the "grid" CSS media feature. Use ResetGridValue to reset the emulation.
[JsonPropertyName("grid")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, 1, HasSentinel = true, SentinelValue = -1)]
public long? Grid { get; set; }
Property Value
- long?
Remarks
The only valid values for this property are zero (0) and one (1) (or ResetGridValue to reset the emulation). This property does not validate its value; a value other than those is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetGridValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
HorizontalViewportSegments
Gets or sets the value to emulate for the "horizontal-viewport-segments" CSS media feature. Use ResetHorizontalViewportSegmentsValue to reset the emulation.
[JsonPropertyName("horizontal-viewport-segments")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? HorizontalViewportSegments { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or ResetHorizontalViewportSegmentsValue to reset the emulation). This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetHorizontalViewportSegmentsValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
Hover
Gets or sets the value to emulate for the "hover" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("hover")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HoverMediaFeatureValue? Hover { get; set; }
Property Value
InvertedColors
Gets or sets the value to emulate for the "inverted-colors" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("inverted-colors")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public InvertedColorsMediaFeatureValue? InvertedColors { get; set; }
Property Value
Monochrome
Gets or sets the value to emulate for the "monochrome" CSS media feature. Use ResetMonochromeValue to reset the emulation.
[JsonPropertyName("monochrome")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? Monochrome { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or ResetMonochromeValue to reset the emulation). This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetMonochromeValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
NavControls
Gets or sets the value to emulate for the "nav-controls" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("nav-controls")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public NavControlsMediaFeatureValue? NavControls { get; set; }
Property Value
OverflowBlock
Gets or sets the value to emulate for the "overflow-block" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("overflow-block")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public OverflowBlockMediaFeatureValue? OverflowBlock { get; set; }
Property Value
OverflowInline
Gets or sets the value to emulate for the "overflow-inline" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("overflow-inline")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public OverflowInlineMediaFeatureValue? OverflowInline { get; set; }
Property Value
Pointer
Gets or sets the value to emulate for the "pointer" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("pointer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PointerMediaFeatureValue? Pointer { get; set; }
Property Value
PrefersColorScheme
Gets or sets the value to emulate for the "prefers-color-scheme" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("prefers-color-scheme")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrefersColorSchemeMediaFeatureValue? PrefersColorScheme { get; set; }
Property Value
PrefersContrast
Gets or sets the value to emulate for the "prefers-contrast" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("prefers-contrast")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrefersContrastMediaFeatureValue? PrefersContrast { get; set; }
Property Value
PrefersReducedData
Gets or sets the value to emulate for the "prefers-reduced-data" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("prefers-reduced-data")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrefersReducedDataMediaFeatureValue? PrefersReducedData { get; set; }
Property Value
PrefersReducedMotion
Gets or sets the value to emulate for the "prefers-reduced-motion" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("prefers-reduced-motion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrefersReducedMotionMediaFeatureValue? PrefersReducedMotion { get; set; }
Property Value
PrefersReducedTransparency
Gets or sets the value to emulate for the "prefers-reduced-transparency" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("prefers-reduced-transparency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrefersReducedTransparencyMediaFeatureValue? PrefersReducedTransparency { get; set; }
Property Value
Scan
Gets or sets the value to emulate for the "scan" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("scan")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ScanMediaFeatureValue? Scan { get; set; }
Property Value
Scripting
Gets or sets the value to emulate for the "scripting" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("scripting")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ScriptingMediaFeatureValue? Scripting { get; set; }
Property Value
Update
Gets or sets the value to emulate for the "update" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("update")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public UpdateMediaFeatureValue? Update { get; set; }
Property Value
VerticalViewportSegments
Gets or sets the value to emulate for the "vertical-viewport-segments" CSS media feature. Use ResetVerticalViewportSegmentsValue to reset the emulation.
[JsonPropertyName("vertical-viewport-segments")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? VerticalViewportSegments { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or ResetVerticalViewportSegmentsValue to reset the emulation). This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
Any negative value resets the emulation, but only ResetVerticalViewportSegmentsValue is declared as the reset sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for a reset.
VideoColorGamut
Gets or sets the value to emulate for the "video-color-gamut" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("video-color-gamut")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VideoColorGamutMediaFeatureValue? VideoColorGamut { get; set; }
Property Value
VideoDynamicRange
Gets or sets the value to emulate for the "video-dynamic-range" CSS media feature. Use Reset to reset the emulation.
[JsonPropertyName("video-dynamic-range")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VideoDynamicRangeMediaFeatureValue? VideoDynamicRange { get; set; }