Jump to content
MountainMan

CSS classes cm-header-xxxxxxx -- where ?

Recommended Posts

I notice content module classes such as  "cm-header-breadcrumb",  but cant find them in the code anywhere other than the templates where they are used.  Was hoping I could be schooled a bit on these?  Where are the defined, and/or is there something unique about this usage of class names.  What am I missing?

Thanks...

Share this post


Link to post
Share on other sites

It is just a selector that has been added to the content module so you can use it to style the output if you wish.  Most of the newer modules have selectors added for that purpose. 

Dan

Share this post


Link to post
Share on other sites

As Dan says: it means that you can add a simple rule to user.css to change the appearance of the breadcrumb only, without needing to edit any other file.

There's a different mindset when it comes to setting up your own implementation of osc with the responsive version; instead of diving in and tweaking the code here and there to get it just so, you can make radical changes with admin settings and css. Many of the addons make big changes to the appearance and function of the store without changing the core code (on the catalog side at least). Jquery can manipulate the content in the browser after it was generated by the server.

This is made easier by adding in extra classes identifying logical parts of the page which can then be picked up and used in css or jquery scripts but which aren't necessarily used in the code you get when you install your shop.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

My suggestion would be to delete all these "selectors", and as far as possible try to run without a custom.css and/or user.css. I don't like running a script with so many undefined classes.

These are called template files afterall, so it should not be a problem to add standard bootstrap classes to them. You would not be editing core code if that bothers you at all.

Edited by Hotclutch

Share this post


Link to post
Share on other sites
4 hours ago, Hotclutch said:

I don't like running a script with so many undefined classes.

Any particular reason?  I like the idea and flexibility of having predefined classes so visual changes can be made without touching core/template files.

Dan

Share this post


Link to post
Share on other sites
30 minutes ago, Dan Cole said:

Any particular reason?  I like the idea and flexibility of having predefined classes so visual changes can be made without touching core/template files.

Dan

Bootstrap has predefined classes already that could be used. But if you don't want to edit files then i guess that is what you have to do. I delete them, totally not necessary IMO.

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

×