Cannot insert breaks into template.css

For Joomla! 5.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
caitlinaod
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 28, 2024 3:29 pm

Cannot insert breaks into template.css

Post by caitlinaod » Wed Feb 28, 2024 3:39 pm

Hi there. The template.css that came with my organization's Joomla template came with the code in one long, unreadable line. We need to customize our template's layout, so in order to read the code, I have been going through our template.css file and inserting line breaks so the code can be more easily read. For example, instead of this:
#example1 .example2 .example3{font-size:14px}
I've been reformatting so it shows like this:
#example1 .example2 .example3{
font-size:14px
}
I have reached line 2021 and still have a way to go. However, when I go beyond line 2021 -- even just inserting a break after the open bracket -- I get this error message when I click "Save," "Save & Close," or "Close File":
"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."
I tried importing the fully formatted code file. The file imported, but it was blank. I don't know why because the file was under the data limit.

I also tried to go to the end of the file and format from the bottom-up. I was able to save the file without running into this error, but the formatting was totally off and included huge, undeletable spaces in page breaks.

Could someone please tell me how I can continue formatting this file from line 2021 and down without running into this error? Thanks.

b_wp_b
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Feb 27, 2024 1:04 pm

Re: Cannot insert breaks into template.css

Post by b_wp_b » Wed Feb 28, 2024 4:04 pm

Unminify css: https://unminify.com/

caitlinaod
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 28, 2024 3:29 pm

Re: Cannot insert breaks into template.css

Post by caitlinaod » Wed Feb 28, 2024 4:18 pm

b_wp_b wrote:
Wed Feb 28, 2024 4:04 pm
Unminify css: https://unminify.com/
Thanks for the reply and link. I get the same error when I try to save the unminified code.

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1613
Joined: Tue Jun 30, 2020 12:17 pm

Re: Cannot insert breaks into template.css

Post by Pavel-ww » Thu Feb 29, 2024 8:04 am

caitlinaod wrote:
Wed Feb 28, 2024 3:39 pm
Hi there. The template.css that came with my organization's Joomla template came with the code in one long, unreadable line.
Hi.
Never edit template.css and other template's core files, if you do not know exactly what you want to do and what will be the consequences.
If you need to write your own CSS create your CSS file following the documentation of your template and write your code there.
If you need to view the code from template.css in a convenient, readable form, use the Dev Tools of your browser.

If you need beautify the minified code, use the HTML editor as VS Code and similar or an online service via Ctrl + A > Ctr + C > Ctrl + V, but do not try to transfer lines manually. Google subject "beautify css"

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2653
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Cannot insert breaks into template.css

Post by ceford » Thu Feb 29, 2024 11:47 am

Which template? Cassiopeia comes with three versions of template.css: there is template.min.css which is used for production sites and is minified; there is template.min.css.gz which is the gzipped version that is usually the one actually fetched by your browser; and there is template.css that is human readable and the one used in debug mode to help with trouble shooting.

caitlinaod
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 28, 2024 3:29 pm

Re: Cannot insert breaks into template.css

Post by caitlinaod » Thu Feb 29, 2024 3:34 pm

ceford wrote:
Thu Feb 29, 2024 11:47 am
Which template? Cassiopeia comes with three versions of template.css: there is template.min.css which is used for production sites and is minified; there is template.min.css.gz which is the gzipped version that is usually the one actually fetched by your browser; and there is template.css that is human readable and the one used in debug mode to help with trouble shooting.
I'm using Helix Ultimate (https://www.joomshaper.com/joomla-templ ... ixultimate). I'm working on updating our site from a back-up file made in 2020. A lot of the plug-ins, including the template, no longer exist, so I had to remove them all, leaving me with Cassiopeia. Cassiopeia wouldn't let me do anything as basic as add a top menu, so I went with a layout that would.

caitlinaod
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 28, 2024 3:29 pm

Re: Cannot insert breaks into template.css

Post by caitlinaod » Thu Feb 29, 2024 7:27 pm

Pavel-ww wrote:
Thu Feb 29, 2024 8:04 am
caitlinaod wrote:
Wed Feb 28, 2024 3:39 pm
Hi there. The template.css that came with my organization's Joomla template came with the code in one long, unreadable line.
Hi.
Never edit template.css and other template's core files, if you do not know exactly what you want to do and what will be the consequences.
If you need to write your own CSS create your CSS file following the documentation of your template and write your code there.
If you need to view the code from template.css in a convenient, readable form, use the Dev Tools of your browser.

If you need beautify the minified code, use the HTML editor as VS Code and similar or an online service via Ctrl + A > Ctr + C > Ctrl + V, but do not try to transfer lines manually. Google subject "beautify css"
Thanks, I'll give all that a try.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44068
Joined: Sat Apr 05, 2008 9:58 pm

Re: Cannot insert breaks into template.css

Post by Webdongle » Thu Feb 29, 2024 10:17 pm

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1613
Joined: Tue Jun 30, 2020 12:17 pm

Re: Cannot insert breaks into template.css

Post by Pavel-ww » Fri Mar 01, 2024 7:24 am

caitlinaod wrote:
Thu Feb 29, 2024 3:34 pm
I'm using Helix Ultimate
You did not need to delete Helix Ultimate.You needed to update it before migration. If you still have a backup of old site, start from the beginning, following the instructions for migration from Joomla documentation


Post Reply

Return to “Joomla! 5.x Coding”