magento2-faqs-extensions icon indicating copy to clipboard operation
magento2-faqs-extensions copied to clipboard

CSS does not merge correctly

Open dazz397 opened this issue 6 years ago • 4 comments

This still does not work so I am opening a new issue.

If you view xxx.min.css There is a line which does not exist import '../PHPCuong_Faq/css/faq-extension/style.css';

I was able to resolve this partially by renaming /pub/static/frontend/Company/theme/en_US/PHPCuong_Faq/css/faq-extension/style.min.css to style.css

BUT I still get a 404 error on the server for this file /static/version1513324446/_cache/PHPCuong_Faq/css/faq-extension/style.css

Also I had to remove bootstrap.css because the theme I am using already uses bootstrap and was conflicting with yours.

dazz397 avatar Dec 15 '17 07:12 dazz397

I can confirm that the same problem is affecting my installation using porto theme.

ghost avatar Jan 04 '18 08:01 ghost

Please refer to http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css-preprocess.html#fedg_css-import to understand the issue.

In case of importing CSS resources, this also results in not finding and not importing the required files.

I am working on a solution to the problem.

ghost avatar Jan 04 '18 12:01 ghost

Renaming the files to less solves the problem, but we also need to move the style.css file under admin to let url directives work correctly. To me the best idea would be to totally remove the 'base' dir and add two separate style.css files, one under adminhtml and another one for the frontend.

We need to come up also with a solution for the bootstrap aspect, since we do not want conflicts on other pages which are using bootstrap in the template.

ghost avatar Jan 04 '18 14:01 ghost

@dazz397 I still haven't solved the issue for bootstrap, but some refactoring allowed me to fully deploy in production; please check #26

ghost avatar Jan 04 '18 15:01 ghost