SUGGESTION: use css nesting

craigh

Joined: 2003-06-25
Posts: 18
Posted: Fri, 2005-02-25 23:56

PLEASE consider this for future releases of gallery. It would be VERY useful in situations where gallery is embedded in other applications (like PostNuke).

suggestion: use css nesting for ALL styling in gallery. To accomplish this you need to do two things:

1) wrap ALL html in a div with an id. For example:

<div id="gallery">
<!-- all gallery html -->
</div>

2) nest all the existing css definitions inside the gallery id. Like so:

/* everything below is for gallery */

.title                          /* album titles on main page */
	{ 
	  font-size: 16px; 
	  font-weight: bold; 
	}
.mod_title			/* album title -- Text is controlled by .title */
	{
	  border:1px solid #000000;
	  border-right-width:0px;
	  border-bottom-width:0px;
	  border-left-width:0px;
	}
(etc...)

BECOMES

/* everything below is for gallery */

#gallery .title                          /* album titles on main page */
	{ 
	  font-size: 16px; 
	  font-weight: bold; 
	}
#gallery .mod_title			/* album title -- Text is controlled by .title */
	{
	  border:1px solid #000000;
	  border-right-width:0px;
	  border-bottom-width:0px;
	  border-left-width:0px;
	}
(etc...)

This would be VERY useful because as you can imagine, the 'title' class is a very generic term and this causes issues if the other application also uses a 'title' class. It would immediately solve any css conflicts and would be a very easy thing to implement into your code.

THANK YOU for your consideration!