The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Keep whitespaces in LESS ( img[style*="float: left"] )

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #256410


    Googled a lot but can’t find a solution.

    When using an editor in a CMS and you choose align left f.e. for an image it will write that code in the HTML as:

    style=”float: left;”

    So there is a whitespace between float: and left. But when LESS compiless the stylesheet that space is removed.

    However when you use f.e. in your templates.less img[style=”float: left”] {margin: 0px 50px 5px 0px} it will be transformed to img[style=”float:left”] without the whitespace, and that does not work. Because that code has to be precise.

    Is it possible, and how, to prevent LESS from removing the whitespace in that line of code?

Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.