Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@
"remove": true,
"owner": "switch-theme",
"type": "property"
},
{
"name": "$date-selected-current-outline",
"remove": true,
"owner": "calendar-theme",
"type": "property"
},
{
"name": "$date-selected-current-hover-outline",
"remove": true,
"owner": "calendar-theme",
"type": "property"
},
{
"name": "$date-selected-current-focus-outline",
"remove": true,
"owner": "calendar-theme",
"type": "property"
},
{
"name": "$date-special-current-border-color",
"remove": true,
"owner": "calendar-theme",
"type": "property"
}
]
}
23 changes: 23 additions & 0 deletions projects/igniteui-angular/migrations/update-19_2_0/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,27 @@ describe(`Update to ${version}`, () => {
);`
);
});

it('should remove unused properties from the calendar theme', async () => {
const testFilePath = `/testSrc/appPrefix/component/test.component.scss`;

appTree.create(
testFilePath,
`$calendar-theme: calendar-theme(
$date-special-current-border-color: orange,
$date-selected-current-outline: orange,
$date-selected-current-hover-outline: orange,
$date-selected-current-focus-outline: orange,
$content-background: black
);`
);

const tree = await schematicRunner.runSchematic(migrationName, {}, appTree);

expect(tree.readContent(testFilePath)).toEqual(
`$calendar-theme: calendar-theme(
$content-background: black
);`
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
/// @param {Color} $date-selected-current-range-focus-foreground [null] - The :focus foreground of the current date in the selected range.
/// @param {Color} $date-selected-current-range-focus-background [null] - The :focus background of the current date in the selected range.
///
/// @param {Color} $date-selected-current-outline [null] - The outline of the current selected date.
/// @param {Color} $date-selected-current-hover-outline [null] - The :hover outline of the current selected date.
/// @param {Color} $date-selected-current-focus-outline [null] - The :focus outline of the current selected date.
///
/// @param {Color} $date-selected-special-border-color: [null] - The border color of the selected special date,
/// @param {Color} $date-selected-special-hover-border-color: [null] - The :hover border color of the selected special date,
/// @param {Color} $date-selected-special-focus-border-color: [null] - The :focus border color of the selected special date,
Expand All @@ -137,8 +133,6 @@
/// @param {Color} $date-special-range-foreground [null] - The foreground of the dates inside a range and marked as special.
/// @param {Color} $date-special-range-border-color [null] - The outline of the dates inside a range and marked as special.
///
/// @param {Color} $date-special-current-border-color [null] - The outline color of a special current date.
///
/// @param {Color} $border-color [null] - The calendar border color.
///
/// @param {Color} $date-border-color [null] - The border color of the date.
Expand Down Expand Up @@ -282,10 +276,6 @@
$date-selected-current-hover-border-color: null,
$date-selected-current-focus-border-color: null,

$date-selected-current-outline: null,
$date-selected-current-hover-outline: null,
$date-selected-current-focus-outline: null,

$date-selected-special-border-color: null,
$date-selected-special-hover-border-color: null,
$date-selected-special-focus-border-color: null,
Expand All @@ -310,7 +300,6 @@
$date-special-range-focus-background: null,
$date-special-range-foreground: null,
$date-special-range-border-color: null,
$date-special-current-border-color: null,
$date-disabled-foreground: null,
$date-disabled-range-foreground: null,

Expand Down Expand Up @@ -400,26 +389,6 @@
}
}

@if $variant == 'material' or $variant == 'indigo' {
@if not($date-selected-current-outline) and $content-background {
@if meta.type-of($content-background) == 'color' {
$date-selected-current-outline: $content-background;
}
}

@if not($date-selected-current-hover-outline) and $content-background {
@if meta.type-of($content-background) == 'color' {
$date-selected-current-hover-outline: $content-background;
}
}

@if not($date-selected-current-focus-outline) and $content-background {
@if meta.type-of($content-background) == 'color' {
$date-selected-current-focus-outline: $content-background;
}
}
}

@if not($content-foreground) and $content-background {
@if meta.type-of($content-background) == 'color' {
$content-foreground: text-contrast($content-background);
Expand Down Expand Up @@ -640,10 +609,6 @@
date-selected-current-hover-foreground: $date-selected-current-hover-foreground,
date-selected-current-focus-foreground: $date-selected-current-focus-foreground,

date-selected-current-outline: $date-selected-current-outline,
date-selected-current-hover-outline: $date-selected-current-hover-outline,
date-selected-current-focus-outline: $date-selected-current-focus-outline,

date-selected-special-border-color: $date-selected-special-border-color,
date-selected-special-hover-border-color: $date-selected-special-hover-border-color,
date-selected-special-focus-border-color: $date-selected-special-focus-border-color,
Expand Down
Loading