3 ms·
I think I would like to use it. I consider lightbox functionality to be related to the layout of the content, and hence logically a part of CSS rather than jav
by thevivekpandey 16y ago
I think I would like to use it.
I consider lightbox functionality to be related to the layout of the content, and hence logically a part of CSS rather than javascript. In CSS3 world, I like to use javascript for the tasks not related to the layout: such as making ajax queries, manipulating user inputted data, etc.
Is there a case for relying on javascript for functionality such as lightbox?
- Semiapies 16y agoWhy would lightbox functionality or any other animation and interaction be part of "layout"?
- thevivekpandey 16y agoI am unable to make up my mind here. As atlbeer says, following is the standard breakup of responsibilities: - HTML = Content - CSS = Style / Design - JS = Interaction As argued elsewhere, lightbox straddles JS and CSS domains. I was thinking that in CSS3 world, we should have slightly different breakup of responsibilities (subject to resolving performance issues) - HTML = Content - CSS3 = style/design and changes in style/design - JS = interaction other than purely style/design changes I see that this breakup may lead to confusion in some situations. (Though I still find it more appealing for lightbox example) So, let me make up my mind when I have more experience with CSS3 :-)
- Semiapies 16y agoFair enough!
- aditya42 16y agoIf you want to do something other than show a bigger version of an image (like fetch extra data about it for captions), just CSS won't cut it. Remember that "lightbox" isn't just the effect, it's a UI control.