News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

css styles

Started by pocttopus, May 19, 2020, 05:09:02 PM

Previous topic - Next topic

pocttopus

Hello,

I just want to insert background-image and I opened this file, but whole style is written in a single line.
I am using SublimeText3 and how can I solve this issue?

Thanks.

Shambles


Antechinus

Use the uncompressed files inside Themes/default/css: index.css, etc. These are not minified and are much easier to work with.
Once you save a modified copy, SMF 2.1 will automatically make a new minified version.

Antechinus


pocttopus

Quote from: Antechinus on May 19, 2020, 05:18:56 PM
Use the uncompressed files inside Themes/default/css: index.css, etc. These are not minified and are much easier to work with.
Once you save a modified copy, SMF 2.1 will automatically make a new minified version.
But I havent found the background class in regular index.css file which is working properly, it works only on minifield file and also important! rule is not solving the issues.  :-\

SychO

Quote from: Antechinus on May 19, 2020, 05:18:56 PM
Use the uncompressed files inside Themes/default/css: index.css, etc. These are not minified and are much easier to work with.
Once you save a modified copy, SMF 2.1 will automatically make a new minified version.

Yup do this ^, don't ever modify the minified files if you do that your changes will be lost at some point in time.

And if you want to disable file compression even though it helps your forum's load speed, the setting is under Configuration > Features and Options > General > Minimize CSS and JavaScript files
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Antechinus

Quote from: pocttopus on May 19, 2020, 05:21:52 PMBut I havent found the background class in regular index.css file and also important! rule is not solving the issues.  :-\

Background is not a class as such. It's an attribute that is assigned to a class (or to a tag or an id). :)

Exactly which background are you trying to change? The best way to find the CSS for it is to right click > Inspect Element. That will tell you tag, class and/or id. You can then search for those in the CSS files.

pocttopus

I must disable the inline rule and then I can insert a background image from minified file:


Antechinus

Where the hell is the inline rule coming from? It's not in the markup.

Arantor


pocttopus

I'm on localhost testing 2.1rc2 for a new forum before going live.

Arantor

That makes it awfully difficult for us to help you...

pocttopus

So I must go live with the forum?
Here is another example, almost on every search to change the background it gives me minified file.


Kindred

yes... because you are looking at the GENERATED PAGE.

As you have already been told -- making changes to the ACTUAL file (e.g. index.css) will then be taken INTO the minified version after a short time.
Making changes directly to the minified version will be LOST the next time the system updates the minified file from the actual file
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

If you are designing just disable the file compression as I have instructed in my previous post.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

pocttopus

Thanks to all for your response, you are very kind and I understand what are telling me about minified file, but searching directly into the index.css without Inspect Element is hard to find all those classes and attributes it's harder for me to change a single background or some other links colors. There are some attributes which I must disable, some to make them 50% transparent because of the image in the background.

Something similar like my other forum at http://mkreef.com but this will be a new forum about cars. 


Arantor

So turn off minified files as suggested, meaning you get served the actual index.css file.

pocttopus

I'll try that.
One more question. Is there any changes of the 2.1 between these two links?

Thanks.

Arantor

Yes.

The GitHub version is a year ahead of the published version on download.simplemachines.org.

Kindred

I think there are over 1000 changes...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: