Skip to content

Commit

Permalink
BC-7168 Follow-up: Additions for a good working customized Material D…
Browse files Browse the repository at this point in the history
…esign System (#3325)

Add surface-light and on-surface-light variables in order to create a uniform design system according to Material Design principles.

* add surface light and on surface light variables for all themes
* adjust color content element bar
  • Loading branch information
NFriedo committed Jul 12, 2024
1 parent 3573c56 commit 4ffa434
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe("ContentElementBar", () => {
});

describe("when hasGreyBackground prop is true", () => {
it("should render grey background", () => {
it("should render surface-light background", () => {
const { wrapper } = setup(
{
hasGreyBackground: true,
Expand All @@ -158,17 +158,17 @@ describe("ContentElementBar", () => {
}
);

const divWithBackgroundClass = wrapper.find("div.bg-grey-lighten-4");
const divWithBackgroundClass = wrapper.find("div.bg-surface-light");

expect(divWithBackgroundClass.exists()).toBe(true);
});
});

describe("when hasGreyBackground prop is false", () => {
it("should not render grey background", () => {
it("should not render surface-light background", () => {
const { wrapper } = setup({});

const divWithBackgroundClass = wrapper.find("div.bg-grey-lighten-4");
const divWithBackgroundClass = wrapper.find("div.bg-surface-light");

expect(divWithBackgroundClass.exists()).toBe(false);
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ui/board/content-element/ContentElementBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
v-if="
$slots.title || $slots.element || $slots.subtitle || $slots.description
"
:class="{ 'bg-grey-lighten-4': props.hasGreyBackground === true }"
:class="{ 'bg-surface-light': props.hasGreyBackground === true }"
class="content-element-bar-texts rounded-b py-4"
>
<div
Expand Down
2 changes: 2 additions & 0 deletions src/themes/brb/vuetify.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const brbTheme: ThemeDefinition = {
accent: "#e4032e",
"on-surface": "#294c5a",
"on-background": "#294c5a",
"surface-light": "#f2f4f5",
"on-surface-light": "#294c5a",
"on-white": "#294c5a",
},
};
Expand Down
2 changes: 2 additions & 0 deletions src/themes/n21/vuetify.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const n21Theme: ThemeDefinition = {
"on-surface": "#0f3551",
"on-background": "#0f3551",
"on-white": "#0f3551",
"surface-light": "#f1f3f5",
"on-surface-light": "#0f3551",
},
};

Expand Down
2 changes: 2 additions & 0 deletions src/themes/thr/vuetify.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const thrTheme: ThemeDefinition = {
accent: "#f56b00",
"on-surface": "#0f3551",
"on-background": "#0f3551",
"surface-light": "#f1f3f5",
"on-surface-light": "#0f3551",
"on-white": "#0f3551",
},
};
Expand Down
2 changes: 2 additions & 0 deletions src/vuetify.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const defaultTheme: ThemeDefinition = {
"on-surface": "#3a424b",
"on-background": "#3a424b",
"on-white": "#3a424b",
"surface-light": "#f3f4f4",
"on-surface-light": "#3a424b",
},
};

Expand Down

0 comments on commit 4ffa434

Please sign in to comment.