RAPID CSS 2015 - HTML5 + Cleanup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RAPID CSS 2015 - HTML5 + Cleanup

MBProducties (Frank Catry)

When i convert to html5 + Cleanup this text

 

<body>

  <div class='headerDiv'>

    <div class='headerContent'>

        <div class='languages'>

 

    <div class='k menu'>

      NL

    </div>

 

    <div class='k menu'>

      FR

    </div>

 

    <div class='k menu'>

      DE

    </div>

 

    <div class='k menu'>

      EN

    </div>

 

    <div class='k menu'>

      PL

    </div>

 

 

    <div class='clearDiv'></div>

    </div>

 

  </div>

  </div>

</body>

 

 

i get this what is not correct since the DIV structure is gone.

 

<body>

  <div class='headerDiv headerContent languages'>

    <div class='k menu'>

      NL

    </div>

 

    <div class='k menu'>

      FR

    </div>

 

    <div class='k menu'>

      DE

    </div>

 

    <div class='k menu'>

      EN

    </div>

 

    <div class='k menu'>

      PL

    </div>

 

    <div class='clearDiv'></div>

  </div>

</body>

 

 

 

Frank Catry

MB PRODUCTIES

Hazelaarsdreef 22

B-8530 HARELBEKE

BELGIUM

E: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: RAPID CSS 2015 - HTML5 + Cleanup

Geoff McLane
Hi Frank,

Thanks for reporting. Yes, you are correct. The extraordinary action
'clean' will combine empty div classes!

So in place of -

```
  <div class='headerDiv'>
     <div class='headerContent'>
         <div class='languages'>
```

you will get -

```
  <div class='headerDiv headerContent languages'>
```

Tidy! has **ALWAYS** done this! For the last 14+ years... It is a Tidy!
`feature`... ;=))

I guess the 'clean' option was mainly to begin to strip out surplus
presentational tags and attributes especially those generated by
Microsoft Office products...

It is probably not needed on most documents... hence defaults to 'no'...
I seldom use it...

Just remove the -c option and the DIV structure will be retained...

Alternatively, there is already an option `--merge-divs no` to at least
prevent this... if you still need other clean actions...

Hope this clarifies and helps.

Regards,
Geoff.