Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to convert css style syntax in haml

I got the wrong haml in http://html2haml.heroku.com/

How to convert it in proper way ?

Because the haml didn't render the identical html when I load the page

HTML

<style media="screen">
      img { display: none; }
            body { overflow: hidden; }
            #canvas { position: absolute; top: 0; left: 0; }
</style>

HAML by http://html2haml.heroku.com/

%style{media: "screen"}
  :cdata
    img { display: none; }
    body { overflow: hidden; }
    \#canvas { position: absolute; top: 0; left: 0; }
like image 550
newBike Avatar asked Dec 07 '22 01:12

newBike


1 Answers

This should work

%body
  :css
    img { display: none; }
    body { overflow: hidden; }
    #canvas { position: absolute; top: 0; left: 0; }

P.S. But this's a bad practice to render html content which should be located in separate file.

like image 142
itsnikolay Avatar answered Dec 24 '22 16:12

itsnikolay