Hi,
Assuming that you have created your clientLibs under /apps/yourProjectFolder which might be root cause of your styles not being loaded. Creating component level clientLibs has few downsides such as below -
The resources are retrieved from /apps, but /apps will have to be blocked on the publish instance which might be the reason behind your css styles not being loaded. For this to be resolved, we will have to redirect resources via /etc/designs and merge into single files. Please refer below community article for clear understanding. This talks about :
1. Components with their own Javascript and CSS files
2. Global Javascript and CSS files
So here, you can learn to create a component specific javascripts/css and global javascripts/css.
http://blogs.adobe.com/experiencedelivers/experience-management/clientlibs-explained-example/
Note:
For example - To include a client lib that contains JQuery Libs/CSS - you would use:
<sly data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}" data-sly-unwrap/>
<sly data-sly-call="${clientLib.css @ categories='myproject.components'}" data-sly-unwrap/>
<sly data-sly-call="${clientLib.js @ categories='myproject.components'}" data-sly-unwrap/>
Also make sure that you will have to you will have to register your component.css in css.txt file as shown below:
#base=css
component.css
Regards,
TechAspect Solutions