Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow .css-files imports within SCSS files #882

Merged
merged 3 commits into from
Mar 15, 2022

Conversation

andreyvolokitin
Copy link
Contributor

What?

It's not possible currently to import raw css files (i.e. from node_modules) within a theme, because stencil-cli provides no such ability.

The standard for importing .css files in SCSS is to not use any extension. The proposed change is to check for existence of .css file after all other options are exhausted.

Tickets / Documentation

cc @bigcommerce/storefront-team

@jairo-bc
Copy link
Contributor

jairo-bc commented Mar 7, 2022

@andreyvolokitin Do you mind provide some proof (screenshots) that is working for css files and doesn't break previous logic (on cornerstone for example)?

@andreyvolokitin
Copy link
Contributor Author

Do you mean the theme being able to be built? Will do (I actually used this in exiting cornerstone theme), though the only difference with this PR is that the existing .css file will be included to the final css bundle, not sure how it can break previous logic?

@jairo-bc
Copy link
Contributor

@andreyvolokitin yes, just to double check if there's no regression coming up

@andreyvolokitin
Copy link
Contributor Author

Cornerstone gets successfully built and starts in dev mode, visually it doesn't look like there're any regressions: https://imgur.com/a/SeUbk9K

Also I think it's not possible to get CSS regressions from this PR, because all previous SCSS is handled as usual, and if absent it now brings as a fallback any .css with the same name. Any visual changes are only possible if deliberately introduced inside these CSS files

@jairo-bc jairo-bc self-requested a review March 15, 2022 13:59
@jairo-bc jairo-bc merged commit 4ef424e into bigcommerce:master Mar 15, 2022
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