Issue #21 resolved

div styling suggestion

evildmp
created an issue

The column system requires careful control of column widths in CSS. For example, if we give a column padding, it needs to be made narrower by the same amount as the padding. This results in a plethora of CSS rules.

An alternative would be to reserve the class="column" divs strictly for layout control. For all other styling on the column, we could create a div inside the column div, and give that inner div the padding, outline, and so on, without disturbing the layout div around it.

Needless to say, all this would have to be kept hidden from the user - as far as they're concerned, they're just styling a column.

Is this possible? Do the advantages it confers outweigh the complexity?

Comments (4)

  1. Luke Plant repo owner
    • changed status to open

    That's wouldn't be hard to implement, and having done a fair amount of CSS myself, I can see how that would simplify things a lot.

  2. Luke Plant repo owner

    Hmm, what about things like 'doublewidth'? Since that will need to be assigned a width in CSS, I assume this wants to go on the same div that has 'column'.

    Also, I assume 'firstcolumn' and 'lastcolumn' want to go on same div that has 'column'.

    I'll try to code the solution using the LayoutDetails class so that it is easy to override (i.e. other users of the project can provide their own LayoutDetails that does it differently).

  3. Luke Plant repo owner

    Implemented in dd6c85410524

    If the assumption I made in my last comment about 'doublewidth' isn't correct, it is very easy to change. If the assumption I made about 'firstcolumn', 'lastcolumn' is not correct, it will take a bit more time.

  4. Log in to comment