Jump to content

Archived

This topic is now archived and is closed to further replies.

mccooluk

Organise CSS

Recommended Posts

mccooluk    1
mccooluk

Is there a way, or do you have any tips, of a way to organise my custom input CSS?

 

At the moment I have quite a lot of CSS entered on the site I am working on, and it is taking ages to scroll about and search for the code needed if I want to edit something.

 

A good way would be to be able to create numerous sheets, which are accessed as tabs across the top of the CSS input box. That way you could create a separate sheet for each page on the site, for example. It would make locating code much easier and quicker - just a thought.

 

Thanks

 

Chris

 

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi Chris,

 

We will not be introducing tabs or additional custom stylesheets to DMS. If you're having a hard time locating your a specific rule in your custom CSS. The all this means is that you haven't used comments.

See this article for more information on how to better organise your CSS.

 

http://codeguide.co/#css-comments

 

Following this simple rule of adding comments to your code will make your life much easier.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mccooluk    1
mccooluk

Thanks for the reply Danny. I do use comments, but unfortunately it isn't possible to use the browser search function (CMD + F) to locate these comments quickly - there is still a lot of slow scrolling required.

 

Thanks anyway

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

You should have a copy of your code in a code editor and use the search function in there. Code editors like Atom.io or Sublime Text allow you to search and replace multiple lines of code at one time. Make your changes in your code editor and then copy and paste them into the DMS editor or what I would recommend is using a child theme, then copy and paste all your CSS/LESS CSS into the correct file i.e using CSS only, then use the style.css file, if you're using CSS and LESS CSS, then all your code goes into the style.less file. When you use a child theme, you can edit the files via your code editor through your FTP client if it is configured to do.

 

If you're not using a child theme, you're free to use mine here - http://dannyholt.github.io/skeleton


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mccooluk    1
mccooluk

Thanks for the advice, I think this will be a much better way to work.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • sfmstudios
      By sfmstudios+
      I'm using the boxes section on a local development site to play around with some options, and running into an issue.  
      Have the following settings for the boxes:
      Type: Images/SVC Media on Top Image Appearance: Standard/Default Image/Icon Width: 280px Image Opacity: 100% Each of my box images is 280x150 in size, but the result of the image on the box is a strange zoomed-in, cropped square (see attached).  I looked to adjust border properties via CSS, but couldn't find a fix.  What solutions are out there?

    • paoloimperiale
      By paoloimperiale+
      Hi, 
      I was wondering if there's a way to modify the slider container size? My client would like it skinner- not as tall. How would you suggest doing that?
      Thank you.
      (this is for the paoloimperiale.com slider on the homepage) 
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
×