Skip to content

Commit

Permalink
chore: add xxs breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco committed Oct 23, 2023
1 parent 4a8106f commit bd6c5a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/calcite-components/src/utils/responsive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ describe("getBreakpoints()", () => {
document.head.innerHTML = `
<style>
:root {
--calcite-app-breakpoint-width-lg: 1000px;
--calcite-app-breakpoint-width-md: 100px;
--calcite-app-breakpoint-width-sm: 10px;
--calcite-app-breakpoint-width-xs: 1px;
--calcite-app-breakpoint-width-lg: 10000px;
--calcite-app-breakpoint-width-md: 1000px;
--calcite-app-breakpoint-width-sm: 100px;
--calcite-app-breakpoint-width-xs: 10px;
--calcite-app-breakpoint-width-xxs: 1px;
}
</style>
`;
Expand All @@ -22,6 +23,7 @@ describe("getBreakpoints()", () => {
medium: toBeInteger(),
small: toBeInteger(),
xsmall: toBeInteger(),
xxsmall: toBeInteger(),
},
});
});
Expand Down
2 changes: 2 additions & 0 deletions packages/calcite-components/src/utils/responsive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface Breakpoints {
medium: number;
small: number;
xsmall: number;
xxsmall: number;
};
}

Expand Down Expand Up @@ -35,6 +36,7 @@ export async function getBreakpoints(): Promise<Breakpoints> {
medium: breakpointTokenToNumericalValue(rootStyles, "--calcite-app-breakpoint-width-md"),
small: breakpointTokenToNumericalValue(rootStyles, "--calcite-app-breakpoint-width-sm"),
xsmall: breakpointTokenToNumericalValue(rootStyles, "--calcite-app-breakpoint-width-xs"),
xxsmall: breakpointTokenToNumericalValue(rootStyles, "--calcite-app-breakpoint-width-xxs"),
},
});
});
Expand Down
1 change: 1 addition & 0 deletions support/dictionaries/dict-calcite-design-system.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ tibt

## sizing
xsmall
xxsmall

## svg
svgs
Expand Down

0 comments on commit bd6c5a2

Please sign in to comment.