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

@import Issue #36

Open
kolbykruger opened this issue Sep 5, 2018 · 0 comments
Open

@import Issue #36

kolbykruger opened this issue Sep 5, 2018 · 0 comments

Comments

@kolbykruger
Copy link

I am creating a separate issue, although it may relate to #34

Issue

When importing a .scss file into another, it works correctly, however importing a .css file with import does not work.

Currently I have @import "variables.scss"; which is working correctly.
Doing anything with a regular css file, i.e. @import "reset.css"; or @import "reset"; refuses to compile and errors out.

All of the StackOverflow posts I have found regarding this issue say that @import "reset"; should work, and does in current versions.

A simple fix would be for me to rename reset.css to reset.scss however in MODX we use this reset.css file in conjunction with TinyMCE RTE to style the richtext editor to look like the live page. TinyMCE RTE cannot accept a .scss file because it is not compiled before specified, and you cannot specify the path to the compiled .css file because it changes based on the modified date and version.

To fix this, we could go two routes:

Solution 1

Allow us to manipulate the compiled file name to something we specify in the system settings, which then gets appended with a ?v=*modified-date* therefore the path is always the same. This would allow us to specify the end file for TinyMCE RTE to read off of.

Solution 2

Update the php compiler to work with modern .scss and .less. This is obviously ideal but a much larger job (I would imagine).

Unfortunately I know nothing close to what I would need to, to help with this. If anyone has some direction on an alternate solution, or some hack that you have found, I would love to know.

I am on MODX Slack if you want to message me directly with any questions: @sargasm

Thanks

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

No branches or pull requests

1 participant