Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 430052

Summary: [CSS] Imported rules cannot be overridden
Product: [Eclipse Project] Platform Reporter: Andrea Guarinoni <andrea.guarinoni>
Component: UIAssignee: Paul Webster <pwebster>
Status: CLOSED DUPLICATE QA Contact: Daniel Rolka <daniel.rolka>
Severity: normal    
Priority: P3 CC: andrea.guarinoni, psuzzi, stefan
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrea Guarinoni CLA 2014-03-10 17:59:53 EDT
Eg. If you have

> first-style.css:
  .ClassAlpha {
     property: value;
  }
  .ClassBeta {
     property: value1;
  }

> second-style.css:
  @import url('first-style.css');
  .ClassBeta {
     property: value2;
  }

You should see that the imported styles are loaded but that the new rule for '.ClassBeta' is not updated.
If instead of using the import, you copy paste the content of 'first-style.css' followed by the rule written in 'second-style.css' you should notice that 'value2' will be applied to '.ClassBeta' property.

The @import statement should work as a copy-paste, instead, it currently does not allow the overriding of a rule that is already set into one of the imported stylesheets.

(currently, a user/developer cannot import a stylesheet as a base template for its application and then change only few properties according to his needs)
Comment 1 Stefan Winkler CLA 2014-04-03 08:22:46 EDT
I cannot reproduce the scenario described in the error report.
See testcase in gerrit: https://git.eclipse.org/r/24381

The testcases passes.
Comment 2 Paul Webster CLA 2014-04-04 16:08:12 EDT
Testcase released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e0c09f30121476543962345ea93f3812de09f6b3

Thanks Stefan.

If you can modify the testcase so it fails, please re-open the bug or open a new one.

PW
Comment 3 Patrik Suzzi CLA 2016-09-09 08:38:53 EDT
Marking as duplicate of bug 500402

The error happened only when exporting the project, when resolving imported URLs in archived format.

*** This bug has been marked as a duplicate of bug 500402 ***