Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Style Sheets written in TextEdit cannot be edited.

Style Sheets written in TextEdit cannot be edited.
Thread Tools
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 3, 2009, 01:01 AM
 
I just came across a weird bug.

I write a css style sheet.

Text color black.

Save it.

Then I edit it. e.g I change the text color from black to red.

I open the document in Safari.

The text color is still black. The edited style sheet says the text is red, but Safari still shows the old, not valid black.

I open it in Firefox. Firefox displays the changes to the style sheet.

If I want Safari to get to display the style sheet, I need to go to any site on the web. This erases possibly some memory, because when I return to the file, the changes made to the style sheet are now visible.

A bug in Safari 3?


PS: when you save a style sheet with the .css extension in textedit, and close it...

you want to open it, right click on the file... choose "open with":

TextEdit does not appear among the choices. You need to go to "other", then search for TextEdit, then you can open it.

Is .css something you need to avoid when you name a style sheet?

Maybe .css is not an allowed extension for textedit?
(Last edited by Veltliner; Jan 3, 2009 at 01:40 AM. )
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 3, 2009, 01:13 AM
 
(deleted)
(Last edited by Veltliner; Jan 3, 2009 at 01:40 AM. )
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Online
Reply With Quote
Jan 3, 2009, 02:06 AM
 
I assume you're not doing this in Rich Text/RTF mode?

It sounds to me like a cache issue. When you cat the file, are you seeing any other data other than your CSS declarations? When you save the file, is the last updated timestamp changing? When you empty your browser's cache, does this solve the problem?
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 3, 2009, 12:18 PM
 
Originally Posted by besson3c View Post
I assume you're not doing this in Rich Text/RTF mode?

It sounds to me like a cache issue. When you cat the file, are you seeing any other data other than your CSS declarations? When you save the file, is the last updated timestamp changing? When you empty your browser's cache, does this solve the problem?
I'm doing this in plain text mode, like all the HTML/XHTML.

There is nothing else in the file but the CSS selectors and style elements and their attributes.

