How do you override a setting in the root media folder of Joomla 2.x - joomla

Basically I have a module I installed, it is in the modules folders as well, but the css I need to change is in the media folder. How to I override this, do I use the HTML folder in my template folder somehow?

Probably the simplest way is to have a specific CSS file in your template, with selectors that override the standard module CSS. Unfortunately, Joomla doesn't have a standard way of checking for template versions of module or component CSS, in the way it does for view files.
Use the CSS hierarchy to have your override CSS rules loaded AFTER the default module CSS rules, and they will take precedence. Make sure your override CSS file is the last one loaded by the template.

How is the original CSS file loaded? Does the module load it in its template file or someplace else? If it is loaded in the template, just override the template file and change the lines that load that file. If it's not loaded in the template, it is probably loaded just before rendering the template. In this case, the solution is also to override the template and load your own css file which will contain rules to override the ones in the original file. In this case, unfortunately, the original file will be loaded in addition to your css file. It amounts to an extra http request but it's probably not a big deal.

Related

How do I customize go-present template?

I am new to Go and just stumbled upon Go's present package which I imported via go get golang.org/x/tools/present.
Is there any way to customize the look of the presentation? E.g. via adjusting the default css file?
If so where are the files used for the style? I cannot find the package anywhere in my Go path...
Let's assume you have a directory myslides with some .slide files in it.
Create a subfolder theme in myslides.
Copy the folders template and static from $GOPATH/src/golang.org/x/tools/cmd/present to that new theme directory
Start present with a new parameter -base: present -base theme
Modify the styles and template files. Most small things are in styles.css.
If you change the template files, then you need to stop and restart present. If your are changing the styles only, then a reload in the browser will do (take care to disable the cache.)
I found that the only way to change presentation styles is to modify library files directly.
If you use vgo:
$GOPATH/pkg/mod/golang.org/x/tools#<version>/cmd/present
Otherwise:
$GOPATH/src/golang.org/x/tools/cmd/present
Of cause first you need to download present package: go get golang.org/x/tools/cmd/present

How do you override the existing Sass with your own styles in Materialize?

When working with Sass for Materialize and wanting to add my own .scss code to a project is it a better practice to directly modify the existing .scss files within the project, or to create your own separate .scss files, compile them to a different .css and refer to it at a later point in an HTML file to override the existing styles?
I would suggest never overwrite the classes of any library's .css or .sccs file if you are using some library like materialize or bootstrap.
Always create your own custom classes and use your CSS to modify the layout. Use your own CSS selectors while writing classes.

How to add custom css file in YT Framework Joomla Template

I am using YT Framework on Joomla2.5, I want to add new css file fot the template SJ+, but I could not find any documentation for the framework.
I have general understanding that, as the css will be builded every time I install any component or module, so in order to implement our custom css, I need to add my css in a specific file, but I am unable to find where to keep that file and with what name.
I have tried by adding a "custom.css" file in template's css folder.
For any template if you need to add your custome css code you need to first find index.php file in your template directory,
If you found html code in index.php then add your css code to index file using tag. or add
if you do not found html code in index.php file then you need to find component.php file in template root folder.
and follow the same thing as for index.php
After looking deeper into each of the css file I came to solution for loading of custom css for YT Framework templates.
Keep your custom css in a file named "your_css.css" file under the css folder of your template, this is the functionality of the YT frame work that after loading all the css files required by the template, it loads this css file at the end so that all the default and dynamic css will be overloaded with all the stylings you have written in your_css.css file

joomla autogenerated css classes

i want to make a new joomla template, i dropped into that but i am confused now.
i want to know where is the joomla autogenerated css class list.
for example i insert a module in template and what is the css class for example for menu title or the css class for search input box or what is the default css class for readmore link in main.
i found a little in joomla doc but i want the whole list
I fail to understand how you are prepared to make a Joomla template which is far more complex than a plain CSS template, yet you are unable to find the necessary CSS files. You said you wanted to make a new template therefore shouldn't you know where you have put the CSS file?
You are in dire need of Firebug for starters. Have a look at all it's features. It will help you to find CSS files and the specific line you need to edit.
I assume you are editing someone elses template in which case this is the sort of location you will be looking for.
templates/you_template/css/file.css
It varies with different template so I suggest you download Firebug as I suggested above.

joomla module, where to put css?

I've just written joomla module. This is basic but working version of my moule.
I want to 'effectize' it, so i need to work with some css. Elements of my module has own classes so i can style it very easy. But where to put CSS?
I typically just create a css folder under my module's directory. You can then use this call to include your css from your module's php code:
JDocument::addStyleSheet
Yes but would still recommend to put CSS in a seperate folder as suggested by Will Mavis as it is the right professional approach.
The assets for your Joomla extension should be put in the /media folder.
Eg:
For a module called mod_supermodule, put the files in:
/media/mod_supermodule/css
/media/mod_supermodule/images
/media/mod_supermodule/js

Resources