ThemeShaper Forums » Thematic

changeing padding to margins in typography

(4 posts)
  • Started 14 years ago by dwenaus
  • Latest reply from Ian Stewart
  • This topic is not a support question
  1. I just completed my first theme from scratch while using thematic. I must say, it was a pleasure. So much is there from the start that makes the whole thing so easy. At one point in the design process I thought. OK, now I've got to style h1, h2, etc. but then I realized it was already done, and all i needed to do was add a few tweaks to size and color and voila! so nice.

    But I did run into a few issues not with thematic structure itself, but with the default css template. And seeing many people will be using this as a starting point I figure it makes sense to improve it.

    First the default css styles are excellent, very clean and elegant typography. However I noticed that many parts of the theme use vertical PADDING to space the elements instead of vertical MARGINS. If there is a padding bottom of 22px and the next element has padding top of 22px, they add together and you get 44px. However if you use margins, then the end result is only 22px.

    I suggest that we change all titles and paragraphs to margins. The main culprits are:
    .entry-content h1, .entry-content h2, .entry-content h3
    #comments, #comments-list ...
    and a few more i believe

    The only reason to keep padding is if you plan to put a background color, but then you'd need padding all around, not just top bottom.

    This change will improve the large often strange gaps that are in the existing theme.

    Let me know if you agree or not and if I should make the change.

    Posted 14 years ago #
  2. I'd have to take a look at it on a case by case basis.

    Posted 14 years ago #
  3. I know for sure the first few are accurate, as I changed them in my new site design:
    .entry-content h1, .entry-content h2, .entry-content h3

    the rest, I just looked at the code and guessed.

    I am thinking typographic elements can be changed to margins while block area elements should keep the padding.

    Posted 14 years ago #
  4. I'd say go for it then. :)

    Posted 14 years ago #

RSS feed for this topic


You must log in to post.