The problem does not occur with Firefox (only: Safari starts up almost instantly, while Firefox takes two to three seconds, so I'd like this to work with Safari).

It helps mostly to completely close Safari, and then open it again. But not always. Which makes this unreliable to check on style changes.

I don't know exactly what you mean by "time stamp", but when I alter the TextEdit file with the css stylesheet, then the time of the edit shows up in the Get Info box.
(Last edited by Veltliner; Jan 3, 2009 at 12:24 PM. )
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Online
Reply With Quote
Jan 3, 2009, 02:14 PM
 
Have you tried deleting Safari's cache?
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 3, 2009, 07:27 PM
 
I have not done that yet.

But if that was a cache problem, one would have to delete the cache every time one changed something in a style sheet.

I'll try that out tonight.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Online
Reply With Quote
Jan 3, 2009, 07:45 PM
 
Originally Posted by Veltliner View Post
I have not done that yet.

But if that was a cache problem, one would have to delete the cache every time one changed something in a style sheet.

I'll try that out tonight.
Maybe, maybe not. Try it.
     
Senior User
Join Date: Dec 2005
Status: Offline
Reply With Quote
Jan 3, 2009, 11:52 PM
 
It does sound like a cache issue in Safari but I'm also guessing.

On a related topic if you hand code your websites then try out TextWrangler. I find it much nicer to use than TextEdit for website coding.

It's a free program but it has some features that helps make coding easier. For example, it will let you switch quickly back and forth between webpage files with its sidebar and allows you to open them all within one program rather than mutiple windows. It also allows you to color code your programming codes so they are easier to read and quickly see where they start and stop. It's got other nice features too but I would rather not take the time to list them all.
     
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Jan 4, 2009, 05:39 AM
 
have you tried the editcss module for firefox? it shows your css in an editable sidebar, the page updates instantly when changes are made to the css. very nice for fine tuning.

https://addons.mozilla.org/en-US/fir...cation=firefox
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
     
zro
Mac Elite
Join Date: Nov 2003
Location: The back of the room
Status: Offline
Reply With Quote
Jan 4, 2009, 10:02 AM
 
Is this a style sheet for the browser or for a page?

If it's for the browser, then Safari has always held on too tightly to style sheets. Try selecting a different one, close preferences, re-open preferences and reselect your original. Or quit and relaunch Safari after saving your changes.

A style sheet for a page (or site) will pick up with a simple reload for me. If for a page, is your code external, internal or in-line?
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 4, 2009, 12:37 PM
 
Originally Posted by EndlessMac View Post
It does sound like a cache issue in Safari but I'm also guessing.

On a related topic if you hand code your websites then try out TextWrangler. I find it much nicer to use than TextEdit for website coding.

It's a free program but it has some features that helps make coding easier. For example, it will let you switch quickly back and forth between webpage files with its sidebar and allows you to open them all within one program rather than mutiple windows. It also allows you to color code your programming codes so they are easier to read and quickly see where they start and stop. It's got other nice features too but I would rather not take the time to list them all.
Thanks.

I downloaded it. This looks great!

If I close Safari (not close the window, but the app), and open it again, changes to the style sheet will be reflected in the page.
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 4, 2009, 12:43 PM
 
Originally Posted by Gavin View Post
have you tried the editcss module for firefox? it shows your css in an editable sidebar, the page updates instantly when changes are made to the css. very nice for fine tuning.

https://addons.mozilla.org/en-US/fir...cation=firefox
Looks like I have to pay Firefox a lot more attention. I have it on my computer, but so far use mostly Safari.
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 4, 2009, 12:45 PM
 
Originally Posted by zro View Post
Is this a style sheet for the browser or for a page?

If it's for the browser, then Safari has always held on too tightly to style sheets. Try selecting a different one, close preferences, re-open preferences and reselect your original. Or quit and relaunch Safari after saving your changes.

A style sheet for a page (or site) will pick up with a simple reload for me. If for a page, is your code external, internal or in-line?
It's for a page.

Quitting and re-opening Safari is the quickest way.

Now I'm going to try out Text-Wrangler and see if Safari still insists on this procedure.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Online
Reply With Quote
Jan 4, 2009, 12:51 PM
 
Originally Posted by Veltliner View Post
Looks like I have to pay Firefox a lot more attention. I have it on my computer, but so far use mostly Safari.
Definitely. I can't live without Firebug or the Web Developer extension.
     
Fresh-Faced Recruit
Join Date: Sep 2008
Status: Offline
Reply With Quote
Jan 4, 2009, 08:58 PM
 
Originally Posted by Veltliner View Post
It's for a page. Quitting and re-opening Safari is the quickest way. Now I'm going to try out Text-Wrangler and see if Safari still insists on this procedure.
TextWrangler is a nice - I also use that app. I was going to suggest you also enable the Safari Develop Menu, as it's helpful, too. Funny, as I always seem to have more trouble with the Firefox cache hanging on too tightly, than the Safari cache.
mactoids.com  work smarter
mac os x tips and imac history
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 5, 2009, 01:14 AM
 
Originally Posted by mactoids View Post
TextWrangler is a nice - I also use that app. I was going to suggest you also enable the Safari Develop Menu, as it's helpful, too. Funny, as I always seem to have more trouble with the Firefox cache hanging on too tightly, than the Safari cache.
Thanks for the tip with the developer menu. Very interesting.
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 5, 2009, 11:09 PM
 
Originally Posted by besson3c View Post
Definitely. I can't live without Firebug or the Web Developer extension.
I just found out that Safari cannot read the border styles groove, ridge, outset. (I have seen traces of a display of these styles, but it's done so poorly you wouldn't notice if you didn't know it's been applied).

Firefox does it well. Isn't this weird?
(Last edited by Veltliner; Jan 5, 2009 at 11:25 PM. )
     
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 5, 2009, 11:11 PM
 
Regarding seeing changes to style sheets, a click on the reload button does the trick.


TextWranger: wonderful application. After only 2 days I wouldn't want to use anything else. TextEdit retired, grumpy.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 04:16 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2