Box model doesn't apply changes if corresponding rules were disabled in ruleview

NEW
Unassigned

Status

DevTools
Computed Styles Inspector
P2
normal
2 years ago
12 days ago

People

(Reporter: arni2033, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open data:text/html,<div style="/* margin-top:1px */">A<style>div{background:gray;margin-top:100px}
2. Open inspector, switch to box model in sidebar, then select <div> element
3. Click on margin-top, type "200 !important", press Enter

AR:  No visible action
ER:  Either X or Y
 X) Box model should change the rule "margin-top" and enable that rule
 Y) Box model should explain why there's no visible action

Please  (1) improve the summary  (2) look carefully at this bug - probably it's expected behavior
(Reporter)

Updated

2 years ago
No longer blocks: 1277113
(Reporter)

Updated

2 years ago
Component: Untriaged → Developer Tools: Computed Styles Inspector
Changing values in the box-model only changes the inline-style (style="" attribute) of elements.
I don't remember exactly the reasoning behind this just now, but I don't think we should change this.
If we did change it to instead modify the source css rule then STR_1 would work. The div{} rule within the <style> stylesheet would be modified instead of the inline style.

So, let's assume we keep on updating the inline-style here. We have 2 solutions:
- Either enable the declaration (X) by removing the comment around it, but that might be hard if the comment contains more than 1 declaration.
- Or just append a new margin-top:200px to the end of the inline-style.

I don't think we should do the proposed solution Y. The box-model offers edition, so editing should just work.
Priority: -- → P2

Updated

12 days ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.