Update css names of user breakpoints

This commit is contained in:
Amelia 2025-06-14 16:39:45 +02:00
parent ea2549fdf2
commit 1be91e6c39
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
2 changed files with 7 additions and 7 deletions

View file

@ -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 { export enum Breakpoint {
Mobile = 768, Mobile = 768,
@ -173,9 +173,9 @@ export class UtilityService {
private getActiveUserBreakpoint(): UserBreakpoint { private getActiveUserBreakpoint(): UserBreakpoint {
const style = getComputedStyle(this.document.body) const style = getComputedStyle(this.document.body)
const mobileBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--mobile-breakpoint'), Breakpoint.Mobile); const mobileBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-mobile-breakpoint'), Breakpoint.Mobile);
const tabletBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--tablet-breakpoint'), Breakpoint.Tablet); const tabletBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-tablet-breakpoint'), Breakpoint.Tablet);
//const desktopBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--desktop-breakpoint'), Breakpoint.Desktop); //const desktopBreakPoint = this.parseOrDefault<number>(style.getPropertyValue('--setting-desktop-breakpoint'), Breakpoint.Desktop);
if (window.innerWidth <= mobileBreakPoint) { if (window.innerWidth <= mobileBreakPoint) {
return UserBreakpoint.Mobile; return UserBreakpoint.Mobile;

View file

@ -444,8 +444,8 @@
--input-hint-text-color: lightgrey; --input-hint-text-color: lightgrey;
/** Breakpoint **/ /** Breakpoint **/
--mobile-breakpoint: 768; --setting-mobile-breakpoint: 768;
--tablet-breakpoint: 1280; --setting-tablet-breakpoint: 1280;
--desktop-breakpoint: 1440; --setting-desktop-breakpoint: 1440;
} }