Combining css and inline styles is something which hasn't been 'the done thing' in more than ten years

At first I took this on face-value as I accept that in theory, CSS and in-line styles are best kept separate. But then I wondered how true this is in the real world so looked at a few big name sites. The first I looked at have dynamical created content: Google, BBC. So I looked at Booking.com as I've seen this held up in a number of places as being (one of) the top sites written in Perl.

Look what I found within moments of examining the source HTML...

<input style="display: none" type="number" class="bui-stepper__input" data-bui-ref="input-stepper-field" id="group_children" name="group_children" min="0" max="10" value="0" data-group-children-count />

This is just one of many examples on the site today.

I'm not suggesting that bad practice in one place is justification for not trying to adopt best practice. However, it does show that I am hardly alone in this approach regardless of how much it isn't the 'done thing'. I'm not sure debating one bit of sample HTML which was shared to demonstrate something completely different helps with the original question about heredocs or with the subsequent divergence into templates.


In reply to Re^10: Here documents in blocks (why templates) by Bod
in thread Here documents in blocks by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.