Issue #12 resolved

CSS classes for columns need to be changed

Luke Plant
repo owner created an issue

To give maximum information and flexibility, class should be something like:


Probably we also want just 'col' as well - if the column layout does not need 'colXofY', then it is a pain to write a CSS file with:

col1of2, col1of3, col2of3, col3of3, col1of4 ...

Comments (9)

  1. Luke Plant reporter

    New requirements from Cardiff Uni

    Every row: “row”

    Rows with columns:“row two-columns” (or three-columns, etc) or "columns2" , "columns3"

    Every column:“column”

    First column:“column firstcolumn”

    Last column:“column lastcolumn”

    Ideally this should be customisable, so this logic should be encapsulated in a strategy class which can be replaced by configuration.

  2. evildmp
    • changed status to open

    This is looking pretty good. One thing I notice though. The code will now output:

    <div class="row columns1"> <div class="column firstcolumn lastcolumn">

    when we have a row without columns in it.

    This needs to be simply:

    <div class="row">

    If absolutely necessary then I could change the CSS, but I think a single div is neater and simpler.

  3. Luke Plant reporter

    Fixed in 02fadbe853a1

    It currently output this for a single column row: <div class="row"><div>[ content of column ]</div></div>

    i.e. it has an extra unneeded 'div', but no extra CSS classes. Is this close enough? (Please close if so). Removing that div as well would be a bit more complicated, and I'd like to avoid it if possible. Currently all this behaviour is customisable by providing one simple class -- the builtin one just implements the above logic -- and I'd like to keep this class as simple as possible.

  4. Luke Plant reporter

    Is it OK as is? The current method keeps the logic simple, especially when going backwards i.e. extracting the presentation info from formatted HTML.

  5. Log in to comment