Skip to content

Conversation

@Mat2095
Copy link

@Mat2095 Mat2095 commented Jul 24, 2025

They were using rgba() in an incorrect way or used undefined variables.
Closes #636
Also fixes wrong import-path in _datepicker.scss

Proposed changes

Screenshots (if appropriate) or codepen:

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

They were using rgba() in an incorrect way or used undefined variables.
Closes materializecss#636
Also fixes wrong import-path in _datepicker.scss
@gselderslaghs
Copy link
Member

Looks good, thanks for your first contribution

@wuda-io can you take a look as wel? Not sure why the sass linter did not notice the incorrect import-path in pr #608

@Mat2095
Copy link
Author

Mat2095 commented Jul 25, 2025

I'm not sure, but I noticed when I change the path to something like ../foo/mixins.module.scss, it does fail to build with npm run build. So I think sass actually does find the file with ./mixins.module.scss.
But when running pnpm dev in materialize-docs, it fails to build:

[plugin:vite:css] [sass] Can't find stylesheet to import.
  ╷
1 │ @use './mixins.module.scss' as *;

  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  packages\materialize\components\datepicker\_datepicker.scss 1:1  @forward
  packages\materialize\sass\materialize.scss 38:1                  @import
  src\style.scss 2:9                                               root stylesheet

So my guess is that rollup configures sass to look in additional locations to find imports compared to vite. Or it might be because the project-root is different in the two cases.

@wuda-io wuda-io requested review from gselderslaghs and wuda-io July 25, 2025 18:56
Copy link
Member

@wuda-io wuda-io left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gselderslaghs gselderslaghs left a comment

Choose a reason for hiding this comment

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

Approved, works as expected 🚀

@wuda-io wuda-io merged commit e77dad5 into materializecss:v2-dev Jul 29, 2025
1 of 2 checks passed
@wuda-io
Copy link
Member

wuda-io commented Aug 1, 2025

Good work, thanks for your contribution @Mat2095. I will invite you to join the Team.

@Mat2095
Copy link
Author

Mat2095 commented Aug 1, 2025

Thanks, I can accept, but I don't think I'll be able to contribute, since I'm not actually using materialize 2. The project I'm working on is still using materialize 1 with no plan of migrating in sight. I think I was looking at materialize 2's output CSS for a comparison when I noticed those invalid CSS rules.

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