Skip to content

Commit

Permalink
Reorganize CSS files to allow overrides by the user
Browse files Browse the repository at this point in the history
We want to allow the user to override CSS styles with the custom.css
files. Any directive that follows the custom.css import cannot be
overridden. And because import directives must be at the start of the
file, we cannot move the import to the end of the file.
  • Loading branch information
buchen committed Dec 31, 2024
1 parent 478f2ad commit 1e1a9b9
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion name.abuchen.portfolio.ui/css/dark_linux.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/dark.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/linux.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/linux/linux.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
15 changes: 3 additions & 12 deletions name.abuchen.portfolio.ui/css/dark_mac.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/dark.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac/mac.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");

/*
Hide lines in macOS dark mode because SWT table and trees flash white
when dragging columns and/or expanding/collapsing nodes.
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac/dark.css");

See https://github.com/eclipse-platform/eclipse.platform.swt/issues/273
*/
Table,
Tree {
swt-lines-visible: false;
}
@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
9 changes: 3 additions & 6 deletions name.abuchen.portfolio.ui/css/dark_win.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/dark.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/win.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/win/win.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/win/dark.css");

Table,
Tree {
swt-lines-visible: false;
}
@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
2 changes: 1 addition & 1 deletion name.abuchen.portfolio.ui/css/light_linux.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/light.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/linux.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/linux/linux.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
8 changes: 3 additions & 5 deletions name.abuchen.portfolio.ui/css/light_mac.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/light.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac/mac.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/mac/light.css");

CTabFolder {
swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END';
}
@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
2 changes: 1 addition & 1 deletion name.abuchen.portfolio.ui/css/light_win.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/light.css");

@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/win.css");
@import url("platform:/plugin/name.abuchen.portfolio.ui/css/shared/win/win.css");

@import url("platform:/meta/name.abuchen.portfolio.ui/custom.css");
10 changes: 10 additions & 0 deletions name.abuchen.portfolio.ui/css/shared/mac/dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Hide lines in macOS dark mode because SWT table and trees flash white
when dragging columns and/or expanding/collapsing nodes.
See https://github.com/eclipse-platform/eclipse.platform.swt/issues/273
*/
Table,
Tree {
swt-lines-visible: false;
}
3 changes: 3 additions & 0 deletions name.abuchen.portfolio.ui/css/shared/mac/light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CTabFolder {
swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END';
}
4 changes: 4 additions & 0 deletions name.abuchen.portfolio.ui/css/shared/win/dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Table,
Tree {
swt-lines-visible: false;
}

0 comments on commit 1e1a9b9

Please sign in to comment.