 |
 |
Style Sheets written in TextEdit cannot be edited.
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
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
|
|
|
(Last edited by Veltliner; Jan 3, 2009 at 01:40 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Online
|
|
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
|
|
Originally Posted by besson3c
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
|
|
Have you tried deleting Safari's cache?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
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
|
|
Originally Posted by Veltliner
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
|
|
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
|
|
|
|
|
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: The back of the room
Status:
Offline
|
|
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
|
|
Originally Posted by EndlessMac
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
|
|
Originally Posted by Gavin
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
|
|
Originally Posted by zro
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
|
|
Originally Posted by Veltliner
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
|
|
Originally Posted by Veltliner
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.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
Originally Posted by mactoids
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
|
|
Originally Posted by besson3c
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
|
|
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.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|