Margin, padding, border, shorthand values order?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy

    Margin, padding, border, shorthand values order?

    I'm a beginning student of CSS and the shorthand order for margins, etc.
    raised an eyebrow.

    The clockwise order is what bothers me:

    p.margin {margin: [TOP]cm [RIGHT]cm [BOTTOM]cm [LEFT]cm}


    I think the order should be:

    p.margin {margin: [TOP]cm [LEFT]cm [RIGHT]cm [BOTTOMcm}


    As an experienced code-based typesetter, when defining a paragraph style
    we always took a top down approach and defined the space above, then we
    concerned ourselves with the left and right indents and finally the space
    below.

    Could someone explain why the top/clockwise order was adopted? It doesn't
    make sense to me.

    Could this be changed or discussed further?

    Andy Burns
    Typographer

    --
    "Ladies and gentlemen, The Beatles!"
    - Ed Sullivan (1964)
  • Spartanicus

    #2
    Re: Margin, padding, border, shorthand values order?

    Andy <ajb@comcast.ne t> wrote:
    [color=blue]
    >Could someone explain why the top/clockwise order was adopted? It doesn't
    >make sense to me.[/color]

    Get used to it, use the verbose notation if the shorthand confuses you.
    [color=blue]
    >Could this be changed[/color]

    Just to satisfy your arbitrary typographic convention, thereby breaking
    all existing coding?

    --
    Spartanicus

    Comment

    • Jan Roland Eriksson

      #3
      Re: Margin, padding, border, shorthand values order?

      On Sat, 19 Feb 2005 09:52:36 -0600, Andy <ajb@comcast.ne t> wrote:

      [...][color=blue]
      >The clockwise order is what bothers me:
      >
      >p.margin {margin: [TOP]cm [RIGHT]cm [BOTTOM]cm [LEFT]cm}
      >I think the order should be:
      >p.margin {margin: [TOP]cm [LEFT]cm [RIGHT]cm [BOTTOMcm}[/color]

      You are too late; you should have been in the discussions that took
      place early to mid 1990'ies for your input to have had a possible
      effect.

      CSS1 was "written in stone" (i.e. became a W3 recommendation) in 1996,
      implementations slowly started to grow and the clockwise definition is
      in effect since then.
      [color=blue]
      >As an experienced code-based typesetter, when defining a paragraph style
      >we always took a top down approach...[/color]

      Well, it's just another way to set up a box definition, no big deal.
      [color=blue]
      >Could someone explain why the top/clockwise order was adopted?[/color]

      I'm pretty sure that there is a line of reasoning stored somewhere in
      the old CSS discussion archives, but I have never seen it.
      Still since I know that they were not all "dummies" that came up with
      the CSS1 spec I take it that they had a solid reason to do what they
      did.
      [color=blue]
      >Could this be changed...[/color]

      No; not without convincing all of the following to change...
      Microsoft,
      the Mozilla org,
      Opera Software,
      every other CSS browser producer,
      every web author that already have pages on the www that works according
      to current CSS recommendations .
      [color=blue]
      >or discussed further?[/color]

      Ad nauseum if you like, it still will not change.

      --
      Rex


      Comment

      • Andy

        #4
        Re: Margin, padding, border, shorthand values order?

        Spartanicus <me@privacy.net > wrote in
        news:n09f115q97 56c8g8a4mkl9ha0 3fufeoje5@news. spartanicus.utv internet.ie:
        [color=blue]
        > Andy <ajb@comcast.ne t> wrote:
        >[color=green]
        >>Could someone explain why the top/clockwise order was adopted? It
        >>doesn't make sense to me.[/color]
        >
        > Get used to it, use the verbose notation if the shorthand confuses
        > you.[/color]

        That didn't answer the question.

        [color=blue][color=green]
        >>Could this be changed[/color]
        >
        > Just to satisfy your arbitrary typographic convention, thereby
        > breaking all existing coding?[/color]

        That didn't answer the question either.

        They could add an extra descriptors: "margina" (etc.) that would parse
        the values T-L-R-B. So css composers could use whichever version they
        liked. No code breaks and I'd be happy! ;)

        I wish I'd been able to contribute to the shorthand proposal back when it
        was being implemented. A little late to the party as usual.

        Regards,

        Andy Burns
        Typographer

        --
        "Ladies and gentlemen, The Beatles!"
        - Ed Sullivan (1964)

        Comment

        • Andy

          #5
          Re: Margin, padding, border, shorthand values order?

          Jan Roland Eriksson <jrexon@newsguy .com> wrote in
          news:0m9f11tc5a 3d72rp7q62k22gr fd4b87iul@4ax.c om:
          [color=blue]
          > On Sat, 19 Feb 2005 09:52:36 -0600, Andy <ajb@comcast.ne t> wrote:
          >
          > [...][color=green]
          >>The clockwise order is what bothers me:
          >>
          >>p.margin {margin: [TOP]cm [RIGHT]cm [BOTTOM]cm [LEFT]cm}
          >>I think the order should be:
          >>p.margin {margin: [TOP]cm [LEFT]cm [RIGHT]cm [BOTTOMcm}[/color]
          >
          > You are too late; you should have been in the discussions that took
          > place early to mid 1990'ies for your input to have had a possible
          > effect.
          >
          > CSS1 was "written in stone" (i.e. became a W3 recommendation) in 1996,
          > implementations slowly started to grow and the clockwise definition is
          > in effect since then.
          >[color=green]
          >>As an experienced code-based typesetter, when defining a paragraph[/color][/color]
          style[color=blue][color=green]
          >>we always took a top down approach...[/color]
          >
          > Well, it's just another way to set up a box definition, no big deal.
          >[color=green]
          >>Could someone explain why the top/clockwise order was adopted?[/color]
          >
          > I'm pretty sure that there is a line of reasoning stored somewhere in
          > the old CSS discussion archives, but I have never seen it.
          > Still since I know that they were not all "dummies" that came up with
          > the CSS1 spec I take it that they had a solid reason to do what they
          > did.
          >[color=green]
          >>Could this be changed...[/color]
          >
          > No; not without convincing all of the following to change...
          > Microsoft,
          > the Mozilla org,
          > Opera Software,
          > every other CSS browser producer,
          > every web author that already have pages on the www that works[/color]
          according[color=blue]
          > to current CSS recommendations .
          >[color=green]
          >>or discussed further?[/color]
          >
          > Ad nauseum if you like, it still will not change.
          >[/color]

          Jan,

          Thanks for the excellent reply.

          I'm very interested in css. I should've taken notice sooner as you
          pointed out.

          Regards,

          Andy Burns

          --
          "Ladies and gentlemen, The Beatles!"
          - Ed Sullivan (1964)

          Comment

          • Dave Patton

            #6
            Re: Margin, padding, border, shorthand values order?

            Andy <ajb@comcast.ne t> wrote in
            news:Xns9602B8B 97EB6Bnospmnowh erecom@216.196. 97.136:
            [color=blue]
            > Jan Roland Eriksson <jrexon@newsguy .com> wrote in
            > news:0m9f11tc5a 3d72rp7q62k22gr fd4b87iul@4ax.c om:
            >[color=green]
            >> On Sat, 19 Feb 2005 09:52:36 -0600, Andy <ajb@comcast.ne t> wrote:
            >>
            >> [...][color=darkred]
            >>>The clockwise order is what bothers me:
            >>>
            >>>p.margin {margin: [TOP]cm [RIGHT]cm [BOTTOM]cm [LEFT]cm}
            >>>I think the order should be:
            >>>p.margin {margin: [TOP]cm [LEFT]cm [RIGHT]cm [BOTTOMcm}[/color][/color][/color]

            No idea if this has anything to do with how the spec was
            arrived at, but the order of Top/Right/Bottom/Left makes
            a lot of sense if you think of using a pencil to draw
            a "box"(i.e. a rectangle). Start with the pencil on the paper.
            Draw the "top of the box". Many(most?) people will draw
            a line from left to right. Now keep drawing the other sides.
            Many(most?) people will draw the top, right, bottom, and
            then left sides.

            --
            Dave Patton
            Canadian Coordinator, Degree Confluence Project
            The Degree Confluence Project contains photographs of the intersections of integer latitude and longitude degree lines.

            My website: http://members.shaw.ca/davepatton/

            Comment

            • Andy

              #7
              Re: Margin, padding, border, shorthand values order?

              Dave Patton <spam@trap.inva lid> wrote in
              news:Xns96029F0 8E6F0Emrzaphodd irectcaold@24.7 1.223.159:
              [color=blue]
              > No idea if this has anything to do with how the spec was
              > arrived at, but the order of Top/Right/Bottom/Left makes
              > a lot of sense if you think of using a pencil to draw
              > a "box"(i.e. a rectangle). Start with the pencil on the paper.
              > Draw the "top of the box". Many(most?) people will draw
              > a line from left to right. Now keep drawing the other sides.
              > Many(most?) people will draw the top, right, bottom, and
              > then left sides.
              >[/color]

              Dave,

              That's plausible.

              Which seems more logical?

              A: [T [R B] L]
              B: [T [L R] B]

              Regards,

              Andy

              --
              "Ladies and gentlemen, The Beatles!"
              - Ed Sullivan (1964)

              Comment

              • Jan Roland Eriksson

                #8
                Re: Margin, padding, border, shorthand values order?

                On Sat, 19 Feb 2005 18:22:04 -0600, Andy <nospm@nowhere. com> wrote:

                [...]
                [color=blue]
                >Which seems more logical?
                >A: [T [R B] L]
                >B: [T [L R] B][/color]

                Doesn't matter to me. I worked in a lead print shop in the very early
                1970'ies and I can't recall that we had any kind of preferences in how
                to setup and divide a print frame into logical parts.

                You're too computer fixated (QuarkXPress by any chance? :-)

                --
                Rex


                Comment

                • Andy

                  #9
                  Re: Margin, padding, border, shorthand values order?

                  Jan Roland Eriksson <jrexon@newsguy .com> wrote in
                  news:hvtf119sm4 hh9tftl5tsgmsho fko21jq22@4ax.c om:
                  [color=blue]
                  > On Sat, 19 Feb 2005 18:22:04 -0600, Andy <nospm@nowhere. com> wrote:
                  >
                  > [...]
                  >[color=green]
                  >>Which seems more logical?
                  >>A: [T [R B] L]
                  >>B: [T [L R] B][/color]
                  >
                  > Doesn't matter to me. I worked in a lead print shop in the very early
                  > 1970'ies and I can't recall that we had any kind of preferences in how
                  > to setup and divide a print frame into logical parts.[/color]


                  Jan,

                  It doesn't matter because you can't recall?

                  In a chase you either placed furniture in a [T [L R] B] or [L [T B] R]
                  fashion then locked it up.

                  [color=blue]
                  > You're too computer fixated (QuarkXPress by any chance? :-)[/color]

                  Since you asked, Adobe PostScript, 1985.

                  Andy Burns

                  Comment

                  • Harlan Messinger

                    #10
                    Re: Margin, padding, border, shorthand values order?

                    Andy wrote:[color=blue]
                    >
                    > Which seems more logical?
                    >
                    > A: [T [R B] L]
                    > B: [T [L R] B][/color]

                    I think that each makes sense but that B only makes sense in a context
                    that's inapplicable here: a written page where writing starts at the
                    top, and runs from left to right on each line. A makes sense and is easy
                    to remember as well. So what difference does it make? They had to choose
                    an order and they chose one.

                    Comment

                    Working...