|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Scripting dude-volunteer
|
Smugmug has gallery CSS customization backwards
After years of customizing my own site and helping countless other people customize their sites, I've decided that Smugmug is really missing the boat on how simple CSS customization could be and, in fact, really has their customization techniques backwards.
The general idea of CSS is that you can assign an ID or a class to an object and then create CSS rules that govern the formatting of that object. If you use a class, then everywhere in your site or everywhere that class appears in a page, you get the same rules applied. Smugmug uses this all over it's own CSS. One CSS rule applies to lots of objects that all have the same class. The class .nav is a classic example of this. Every theme sets the CSS customization for the .nav class and there are many objects in a page with that class. But, when you want to customize a few galleries to all look the same way, there is NO way to use this wonderful CSS mechanism. You can't apply the same class to three different galleries (e.g. your About, Service and Pricing) galleries to all give them the same look. Instead, you have to create a unique set of rules for each gallery and copy/paste multiple copies of them. Doing it the Smugmug way, your CSS ends up looking like this: Code:
.gallery_1234567 #breadCrumbTrail,
.gallery_1234567 #slideshowButton,
.gallery_1234567 .albumNav,
.notLoggedIn .gallery_1234567 .emptyGallery,
.gallery_1234567 .nophotos h3 {display: none;}
.gallery_2345678 #breadCrumbTrail,
.gallery_22345678 #slideshowButton,
.gallery_22345678 .albumNav,
.notLoggedIn .gallery_22345678 .emptyGallery,
.gallery_22345678 .nophotos h3 {display: none;}
.gallery_3456789 #breadCrumbTrail,
.gallery_3456789 #slideshowButton,
.gallery_3456789 .albumNav,
.notLoggedIn .gallery_3456789 .emptyGallery,
.gallery_3456789 .nophotos h3 {display: none;}
The right CSS way of doing this would be to simply create one set of CSS rules like this that describe how you want a blank gallery to be formatted: Code:
.blankgallery #breadCrumbTrail,
.blankgallery #slideshowButton,
.blankgallery .albumNav,
.notLoggedIn .blankgallery .emptyGallery,
.blankgallery .nophotos h3 {display: none;}
The ability to extend this is unlimited. People can share whole libraries of custom CSS rules like this and you just apply the class to any gallery that you want to have the particular rule applied to. You don't have to look up gallery numbers. You don't have to make 20 copies of the same CSS rules to apply it to 20 galleries. This is the way CSS was designed to be used, not the way we are applying CSS rules to multiple galleries now. Smugmug could even include some formatting options in the built-in CSS that people could choose to apply to their own gallery by just adding the appropriate class to a gallery. Please, please Smugmug, let your customers use CSS the way it was intended and make it possible to do specific gallery customizations across multiple galleries without using arcane gallery numbers all over your CSS and without copying the same CSS rule over and over. And, enable much easier sharing and installation of customizations. Please give us the ability to add one or more CSS classes to any gallery page. Corresponding uservoice request here. Vote for it if you like this idea.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#2
|
|
|
Major grins
|
This would make my customizations so much simpler!
I wish... --- Denise
__________________
http://www.denisegoldberg.com ... http://denise.smugmug.com Musings & ramblings at http://denisegoldberg.blogspot.com, quick posts in google+ |
|
|
|
|
#3
|
|
|
Major grins
|
I rarely put the .gallery_xxxxxxx in front so rules applie sitewide. I'm not sure if that's what you mean.
Actually, I know that's not what you mean. I don't know CSS enough to understand your post correctly. But something I noticed is everytime someone asks about some customization, the answer has the gallery number in front, wether the customization concerns the whole site or a single gallery. Last edited by Erick L; Jul-26-2010 at 04:42 PM. |
|
|
|
|
#4
|
|
|
Scripting dude-volunteer
|
You don't need .gallery_xxxx if you want something to apply sitewide. But if you want something to only apply to 5 galleries (like your About, Pricing, Contact, Services galleries), then you're stuck with multiple copies of the same CSS rules each with a different .gallery_xxxxx in front of them. It's a backwards way to use CSS. I'm suggesting a much better way of doing it.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#5
|
|
|
Scripting dude-volunteer
|
Hmm, Andy marked the uservoice request as "planned". Looks like there's something in the works related to this.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question Last edited by jfriend; Jul-26-2010 at 06:52 PM. |
|
|
|
|
#6
|
|
|
Major grins
|
Finally something that was worth actually heading over to uservoice and figuring out how to vote... :-D
__________________
Rob Rogers -- R Squared Photography (Nikon D90) |
|
|
|
|
#7
|
|
|
Scripting dude-volunteer
|
It turns out I wrote up something similar a year ago and bigwebguy seemed to like it then.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#8
|
|
|
Code Monkey
|
I would not say it was "backwards" - we just need to add another classname to the body tag :)
.emptyGallery or .blankGallery - any preferences? |
|
|
|
|
#9
|
|
|
Smugization Master
|
IMHO, .emptyGallery makes more sense.. matches what you describe the gallery as better.
__________________
Smugization Central (WolfSnap.com) Twitter: @WolfSnap Facebook: http://www.facebook.com/WolfSnapDesigns SmugMug & Wordpress Customization - WolfSnap.com | Custom Domains |
|
|
|
|
#10
|
||
|
Scripting dude-volunteer
|
Quote:
What I proposed was a general purpose mechanism that lets us add our own classes to any gallery so we can use a single set of CSS rules to apply to many galleries rather than having to duplicate those rules with .gallery_xxxx on every single rule.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#11
|
|
|
Scripting dude-volunteer
|
.emptyGallery is already used by Smugmug and already has CSS rules assigned to it in many sites. Using it somewhere else could break a lot of existing customizations.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#12
|
||
|
Smugization Master
|
Quote:
I take it back.. please don't use .emptyGallery :P
__________________
Smugization Central (WolfSnap.com) Twitter: @WolfSnap Facebook: http://www.facebook.com/WolfSnapDesigns SmugMug & Wordpress Customization - WolfSnap.com | Custom Domains |
|
|
|
||
|
#13
|
||
|
Major grins
|
Quote:
John's original request is what I'd like to see. --- Denise
__________________
http://www.denisegoldberg.com ... http://denise.smugmug.com Musings & ramblings at http://denisegoldberg.blogspot.com, quick posts in google+ |
|
|
|
||
|
#14
|
|
|
A Design Company
|
This is a good idea and is one I wondered about. It sure would make life easier on us. It sounds like smugmug has it planned in the near future, so maybe...
__________________
SmugDesigns - SmugMug Customization - http://smugdesigns.com
Website: http://smugdesigns.com Follow us on twitter - @SmugDesigns |
|
|
|
|
#15
|
|
|
Code Monkey
|
OK, so I understand a little better now. This sounds like themes could help solve this issue. Not so easy to do now (you would have to set up a master theme and then import it in a new theme) and then use the new theme on the pages you would like. Might be able to make it easier by changing the theme tool to use a "base" customization. Let me think on it.
|
|
|
|
|
#16
|
||
|
Major grins
|
Quote:
--- Denise
__________________
http://www.denisegoldberg.com ... http://denise.smugmug.com Musings & ramblings at http://denisegoldberg.blogspot.com, quick posts in google+ |
|
|
|
||
|
#17
|
||
|
Code Monkey
|
Quote:
Implementing a better solution will take time and I can't say where this would fall on our list of priorities. The javascript to do this currently would be pretty straightforward and easy for anyone to implement - plus you could assign multiple classnames; if anyone would like I could write it up now for the time being. |
|
|
|
||
|
#18
|
||
|
Major grins
|
Quote:
It would be great if you could write this up for us. --- Denise
__________________
http://www.denisegoldberg.com ... http://denise.smugmug.com Musings & ramblings at http://denisegoldberg.blogspot.com, quick posts in google+ |
|
|
|
||
|
#19
|
|
|
wag more. bark less.
|
Re: Smugmug has gallery CSS customization backwards
It would be great if smugmug could implement all of the popular css customizations in the "easy customizer" format. Isn't that the point of css? To be able to change the formatting with the click of a button?
It would save me time and energy tinkering with code. Isn't that the ultimate goal? LiflanderPhotography.com |
|
|
|
|
#20
|
||
|
Code Monkey
|
Quote:
|
|
|
|
||
| Tell The World! | |
| Similar Threads | Thread Starter | Forum | Replies | Last Post | ![]() |
| Ability to style or hide individual category, subcategory or gallery thumbs | jfriend | SmugMug Customization | 118 | Mar-29-2013 03:37 PM | |
| Edit CSS in Gallery seperate from Site Wide Customization | nikinicole | SmugMug Customization | 2 | Jan-25-2010 08:07 AM | |
| Things SmugMug should really do better -- from a new user. | stone | SmugMug Support | 15 | Nov-13-2009 11:06 AM | |
| Any interest in using full-featured templates to customize your SmugMug site? | rhjf | SmugMug Customization | 2 | Jul-03-2009 09:08 PM | |
| SmugMug, CSS and you | ivar | SmugMug Customization | 42 | Mar-06-2007 10:55 AM | |
| Thread Tools | |
| Display Modes | |
|
|