GGAlanSmithee / css-objectifier

creates javascript ojects from a css style sheet
MIT License
4 stars 2 forks source link

!important #1

Closed GGAlanSmithee closed 8 years ago

GGAlanSmithee commented 8 years ago

Figure out how to handle !important styles.

CSS syntax guidelines CSS syntax guidelines easy read

if `declaration.property` already exists for `selector`
    if old `declaration.value` is `!important`
        if new `declaration.value` is !important`
            override existing `declaration.value` for `selector`
        else
            keep existing `declaration.value` for `selector`
    else
        override existing `declaration.value` for `selector`
else
    add `declaration.property` with `declaration.value` on `selector`
GGAlanSmithee commented 8 years ago

This issue will be resolved in #2, using regex to find !important styles.

GGAlanSmithee commented 8 years ago

Closing this, since this is covered by the above-mentioned issue