Css.css.media.feature: def of gralha-css-style@0.1.0.1 Import: import gralha-css-style@0.1.0.1/css.bend as Css Lines 301-312 of gralha-css-style@0.1.0.1/css.bend: https://jend.leeeet.dev/read.txt?path=gralha-css-style@0.1.0.1/css.bend&start_line=301&end_line=312 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def css.media.feature(scan: U.Scan, +w: F32, +h: F32) -> Bool: U.Scan{k, v} = scan +key = U.trim.both(k) +value = css.lower(U.trim.both(v)) +x = U.unit(U.number(value), w) U.choose(Bool, U.string.equal(key, "min-width"), F32.is_ge(w, x), U.choose(Bool, U.string.equal(key, "max-width"), F32.is_le(w, x), U.choose(Bool, U.string.equal(key, "width"), F32.is_eq(w, x), U.choose(Bool, U.string.equal(key, "min-height"), F32.is_ge(h, x), U.choose(Bool, U.string.equal(key, "max-height"), F32.is_le(h, x), U.choose(Bool, U.string.equal(key, "height"), F32.is_eq(h, x), U.string.equal(key, "orientation") && U.choose(Bool, U.string.equal(value, "portrait"), F32.is_ge(h, w), U.string.equal(value, "landscape") && F32.is_gt(w, h)))))))) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_le https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.lower https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=Scan https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=number https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=string.equal https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=trim.both https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=unit