wildcards and the case for setting all default styles

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

    wildcards and the case for setting all default styles

    I tend to be a bit behind the times, sometimes a generation further
    that I want.

    So, I've been thing about the "*" selector. I've noticed that unlike
    body, it styles form fields and form elements. Unless I'm missing
    something here, it seems like setting a wildcard font-family and perhaps
    color is a good thing. I'm not sure what else you'd default with that
    as setting % sizes,margins and borders on everything would be a mess.

    The question for me is: What about taking form fields out of
    monospace? Unless you have some wild body font, why not have them the
    same font family as the body text?

    Perhaps something like this:

    <style type="text/css">
    *{font-family: Tahoma, Geneva, sans-serif}
    body{color: #234567}

    #form_table{wid th: 500px
    ... border stuff
    }
    #form_table tr td:first-child{
    text-align: right;
    width: 10em;
    padding-right: 1em;
    }

    input{width: 100%}
    </style>

    ....

    <table id="form_table" >

    <tr><td><labe l for="field 1">Field 1</label></td><td><input type="text"
    size="4" name="field_1"> </td></tr>

    ....

    We all write a lot of forms, and I'm just trying to get some idea of
    the state of the form. What styling gets in the way of usability? I'd
    like to move beyond plain jane.

    Jeff

  • Bergamot

    #2
    Re: wildcards and the case for setting all default styles

    Jeff wrote:
    >
    So, I've been thing about the "*" selector. I've noticed that unlike
    body, it styles form fields and form elements. Unless I'm missing
    something here, it seems like setting a wildcard font-family and perhaps
    color is a good thing.
    I've found very little use for the * universal selector.

    Set your default colors and font styles on the body element, and don't
    bother with *.
    I'm not sure what else you'd default with that
    as setting % sizes,margins and borders on everything would be a mess.
    Indeed, and is why I don't use it. More often than not you end up having
    to over specify everything, which makes the stylesheet unnecessarily
    bloated and a pain to maintain.
    The question for me is: What about taking form fields out of
    monospace? Unless you have some wild body font, why not have them the
    same font family as the body text?
    Why not let them default to what the user is accustomed to seeing?
    We all write a lot of forms, and I'm just trying to get some idea of
    the state of the form. What styling gets in the way of usability?
    Pretty much any of it. ;)

    Leaving form controls at the browser defaults is best for usability
    because that is what the user is accustomed to. I've seen a lot of forms
    where the "3d" borders are flattened or some other styling is used to
    make them look kewl. Many times this just ends up confusing because they
    no longer look like form fields.
    I'd
    like to move beyond plain jane.
    Nothing wrong with plain jane as far as forms go, IMO.
    Just don't go overboard.

    --
    Berg

    Comment

    Working...