php-cuong / magento2-faqs-extensions

Magento 2 FAQ Extension Free
83 stars 56 forks source link

CSS does not merge correctly #21

Open dazz397 opened 6 years ago

dazz397 commented 6 years ago

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.

ghost commented 6 years ago

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

ghost commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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