Update css names of user breakpoints
This commit is contained in:
parent
ea2549fdf2
commit
1be91e6c39
2 changed files with 7 additions and 7 deletions
|
|
@ -30,7 +30,7 @@ export enum KEY_CODES {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link UserBreakpoint} and {@link UtilityService.activeUserBreakpoint}
|
||||
* Use {@link UserBreakpoint} and {@link UtilityService.activeUserBreakpoint} for breakpoint that should depend on user settings
|
||||
*/
|
||||
export enum Breakpoint {
|
||||
Mobile = 768,
|
||||
|
|
@ -173,9 +173,9 @@ export class UtilityService {
|
|||
|
||||
private getActiveUserBreakpoint(): UserBreakpoint {
|
||||
const style = getComputedStyle(this.document.body)
|
||||
const mobileBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--mobile-breakpoint'), Breakpoint.Mobile);
|
||||
const tabletBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--tablet-breakpoint'), Breakpoint.Tablet);
|
||||
//const desktopBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--desktop-breakpoint'), Breakpoint.Desktop);
|
||||
const mobileBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-mobile-breakpoint'), Breakpoint.Mobile);
|
||||
const tabletBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-tablet-breakpoint'), Breakpoint.Tablet);
|
||||
//const desktopBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-desktop-breakpoint'), Breakpoint.Desktop);
|
||||
|
||||
if (window.innerWidth <= mobileBreakPoint) {
|
||||
return UserBreakpoint.Mobile;
|
||||
|
|
|
|||
|
|
@ -444,8 +444,8 @@
|
|||
--input-hint-text-color: lightgrey;
|
||||
|
||||
/** Breakpoint **/
|
||||
--mobile-breakpoint: 768;
|
||||
--tablet-breakpoint: 1280;
|
||||
--desktop-breakpoint: 1440;
|
||||
--setting-mobile-breakpoint: 768;
|
||||
--setting-tablet-breakpoint: 1280;
|
||||
--setting-desktop-breakpoint: 1440;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue