Skip to content

Conversation

@G-Sham
Copy link

@G-Sham G-Sham commented Dec 20, 2025

Closes #11602

Refactor

Technical

Refactored hardcoded border values (e.g., 1px solid @lighter-grey, 2px solid) to use the semantic design tokens defined in borders.less. This ensures consistency across the application and simplifies future theming.

  • Standardized Containers: Replaced 1px solid @lighter-grey with @border-card for cards, notes, and content wrappers.
  • Standardized Inputs: Replaced input borders with @border-input and @border-width-control.
  • Thick Borders: Mapped 2px borders to @border-width-thick (or @focus-width for focus states).
  • Tables: Updated table borders to use @border-table.
  • Files Touched: Updated legacy-borrowTable.less, legacy-datatables.less, legacy-wmd.less, buttonBtn.less, legacy.less, and others.

lokesh and others added 30 commits December 17, 2025 12:01
…r style variables over border width variables
@lokesh lokesh self-requested a review December 22, 2025 18:12
@lokesh lokesh self-assigned this Dec 22, 2025
Copy link
Collaborator

@lokesh lokesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@G-Sham
Thanks for your work on this!

There are some issues in this PR to work through to get it ready that I will note below. The main thing I would think about is being much less ambitious. Touch fewer files and only insert the variables in instances where you have confidence you understand what the UI component is and it's context.

Issues to address:

  1. There are missing Less imports that need to be resolved in a few files. You can run docker compose run --rm home npm run-script lint to see the errors.
  2. We should mostly avoid using the primitive variables. e.g. @border-width, @border-width-thick. If you see a CSS rule that has a border width of 1px, avoid replacing the 1px with a variable. In almost all cases we want to use a semantic variable, and ideally a complete border style variable. If you can't find a semantic variable that works, then leave the hardcoded value or consider adding a semantic value.
  3. Make sure the semantic variables are used in their correct context. I'm seeing multiple issues here. One examples:

In static/css/components/buttonBtn.less @border-card is used to style a chip. This chip is like a tag or badge UI component, and not a card. So in this case, you could just leave the hardcoded values as is, or create a new semantic variable in borders.less:
@border-tag: @border-width solid @color-border-subtle; // tags, chips, badges

@G-Sham
Copy link
Author

G-Sham commented Dec 27, 2025

Hi @lokesh, thank you so much for the detailed review!

Apologies for the delay in responding—I was caught up with university exams this week. I really appreciate the mentorship here, especially regarding the semantic context.

I will start working on these updates now

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Dec 28, 2025
@lokesh
Copy link
Collaborator

lokesh commented Jan 9, 2026

Closing.

Please feel free to reopen if you do take another pass on it.

@lokesh lokesh closed this Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Response Issues which require feedback from lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants