Reset form control style

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

    Reset form control style

    Hi,

    I've run across a problem styling form controls (quel surprise), or rather
    in this case, "unstyling" them. I'm trying to put together a theme for a
    web application which has a fairly primitive theme engine. Specifically, I
    can define *additional* CSS rules using the theme engine, but I can't
    remove the pre-existing ones that come with the application.

    For the vast majority of the theme this hasn't been a problem given that
    overriding stuff with CSS is hardly difficult. However, the base CSS rules
    apply styles to most form controls (buttons, text areas, etc). I'd like to
    override this to get the browser to render the form controls in the
    "default" style, i.e. the way it would render them without any CSS rules
    applied (usually the OS style in things like Opera, IE, Safari, etc).

    Unfortunately, I haven't found any way of doing this - either in a
    portable "clean" manner, or even in a browser-specific manner. I suspect
    the answer is "you can't", but it doesn't hurt to check with the experts
    :-)


    Cheers,

    Dave.
  • rf

    #2
    Re: Reset form control style


    "Dave Hughes" <dave@waveform. plus.comwrote in message
    news:op.t3orfgz zbln7lx@stewie. waveform.plus.c om...
    Hi,
    >
    I've run across a problem styling form controls (quel surprise), or rather
    in this case, "unstyling" them. I'm trying to put together a theme for a
    web application which has a fairly primitive theme engine. Specifically, I
    can define *additional* CSS rules using the theme engine, but I can't
    remove the pre-existing ones that come with the application.
    Yes you can. Just use an additional rule specifying the default or initial
    value. For example if the drezigner who designed the "applicatio n" specified
    line-height as some number of pixels then specify line-height: normal;, the
    initial value for this property.

    --
    Richard.


    Comment

    • Jukka K. Korpela

      #3
      Re: Reset form control style

      Scripsit Dave Hughes:
      I'm trying to put together a
      theme for a web application which has a fairly primitive theme
      engine.
      Just don't do that. Problem solved. Check some articles on usability.
      The basic presentation of forms should be uniform _across the web_ to
      serve the purpose of smooth _interaction_, rather than the dee-ziner's
      artistic self-expression.
      Specifically, I can define *additional* CSS rules using the
      theme engine, but I can't remove the pre-existing ones that come with
      the application.
      What "applicatio n"? The browser? What _other_ "applicatio ns" underlie on
      the web?
      I'd like to override this to get the browser to render the form
      controls in the "default" style, i.e. the way it would render them
      without any CSS rules applied (usually the OS style in things like
      Opera, IE, Safari, etc).
      Just don't use "themes" for forms, mm'kay?
      Unfortunately, I haven't found any way of doing this - either in a
      portable "clean" manner, or even in a browser-specific manner.
      There isn't, except perhaps in a highly browser-specific manner, and
      usually not even that.

      --
      Jukka K. Korpela ("Yucca")


      Comment

      • Dave Hughes

        #4
        Re: Reset form control style

        On Fri, 21 Dec 2007 14:31:12 -0000, Jukka K. Korpela <jkorpela@cs.tu t.fi>
        wrote:
        Scripsit Dave Hughes:
        >
        >I'm trying to put together a
        >theme for a web application which has a fairly primitive theme
        >engine.
        >
        Just don't do that. Problem solved. Check some articles on usability.
        The basic presentation of forms should be uniform _across the web_ to
        serve the purpose of smooth _interaction_, rather than the dee-ziner's
        artistic self-expression.
        I agree entirely. In fact, that's the problem...
        >Specifically , I can define *additional* CSS rules using the
        >theme engine, but I can't remove the pre-existing ones that come with
        >the application.
        >
        What "applicatio n"? The browser? What _other_ "applicatio ns" underlie on
        the web?
        Perhaps "web application" is wrong phrase in this context, although I'm
        not currently aware of a widely accepted alternative (at least in my
        domain as a software developer). Anyway, the "web application" in question
        is Trac (http://trac.edgewall.org/), specifically version 0.10.
        >I'd like to override this to get the browser to render the form
        >controls in the "default" style, i.e. the way it would render them
        >without any CSS rules applied (usually the OS style in things like
        >Opera, IE, Safari, etc).
        >
        Just don't use "themes" for forms, mm'kay?
        Indeed - Trac by default styles its forms (e.g. see
        http://trac.edgewall.org/newticket), and I want *remove* the styling. I
        don't actually think the default style is "bad" exactly (it's far from the
        worst I've seen), but in the interest of usability I'd like to use the
        browser's default style of controls as it's what the user is most likely
        to be familiar with (especially in the case of browsers that use the OS to
        render unstyled form controls).

        Unfortunately, Trac 0.10's theme engine only allows one to define
        *additional* stylesheets - one cannot remove the existing stylesheets
        shipped with the application. Obviously, one could remove or edit the
        stylesheets on a given installation but that's outside the purview of the
        theme engine (and would break the ability to easily revert to the default
        style should the administrator wish to do so).
        >Unfortunatel y, I haven't found any way of doing this - either in a
        >portable "clean" manner, or even in a browser-specific manner.
        >
        There isn't, except perhaps in a highly browser-specific manner, and
        usually not even that.
        I'm aware this is the case for styling form controls, but I was hoping
        (probably stupidly :-) that it might not be the case for "unstyling" them.
        Given that I couldn't seem to find anything on overriding form control
        styles to reset them to the browser's default (beyond "delete the rules"),
        I was hoping I'd missed something obvious.


        Thanks,

        Dave.

        Comment

        Working...