From 4acc6b47d2a7dfd74fdd18665265453e8654d6ed Mon Sep 17 00:00:00 2001 From: shubhamsharma9199 Date: Thu, 20 Nov 2025 17:41:55 +0530 Subject: [PATCH] refactor: improve navigation component CSS --- src/app/navigation/navigation.component.scss | 53 +++++++++++++++++ .../office-navigation.component.html | 40 ++++--------- .../office-navigation.component.scss | 59 ++++++++++++++++--- 3 files changed, 116 insertions(+), 36 deletions(-) diff --git a/src/app/navigation/navigation.component.scss b/src/app/navigation/navigation.component.scss index e69de29bb..1252090d0 100644 --- a/src/app/navigation/navigation.component.scss +++ b/src/app/navigation/navigation.component.scss @@ -0,0 +1,53 @@ +// Component-specific styles - minimal overrides +// Leverages global layout classes from main.scss + +:host { + display: block; +} + +.container { + width: 100%; +} + +// Using existing .layout-row-wrap.responsive-column from global styles +// Only adding specific alignment needed for this component +.layout-row-wrap.responsive-column { + align-items: flex-start; +} + +// Extending global .flex-48 with min-width constraint for this component +.flex-48 { + min-width: 20rem; + + @media (width >= 1200px) { + flex-basis: 48%; + } +} + +mat-card { + padding: 1rem; + border-radius: 0.5rem; + overflow: hidden; +} + +mat-card-content { + display: grid; + grid-template-columns: 100%; + + @media (width >= 768px) { + grid-template-columns: 50% 50%; + } + + @media (width >= 1200px) { + grid-template-columns: 50% 50%; + gap: 1rem; + } +} + +mat-form-field { + width: 100%; +} + +mat-label { + letter-spacing: 0.0125rem; +} diff --git a/src/app/navigation/office-navigation/office-navigation.component.html b/src/app/navigation/office-navigation/office-navigation.component.html index 8c52dcebf..b51170c2d 100644 --- a/src/app/navigation/office-navigation/office-navigation.component.html +++ b/src/app/navigation/office-navigation/office-navigation.component.html @@ -1,45 +1,31 @@ - - - -
- -

- {{ officeData.name }} -

-
- -

- {{ 'labels.inputs.External Id' | translate }}: -

-
-
+ + + + +

{{ officeData.name }}

+
+
+ {{ 'labels.inputs.External Id' | translate }} +
+
+ +
+
{{ 'labels.inputs.Opened On' | translate }}
-
{{ officeData.openingDate | dateFormat }}
-
- {{ 'labels.inputs.Parent officeData' | translate }} -
- -
- {{ officeData.parentName }} -
-
{{ 'labels.inputs.Number of Staff' | translate }}
-
{{ employeeData ? employeeData.length : '' }}
diff --git a/src/app/navigation/office-navigation/office-navigation.component.scss b/src/app/navigation/office-navigation/office-navigation.component.scss index 2fccc2933..7de4c3a1b 100644 --- a/src/app/navigation/office-navigation/office-navigation.component.scss +++ b/src/app/navigation/office-navigation/office-navigation.component.scss @@ -1,14 +1,55 @@ -h2 { - font-weight: 500; -} +// Component-specific styles - minimal overrides to global styles +// Follows existing patterns from general-tab components -.content { - div { - margin: 1rem 0; - word-wrap: break-word; +mat-card-header { + padding: 1.5rem 1.5rem 1rem; + + h2 { + font-weight: 500; + font-size: 1.5rem; + margin: 0; + line-height: 1.4; + } + + @media (width <= 480px) { + padding: 1rem; + + h2 { + font-size: 1.25rem; + } } } -.main-icon { - margin: 7px 0 0; +mat-card-content { + padding: 1.5rem; + + .layout-row-wrap { + display: grid; + grid-template-columns: 50% 50%; + + @media (width <= 768px) { + grid-template-columns: 100%; + } + } + + .flex-50 { + padding: 0.625rem 0; + display: flex; + align-items: center; + font-size: 0.875rem; + word-wrap: break-word; + line-height: 1.6; + + &.mat-body-strong { + font-weight: 600; + } + + &:not(:last-child, :nth-last-child(2)) { + border-bottom: 1px solid #ddd; + } + } + + @media (width <= 480px) { + padding: 1rem; + } }