From 34cf23efb6ef0aba924177b4a60813ca179898db Mon Sep 17 00:00:00 2001 From: Josh Day Date: Thu, 13 Jul 2023 08:40:05 -0400 Subject: [PATCH] ci --- .github/workflows/CI.yml | 1 + src/Cobweb.jl | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8756edb..1203690 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: version: + - '1.6.7' # LTS - '1' # automatically expands to the latest stable 1.x release of Julia os: - ubuntu-latest diff --git a/src/Cobweb.jl b/src/Cobweb.jl index a74b02d..dcba128 100644 --- a/src/Cobweb.jl +++ b/src/Cobweb.jl @@ -14,17 +14,6 @@ function __init__() pushdisplay(CobwebDisplay()) end -#-----------------------------------------------------------------------------# Units -# module Units -# for u in [:ch,:cm,:em,:ex,:fr,:in,:mm,:pc,:percent,:pt,:px,:rem,:vh,:vmax,:vmin,:vw] -# @eval begin -# export $u -# struct $u end -# Base.:*(x::Number, ::Type{$u}) = string(x, $(QuoteNode(u))) -# end -# @eval $u(x::Number) = $u(x) -# end -# end #-----------------------------------------------------------------------------# Node """ @@ -218,6 +207,14 @@ Base.show(io::IO, ::MIME"text/html", o::CSS) = show(io, h.style(repr("text/css", save(file::String, o::CSS) = save(o, file) save(o::CSS, file::String) = open(io -> show(io, x), touch(file), "w") +#-----------------------------------------------------------------------------# CSSUnits +baremodule CSSUnits + using Base: @eval, string + for k in [:ch,:cm,:em,:ex,:fr,:in,:mm,:pc,:percent,:pt,:px,:rem,:vh,:vmax,:vmin,:vw] + @eval ($k = string($(QuoteNode(k))); export $k) + end +end + #-----------------------------------------------------------------------------# Doctype struct Doctype content::String