maqetta/maqetta — Issue #1770: Shorthand logic sometimes doesn't find correct style rule in CSS file
Author: JonFerraiolo
Created: 2012-02-17 22:46:10+00:00
State: open
Labels: Priority Med, Properties View

@childsb (Long-standing bug)

If you target a CSS rule within a CSS stylesheet using a shorthand property such as 'border' and there are existing style rules in that stylesheet for one of its component properties (eg, 'border-top-width'), the logic won't find that rule and will add a new rule for the shorthand at the end of the file, which causes the shorthand rule (e.g., border:1px solid red) to override any rules that contain component property definitions earlier in file (e.g., border-top-width:3px).

* New HTML File
* Add HTML SELECT
* Put class 'bbb' on SELECT
* In Properties palette, set the following rules, all targeting the 'bbb' class rule in app.css:
* border-top-width:3px
* border-style: dashed
* border-top: 1px solid green
* border: 2px dotted yellow

Result=> app.css will have 4 new rules, showing the properties listed above (in same order as above). Instead, there should be a single rule with all 4 property definitions, and the first property should be 'border' and the last property should be 'border-top-width'