diff options
author | bptato <nincsnevem662@gmail.com> | 2024-08-23 16:14:04 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-08-23 16:14:04 +0200 |
commit | 80b060be33ce7eea7a4bab18dbfe652cf6d36c0b (patch) | |
tree | 3e9956660114a48990632d2c15f689146def0f03 /src/css | |
parent | b7c2c15a9c2503c01bb63e9e9c4c04378192a1dd (diff) | |
download | chawan-80b060be33ce7eea7a4bab18dbfe652cf6d36c0b.tar.gz |
winattrs: un-snakeify
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cascade.nim | 4 | ||||
-rw-r--r-- | src/css/cssvalues.nim | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim index 56430d52..efa9227f 100644 --- a/src/css/cascade.nim +++ b/src/css/cascade.nim @@ -46,9 +46,9 @@ func applies(feature: MediaFeature; window: Window): bool = of mftPrefersColorScheme: return feature.b of mftWidth: - return feature.appliesLR(window, toLayoutUnit(window.attrs.width_px)) + return feature.appliesLR(window, window.attrs.widthPx.toLayoutUnit) of mftHeight: - return feature.appliesLR(window, toLayoutUnit(window.attrs.height_px)) + return feature.appliesLR(window, window.attrs.heightPx.toLayoutUnit) of mftScripting: return feature.b == window.settings.scripting diff --git a/src/css/cssvalues.nim b/src/css/cssvalues.nim index 8caa823a..f0b3cbc8 100644 --- a/src/css/cssvalues.nim +++ b/src/css/cssvalues.nim @@ -582,12 +582,12 @@ func px*(l: CSSLength; window: WindowAttributes; p: LayoutUnit): LayoutUnit = of cuIn: toLayoutUnit(l.num * 96) of cuPc: toLayoutUnit(l.num * 16) of cuPt: toLayoutUnit(l.num * 4 / 3) - of cuVw: toLayoutUnit(float64(window.width_px) * l.num / 100) - of cuVh: toLayoutUnit(float64(window.height_px) * l.num / 100) + of cuVw: toLayoutUnit(float64(window.widthPx) * l.num / 100) + of cuVh: toLayoutUnit(float64(window.heightPx) * l.num / 100) of cuVmin: - toLayoutUnit(min(window.width_px, window.height_px) / 100 * l.num) + toLayoutUnit(min(window.widthPx, window.heightPx) / 100 * l.num) of cuVmax: - toLayoutUnit(max(window.width_px, window.height_px) / 100 * l.num) + toLayoutUnit(max(window.widthPx, window.heightPx) / 100 * l.num) func blockify*(display: CSSDisplay): CSSDisplay = case display |