diff --git a/spec/formatters/font_face b/spec/formatters/font_face new file mode 100644 index 000000000..1cae4b6cf --- /dev/null +++ b/spec/formatters/font_face @@ -0,0 +1,23 @@ +component Main { + style main { + @font-face { + color: red; + } + } + + fun render { + + } +} +-------------------------------------------------------------------------------- +component Main { + style main { + @font-face { + color: red; + } + } + + fun render { + + } +} diff --git a/src/formatters/css_font_face.cr b/src/formatters/css_font_face.cr new file mode 100644 index 000000000..8a873b16f --- /dev/null +++ b/src/formatters/css_font_face.cr @@ -0,0 +1,10 @@ +module Mint + class Formatter + def format(node : Ast::CssFontFace) : String + body = + list node.definitions + + "@font-face {\n#{indent(body)}\n}" + end + end +end