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

Styling is not functioning on imported json-editor Component #42

Closed
LanceJensen-Teradata opened this issue Jun 12, 2019 · 8 comments
Closed

Comments

@LanceJensen-Teradata
Copy link

LanceJensen-Teradata commented Jun 12, 2019

I seem to be having a CSS issue with this angular module. The module has been imported but I have not been able to get any of the image assets or stylings to render. I have tried the import suggested on the readme:

@import "~jsoneditor/dist/jsoneditor.min.css";

But that did not work in my .scss style file. It did not cause any issues but it did not resolve the style issues. I also tried importing the original styles directly in the application by copying the style sheet from:

https://github.com/josdejong/jsoneditor/blob/master/dist/jsoneditor.css

This also requires importing img/jsoneditor.svg found here:

https://github.com/josdejong/jsoneditor/blob/master/dist/img/jsoneditor-icons.svg

Unfortunately none of these steps fixed the issue. Could you please advise on next steps? If it was just a CSS issue I would have expected to see the icons after I did the manual import of the style and images.

Thanks for any support you are able to provide.

@mariohmol
Copy link
Owner

make import on style.css

@LanceJensen-Teradata
Copy link
Author

I made the import in the style.css sheet that did not load the style to the table. It also did not work to change the import url to:

@import url("~jsoneditor/dist/jsoneditor.min.css");

Any other recommendations? I compared your demo's style to that of our app. The issue is that the component is not receiving its style information. Any other things you can think of that could cause this effect? I am ver surprised that the style information did not work on the component ang-jsoneditor component is called from.

@LanceJensen-Teradata
Copy link
Author

I have made an issue on stack overflow to see if any other help can be obtained:

https://stackoverflow.com/questions/56582962/how-to-force-application-of-styles-for-the-https-github-com-mariohmol-ang-json

With that said it appears the assets and styling are not accessible through the shared module export. Frankly I am unclear on if this is a bug or if it is a config issue on my part.

@LanceJensen-Teradata
Copy link
Author

A temporary hack was implemented. You may implement it yourself from here if you are experiencing this problem.

https://stackoverflow.com/questions/56582962/how-to-force-application-of-styles-for-the-https-github-com-mariohmol-ang-json/56588684#56588684

@mariohmol
Copy link
Owner

Hi.. i'm sorry about this issues.. have never seen before.. thanks for pointing out a solution!

@LanceJensen-Teradata
Copy link
Author

I do not know if it is a bug or not. I think it is likely that there is some configuration issue in the project making the non-js assets available. It is confusing because I figured all that module encapsulation would make sure this is not an issue. It is outside my knowledge but someone might come along and recognize the issue.

But at least there is a work around now. :) . Thanks for your support you really helped me with my early issues.

@LanceJensen-Teradata
Copy link
Author

Best free support I have had!. :)

@mariohmol
Copy link
Owner

=) its not free.. its payed by all opensource project`s I used before kkkkkk

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

2 participants