Files
WebApp/src/styles.scss
T

153 lines
5.3 KiB
SCSS

@use '@angular/material' as mat;
@use './theme-colors' as brand;
:root {
--color-primary: #a8c243;
--color-text: #081839;
--color-text-secondary: #7a7a7a;
--color-background: #f7f8f6;
--color-surface: #ffffff;
--color-border: #e3e7df;
--color-step: #f0f3e8;
--font-body: 'Roboto', sans-serif;
--font-heading: 'Rajdhani', 'Roboto Condensed', 'Arial Narrow', sans-serif;
--site-header-height: 72px;
/* Spacing scale on a 4px grid. Use these for padding, margins and gaps
instead of one-off px values. */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-7: 32px;
--space-8: 48px;
--space-9: 64px;
/* Aliases for the tokens used by `features/indicadores`. */
--issste-text: var(--color-text);
--issste-text-secondary: var(--color-text-secondary);
--issste-background: var(--color-background);
--issste-surface: var(--color-surface);
--issste-border: var(--color-border);
--issste-accent: var(--color-primary);
--issste-on-accent: var(--color-text);
--issste-font-heading: var(--font-heading);
--issste-font-body: var(--font-body);
--issste-space-1: var(--space-1);
--issste-space-2: var(--space-2);
--issste-space-3: var(--space-3);
--issste-space-4: var(--space-4);
--issste-space-6: var(--space-6);
--issste-radius: var(--mat-sys-corner-medium);
}
/* The indicators experience: Roboto headings and square corners with a slight rounding (no pills), as in the
reference. Scoped to the pages with the indicators header; `body` so that overlays (menus, selects, dialogs)
share it. Rajdhani stays the heading font of the other routes. */
body:has(.app-shell--indicadores) {
--issste-font-heading: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
--issste-radius: 4px;
--mat-sys-corner-extra-small: 2px;
--mat-sys-corner-small: 2px;
--mat-sys-corner-medium: 4px;
--mat-sys-corner-large: 4px;
--mat-sys-corner-extra-large: 6px;
--mat-sys-corner-full: 4px;
}
html {
height: 100%;
@include mat.theme(
(
// Brand palettes from _theme-colors.scss (lime #a8c243, teal #5f9ea0).
// Material picks accessible tones from them, so filled buttons use the
// darker olive rather than the raw lime.
color: (
primary: brand.$primary-palette,
tertiary: brand.$tertiary-palette,
),
typography: Roboto,
density: 0,
)
);
}
body {
color-scheme: light;
background: var(--color-background);
color: var(--color-text);
font-family: var(--font-body);
margin: 0;
min-height: 100%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (max-width: 600px) {
:root {
--site-header-height: 64px;
}
}
/* CDK drag previews are appended to <body>, outside any component's styles. */
.drag-preview {
align-items: center;
background: var(--mat-sys-surface);
border: 1px solid var(--mat-sys-primary);
border-radius: var(--mat-sys-corner-small);
box-shadow: var(--mat-sys-level3);
color: var(--mat-sys-on-surface);
display: inline-flex;
font: var(--mat-sys-label-large);
gap: 8px;
max-width: 320px;
padding: 8px 12px;
white-space: nowrap;
mat-icon {
color: var(--mat-sys-primary);
font-size: 18px;
height: 18px;
width: 18px;
}
}
.cdk-drag-animating {
transition: transform 200ms cubic-bezier(0, 0, 0.2, 1);
}
/* Global rules of the indicators dashboard: its floating navigation trigger
and overlay live outside the component's own styles. */
:root {
--issste-header-clearance: 7rem;
}
.dashboard .catalog-grid > app-indicador-catalog-card { scroll-margin-top: var(--issste-header-clearance, 6rem); }
// «Ir» link inside each option of the indicator selector (the panel renders in the CDK overlay).
.indicator-select-panel .mdc-list-item__primary-text { flex: 1; min-width: 0; }
.indicator-select-panel .option-row { display: flex; align-items: center; gap: .75rem; width: 100%; }
.indicator-select-panel .option-title { flex: 1; min-width: 0; }
.indicator-select-panel .option-go { flex: none; padding: .25rem .6rem; border: 1px solid var(--issste-border); border-radius: var(--issste-radius);
color: var(--issste-text); background: var(--issste-surface); font-weight: 600; text-decoration: none; }
.indicator-select-panel .option-go:hover { background: var(--issste-accent); }
.indicator-select-panel .option-go:focus-visible { outline: 2px solid var(--issste-text); outline-offset: 2px; }
// The TEA report: while it's being prepared, charts draw at a width that fits a page.
.dashboard.reporte-impresion .catalog-grid { grid-template-columns: minmax(0, 1fr) !important; max-width: 680px; }
@media print {
.site-header, .site-footer, .institutional-header, .domain-nav, .section-tabs, .global-filters, .catalog-search, .search-result, .reporte-acciones,
.dashboard > header > p, .kpi-grid-oculto, app-indicador-catalog-card button, .catalog-metadata, .selection-status { display: none !important; }
.dashboard app-indicador-catalog-card, .dashboard .resumen { break-inside: avoid; }
.dashboard .plot-viewport { overflow: visible; }
// The app scrolls inside its shell; on paper everything has to flow across pages.
html, body, .app-shell, .app-shell--workspace, .app-main { display: block !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
body { background: #fff; }
}