Edgewall Software

Opened 10 years ago

Last modified 10 years ago

#11403 closed enhancement

Definition terms in list have absolute positioning — at Version 1

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: general Version:
Severity: normal Keywords:
Cc: Jun Omae Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

The dt elements on the changeset and diff view pages have absolute positioning, so if someone wanted to say, add a left margin #overview { margin-left: 2.5em }, the entire contents of the dl would not be shifted:

—>

The following change seems to make sense, since it removes the absolute left position of the dts, and instead sets the margin-left on the parent to preserve their positioning.

  • trac/htdocs/css/diff.css

    diff --git a/trac/htdocs/css/diff.css b/trac/htdocs/css/diff.css
    index bc081cc..22db26c 100644
    a b  
    22#prefs fieldset { margin: 1em .5em .5em; padding: .5em 1em 0 }
    33
    44/* Diff/change overview */
    5 #overview { line-height: 130%; margin-top: 1em; padding: .5em }
     5#overview { line-height: 130%; margin-top: 1em; padding: .5em .5em .5em 0 }
    66#overview dt.property {
    77 font-weight: bold;
    88 padding-right: .25em;
    99 position: absolute; /* relies on #content { position: relative } */
    10  left: 0;
    1110 text-align: right;
    1211 width: 7.75em;
    1312}

After that change, if we set a margin-left in the custom stylesheet (#overview { margin-left: 2.5em }), we get:

There was some recent adjustments to the left property in [11097] and [11136]. Prior to that, the most recent change was [943].

Change History (4)

by Ryan J Ollos, 10 years ago

Attachment: After.png added

by Ryan J Ollos, 10 years ago

Attachment: Before.png added

comment:1 by Ryan J Ollos, 10 years ago

Description: modified (diff)

by Ryan J Ollos, 10 years ago

Attachment: MarginLeft2.5em.png added
Note: See TracTickets for help on using tickets.