fbpx

Control Content Visibility on Your Joomla Website with Display Conditions Know More

Welcome, Guest
Username: Password: Remember me

TOPIC: Getting styles applied to a new module

Getting styles applied to a new module 1 year 3 weeks ago #18390

Hi

I need to create a new module from scratch and put it on my site and I want to know if there is a way to apply the style of the template to it? Because now it feels really out of place as it doesn't share the classes of the elements of the template.
For example in my module I need a form with specifie behavior so I build it from scratch. How to get the submit button to have the same styles as all the other submit button?
I have inspected the styles applied on such elements but as I don't really know what all the classes refer to, I am not sure it is a good idea to just apply them all to my elements.

Thank you very much
The administrator has disabled public write access.

Getting styles applied to a new module 1 year 3 weeks ago #18395

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4174
  • Thank you received: 611
  • Karma: 110
Hello,

Seattle is based on Boostrap 4. So, if you your site (where you are installing is module), is using bootstrap 4, that should automatically take care of the majority of styling (assuming you coded your module with boostrap 4 classes).

For the rest, just copy the css classes and associated styles manually. There is no automated way of doing this unless you switch to using Seattle.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Getting styles applied to a new module 1 year 3 weeks ago #18413

Hi, thank you for the quick answer.
I was not using bootstrap but after your answer I looked at it.
I saw in mod_jd_skillset for example that you load version 4.1.3 of bootstrap. On Bootstrap site, the CDN links to version 4.3.1.
I guess I should load the same version used by the seattle mods, so 4.1.3?

Also another unrelated question if I may. I noticed jd_seattle mods are using jquery and would like to do that myself with my module. However I don't quite get how to load the jquery library to work in my module. Could you help me with that too?

Thank you so much.
The administrator has disabled public write access.

Getting styles applied to a new module 1 year 3 weeks ago #18424

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4174
  • Thank you received: 611
  • Karma: 110
Hello,

As long as you are on Boostrap 4. It's not much of a difference.

jQuery here: docs.joomla.org/J3.x:Javascript_Frameworks

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.304 seconds
Cron Job Starts