I have two questions:

First, I'm looking for rules for parsing "background:".

Obviously, not all background properties need to be included.

    background: red;  # just set the color


And, at least in my quick test with Firefox, it seems the order of the
properties doesn't matter.  i.e.:

    background: 10px url(foo.gif) red center no-repeat;

seems to work.

So, it would seem I just need to parse left to right and determine the
type of the property by what it looks like.  "10px" is obviously a
position.

But, every background-* property also supports "inherit", so how do I
know which property that is associated with?

What does this mean:

    background-color: red;
    background: inherit;

or
    background: #eee inherit


Second question:

Can I safely convert all the background-* properties into a shortcut?

That is, can I change:

    .foo {
        background-image: url(foo.gif);
        background-color: red
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: bottom;
    }

Into this?

    .foo {
        background: red url(foo.gif) no-repeat fixed bottom;
    }

But what if I have this:


    .foo {
        background-image: url(foo.gif);
        background-color: red
        background-repeat: no-repeat;
        background-attachment: inherit;
        background-position: inherit;
    }

And what about !important?

    .foo {
        background-image: url(foo.gif);
        background-color: red !important
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: bottom;
    }

How would that !important be written in the background: property?
Does it just apply to the color?


Thanks,




-- 
Bill Moseley
[EMAIL PROTECTED]
Sent from my iMutt

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to