d Internet Explorer ≤ 11 only supports dpiunits.MicrosoftEdgeonlysupportsdpianddppxunits.
Notallmediafeaturepropertiessupportrangeswithmin-andmax-.Table7.2lists
thosethatdo,alongwiththetypeofvaluepermittedforeach.Thereisasecond
typeofmediafeature,however:thediscretetype.
Discrete Media Feature Queries
Discretemediafeaturesarepropertiesthatacceptoneofaset,orapredefinedlist
ofvalues.Insomecases,thesetofvaluesisaBoolean:eithertrueorfalse.
Discretemediafeaturesarepropertiesforwhichaquantitymakeslittlesense.Here's
anexampleusingtheorientationproperty.Theexampleadjuststheproportional
heightofalogowheninportraitmode:
@media screen and (orientation: portrait) {
#logo {
height: 10vh;
width: auto;
}
}
(Remember to Use Parentheses)
Here'syourgentlereminderthatfeaturequeriessuchas(orientation:por-
trait)needtobewrappedinparentheses.
Theorientationfeatureisanexampleofadiscretemediafeature.Ithastwosup-
portedvalues,portraitandlandscape.Withdiscretemediafeatures,minimum
andmaximumvaluesdon'tmakemuchsensefortheseproperties,asyoucansee
inTable7.3.
284 CSS Master