We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

I found out many css files inside of the example site "album-o-rama", in total 3685. Why don't we use javascript to change the b

I found out many css files inside of the example site "album-o-rama", in total 3685. Why don't we use javascript to change the background dynamically?

edited Jul '14

Yeah you are right. That looks like an especially awful way to handle things. My best answer is that the the developers of phalcon are primarily back-end developers.

They also load the script tag inside of the body as well. Something that doesn't matter as much now-a-days but is considered a pretty big red flag by anyone with front end experience.

Reference for anyone who hasn't seen what the OP is talking about: https://github.com/phalcon/album-o-rama/tree/master/public/css/albums

Agreed it's not a good pratice and kudos for knowing that. I think it's just meant to be a code example. I'm sure a pull request would gladly be accepted to change it if need be.



10.3k

Thank you very much.