diff options
-rw-r--r-- | lib/ur/basis.urs | 2 | ||||
-rw-r--r-- | src/monoize.sml | 2 | ||||
-rw-r--r-- | tests/cssNull.ur | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 8b0561c8..dc4d9ba2 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -602,6 +602,8 @@ val setval : sql_sequence -> int -> transaction unit type css_class val show_css_class : show css_class +val null : css_class +(* No special formatting *) val classes : css_class -> css_class -> css_class (* The equivalent of writing one class after the other, separated by a space, in * an HTML 'class' attribute *) diff --git a/src/monoize.sml b/src/monoize.sml index 9f100a3f..f6ea7255 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2855,6 +2855,8 @@ fun monoExp (env, st, fm) (all as (e, loc)) = ((L'.ESetval (e1, e2), loc), fm) end + | L.EFfi ("Basis", "null") => ((L'.EPrim (Prim.String ""), loc), fm) + | L.EFfiApp ("Basis", "classes", [s1, s2]) => let val (s1, fm) = monoExp (env, st, fm) s1 diff --git a/tests/cssNull.ur b/tests/cssNull.ur new file mode 100644 index 00000000..4939c712 --- /dev/null +++ b/tests/cssNull.ur @@ -0,0 +1,6 @@ +style spicy + +fun main () : transaction page = return <xml><body> + <span class={null}>Boring</span> + <span class={classes null spicy}>Spicy!</span> +</body></xml> |