Skip to content

Move CSS styling from inline attributes to CSS isolation files#50

Merged
danielchalmers merged 2 commits intomainfrom
copilot/move-css-styling-to-files
Nov 1, 2025
Merged

Move CSS styling from inline attributes to CSS isolation files#50
danielchalmers merged 2 commits intomainfrom
copilot/move-css-styling-to-files

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Replaced all inline Style= attributes and utility classes (d-flex, align-center, etc.) with semantic CSS classes in CSS isolation files.

Changes by component

SettingsPage

  • d-flex justify-center + inline styles → .loading-container / .loading-spinner

ManageCategoriesPage

  • Inline margin-right: -2px.manage-category-enabled-switch

EditCategoryDialog

  • Created new CSS isolation file
  • d-flex flex-row flex-grow-1.medication-fields
  • d-flex flex-column.more-options-content

DataPointView

  • d-flex align-center flex-grow-1.sleep-controls
  • d-flex flex-column flex-grow-1 note-container.note-container
  • d-flex flex-grow-1 justify-space-between align-center.medication-controls

Example

Before:

<div class="d-flex align-center flex-grow-1" style="gap: 8px">
    <MudText Class="sleep-hours">@hours</MudText>
    ...
</div>

After:

<div class="sleep-controls">
    <MudText Class="sleep-hours">@hours</MudText>
    ...
</div>
.sleep-controls {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 8px;
}
Original prompt

Move ALL CSS styling to actual CSS files instead of doing it inside razor via classes like "d-flex". Prefer CSS isolation


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Moved inline Style attributes to CSS files for SettingsPage, ManageCategoriesPage
- Replaced utility classes (d-flex, etc.) with semantic CSS classes in EditCategoryDialog and DataPointView
- Created CSS isolation file for EditCategoryDialog
- All styling now follows CSS isolation pattern

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Copilot AI changed the title [WIP] Move CSS styling to external CSS files Move CSS styling from inline attributes to CSS isolation files Nov 1, 2025
Copilot AI requested a review from danielchalmers November 1, 2025 20:07
@danielchalmers danielchalmers marked this pull request as ready for review November 1, 2025 20:10
@danielchalmers danielchalmers merged commit 639278d into main Nov 1, 2025
@danielchalmers danielchalmers deleted the copilot/move-css-styling-to-files branch November 1, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants