Skip to content

Move mobile menu styles to component-specific CSS file#57

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/restructure-css-file
Draft

Move mobile menu styles to component-specific CSS file#57
Copilot wants to merge 2 commits intomainfrom
copilot/restructure-css-file

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Mobile responsive styles for Ant Design Menu were incorrectly placed in src/index.css (global styles) instead of being co-located with the NoteLayout component that uses them.

Changes

  • Moved mobile menu media query from src/index.csssrc/common/layouts/NoteLayout.css
    • Targets .ant-menu-item, .ant-menu-submenu-title with larger touch targets (48px height)
    • Submenu items use 44px height for proper mobile spacing
  • Cleaned src/index.css to contain only root-level styles (fonts, body, color scheme)

Rationale

index.css should contain only global styles. Component-specific responsive overrides belong with the component using them (NoteLayout.jsx uses the Menu component).

Before (incorrect location)

/* src/index.css */
@media (max-width: 768px) {
  /* TODO make this into correct file */
  .ant-menu-item,
  .ant-menu-submenu-title {
    font-size: 16px !important;
    line-height: 48px !important;
    height: 48px !important;
    padding: 0 24px !important;
  }
}

After (correct location)

/* src/common/layouts/NoteLayout.css */
@media (max-width: 768px) {
  .ant-menu-item,
  .ant-menu-submenu-title {
    font-size: 16px !important;
    line-height: 48px !important;
    height: 48px !important;
    padding: 0 24px !important;
  }
}

Visual Verification

Mobile menu functionality unchanged:

Mobile menu with larger touch targets

Original prompt

This section details on the original issue you should resolve

<issue_title>css restructure</issue_title>
<issue_description>Image

I think this should not in src/idnex.css. </issue_description>

<agent_instructions>如果你是架构师,你会把这些 css 放到哪里?按照架构师的思维去维护更新这个 css 的位置</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Gavin-OP <116365822+Gavin-OP@users.noreply.github.com>
Copilot AI changed the title [WIP] Restructure CSS file organization Move mobile menu styles to component-specific CSS file Feb 5, 2026
Copilot AI requested a review from Gavin-OP February 5, 2026 02:27
@Gavin-OP Gavin-OP requested a review from CindyLyu1953 February 5, 2026 05:24
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.

css restructure

2 participants