Skip to content

Bug fixes and improvements for border-radius and build warnings#53

Closed
Thanhdan0811 wants to merge 29 commits into
mainfrom
atomic-1.2.5
Closed

Bug fixes and improvements for border-radius and build warnings#53
Thanhdan0811 wants to merge 29 commits into
mainfrom
atomic-1.2.5

Conversation

@Thanhdan0811
Copy link
Copy Markdown
Collaborator

@Thanhdan0811 Thanhdan0811 commented Mar 27, 2026

This PR fixes some issues in atomic and migrates the SCSS codebase to the modern Sass module system:

  1. Migrate from deprecated @import to @use/@forward and namespaced modules (math, string, map), fixing the deprecation warnings when running npm run prod.
  2. Refactor border-radius to support responsive breakpoint config like vertical spacing.
  3. Fix border-radius of the skeleton class overriding bar* classes like bar-circle.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the SCSS codebase to the Sass module system, replacing deprecated @import statements with @use and @forward and updating built-in functions to use namespaced modules like math, string, and map. It also refactors the border-radius utility to support responsive configurations similar to the spacing and font-size systems. Feedback indicates that the generated border-radius class names should have the "px" unit removed to maintain consistency with other utility patterns and that default configuration values should be avoided to minimize the CSS bundle size.

Comment thread scss/border-radius.scss
@for $i from 1 through list.length($values) {
$value: list.nth($values, $i);
$postfix: helpers.get-previous-breakpoint-value($i, $value, $breakpoint, helpers.$border_radius);
.bar#{helpers.replace-prop($postfix)}px {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This pull request aims to make the border-radius configuration similar to vertical spacing. To be fully consistent, the generated class names should also follow the same pattern. Spacing classes are generated without units (e.g., .pt12), as are font-size classes (e.g., .fs13). The px unit should be removed from the class name here to align with that pattern, resulting in classes like .bar12. Additionally, ensure that these utility classes do not have default values in the configuration to keep the CSS bundle size minimal.

Suggested change
.bar#{helpers.replace-prop($postfix)}px {
.bar#{helpers.replace-prop($postfix)} {
References
  1. To minimize CSS bundle size, configurable utility classes (e.g., for aspect-ratio, border-radius) should not have default values. Projects should explicitly define the values they require in the configuration.

Copy link
Copy Markdown
Collaborator Author

@Thanhdan0811 Thanhdan0811 Apr 1, 2026

Choose a reason for hiding this comment

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

With border radius currently our project use pattern bar[value]px name for class. So we will keep px here.

@tung13041996
Copy link
Copy Markdown
Member

Still see warning from terminal
image

@Thanhdan0811
Copy link
Copy Markdown
Collaborator Author

@tung13041996 I have fixed these warning. you can check again.

@Thanhdan0811 Thanhdan0811 self-assigned this Apr 1, 2026
@daomapsieucap daomapsieucap self-requested a review May 28, 2026 08:20
…d-atomic-from-outer-project

Support custom atomic.css builds from external projects via CLI
@daomapsieucap daomapsieucap changed the title Atomic 1.2.5 Bug fixes and improvements for border-radius and build warnings May 28, 2026
@tung13041996
Copy link
Copy Markdown
Member

This PR has been fixed in the PR: #55. So, I will close this PR

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.

3 participants