• 0

DMS 2 Organise CSS


Question

Posted · Report post

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

5 answers to this question

  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

No problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now