Page 1 of 1

suggestion: CSS search

Posted: Tue Mar 07, 2006 4:37 am
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

Re: suggestion: CSS search

Posted: Tue Mar 07, 2006 3:32 pm
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

Re: suggestion: CSS search

Posted: Tue Mar 07, 2006 3:51 pm
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.

Re: suggestion: CSS search

Posted: Tue Mar 07, 2006 6:33 pm
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.

Re: suggestion: CSS search

Posted: Tue Mar 07, 2006 6:42 pm
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...

Re: suggestion: CSS search

Posted: Wed Mar 08, 2006 2:06 am
by kermit

Re: suggestion: CSS search

Posted: Wed Mar 08, 2006 11:35 am
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.

Re: suggestion: CSS search

Posted: Fri Mar 10, 2006 6:01 am
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.

Re: suggestion: CSS search

Posted: Fri Mar 10, 2006 6:26 pm
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.