styles
anomaly_match_ui.styles
¶
ESA-branded styles, color constants, and CSS for the AnomalyMatch UI.
set_ui_scale(scale)
¶
Set the global UI scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scale
|
float
|
The scale factor (1.0 = default size). |
required |
get_ui_scale()
¶
scale_px(base_px)
¶
Scale a pixel value by the current UI scale and return as CSS string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_px
|
int
|
The base pixel value at scale 1.0. |
required |
Returns:
| Type | Description |
|---|---|
str
|
CSS pixel string like |
Source code in anomaly_match_ui/styles.py
inline_spinner_html(size_px=14, margin='0')
¶
Return a small inline .am-spinner for status lines and captions.
The .am-spinner class is styled as a large centred block for loading
panels; the inline overrides here shrink it and reset its margin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
size_px
|
int
|
Diameter in pixels. |
14
|
margin
|
str
|
CSS margin, e.g. |
'0'
|
Returns:
| Type | Description |
|---|---|
str
|
HTML for the spinner. |