suggestion: CSS search

General project discussion. NOT for help questions.
Post Reply
wesyah234
Forum Members
Forum Members
Posts: 60
Joined: Tue Mar 07, 2006 4:30 am

suggestion: CSS search

Post by wesyah234 »

First of all, hats off to the developers. This CMS is great... I am currently moving sites done in Exponent over to CMSMS.  Very impressive!

Anyway, I often find myself needing to change some aspect of the CSS in the provided templates, but I don't know which stylesheet it's in.  A quick search box on the top of the Stylesheets page would be a great help.

Viewing the entire CSS using the stylesheet.php?templateid=11 url notation helps, as long as each CSS snippet is commented nicely so I know which one to go into, but a search would make it all that much easier to use.

Thanks,
Wes
alby

Re: suggestion: CSS search

Post by alby »

wesyah234 wrote: Anyway, I often find myself needing to change some aspect of the CSS in the provided templates, but I don't know which stylesheet it's in.  A quick search box on the top of the Stylesheets page would be a great help.
Admin Panel -> Layout:
1. Templates -> Click on icon Attach Stylesheets of this template
  Display all stylesheet of this template
2. StyleSheets -> Click on icon Attach Stylesheets to Template
  Display all template in association

Alby
wesyah234
Forum Members
Forum Members
Posts: 60
Joined: Tue Mar 07, 2006 4:30 am

Re: suggestion: CSS search

Post by wesyah234 »

Thanks Alby.

That's a great way to see the associations, but what I'm talking about is a search of the content of the CSS.

So if I'm looking at a template, and it has a div class="someclass", I can then come to the admin pages and search for "someclass" and find all the CSS that defines something about this style.
jelle

Re: suggestion: CSS search

Post by jelle »

I can see the itch that this feature would scratch. But to do this properly, it should have some understanding of the css tree and search from leaf to trunk.
But the quickest measure I think would be to let cmsms include the name of the css snippet (commented out offcourse).  That will improve the css-debug-ability without putting presenting extra options to the user.
Searching (or search &replace) in all db-content would be nice too, but I think that would be more suited in an extra module.
wesyah234
Forum Members
Forum Members
Posts: 60
Joined: Tue Mar 07, 2006 4:30 am

Re: suggestion: CSS search

Post by wesyah234 »

Great Idea about including the name of the css. That would do everything I need (I can do my own searching in the generated css, then come back to the admin to modify)

I suggest something like this:

/* Start CSS "Layout" */


css layout here


/* End CSS "Layout" */

/*Start CSS "Colors" /*
css color stuff here

/* End CSS "Colors"*/

etc...
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: suggestion: CSS search

Post by kermit »

eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
jelle

Re: suggestion: CSS search

Post by jelle »

I cant say that I agree with the comments that say it is brilliant. Creating sections and marking them with a unique identifier is not IMHO. If you wish to keep things legible don't use cryptic things like =Navigation or &^%$nav, but use sensible things like section=sectionname.
But that only works/is only needed if you put all css in one big file. With cmsms you can do that, but you don't have to.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: suggestion: CSS search

Post by kermit »

i don't just use things like...

/* =begin: navigation */

for various sections, but also things like:

/* =changed: left margin orig 20% */

and

width: 45em; /* =note: enables elastic layout */



makes for *extremely* easy to read css, whether it's in the cmsms admin interface (and potentially split between several stylesheets), but also on the local machine (where it *is* one file) for design and testing.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
jelle

Re: suggestion: CSS search

Post by jelle »

Glad you found the wonders of comenting your code. :-)

To keep things clear, you should try to explain in the comments why you are doing something, not that or how you are implementing it. 
Post Reply

Return to “General Discussion”