The fancy “new” web preview, not the built-in boring one. :)
I'm trying to create my own theme for the web preview and I have a couple of questions. I've got CSS in `~/Library/Application Support/TextMate/Themes/Webpreview/Liberation/style.css`. Among other things, it contains this:
body { background: #FAF4DC; font-family: "Liberation Sans"; } pre, code { font-family: "Liberation Mono"; }
So, my first question is: Why does this font get applied to all themes and not just when I select “Liberation” from the drop-down?
Second question…
I'm a plain-text e-mail guy, but on occasion, I'll want to copy and paste something out of the web preview (generated using Markdown) to send to Windows/Outlook-using coworkers that don't care about standards. Since they probably won't have the Liberation fonts, I tried to add some fallbacks like this:
body { background: #FAF4DC; font-family: "Liberation Sans, Helvetica Neue, sans-serif"; } pre, code { font-family: "Liberation Mono, Consolas, monospace"; }
This causes the font to be ignored completely and everything reverts to Times (again, in all themes). That should be valid CSS, so why does it break? Isn't this just being parsed by the system's WebKit?
Can I do what I'm trying to do? Thanks.
On Fri, Aug 20, 2010 at 22:08, Rob McBroom mailinglist0@skurfer.com wrote:
The fancy “new” web preview, not the built-in boring one. :)
I'm not sure what you mean by that, for all I know the features you're talking about are available in the built-in web preview…
I'm trying to create my own theme for the web preview and I have a couple of questions. I've got CSS in `~/Library/Application Support/TextMate/Themes/Webpreview/Liberation/style.css`. Among other things, it contains this:
body { background: #FAF4DC; font-family: "Liberation Sans"; } pre, code { font-family: "Liberation Mono"; }
So, my first question is: Why does this font get applied to all themes and not just when I select “Liberation” from the drop-down?
I forgot the reason, but you need to add classes to your selectors like `.Liberation body`.
Second question…
I'm a plain-text e-mail guy, but on occasion, I'll want to copy and paste something out of the web preview (generated using Markdown) to send to Windows/Outlook-using coworkers that don't care about standards. Since they probably won't have the Liberation fonts, I tried to add some fallbacks like this:
body { background: #FAF4DC; font-family: "Liberation Sans, Helvetica Neue, sans-serif"; } pre, code { font-family: "Liberation Mono, Consolas, monospace"; }
This causes the font to be ignored completely and everything reverts to Times (again, in all themes). That should be valid CSS, so why does it break? Isn't this just being parsed by the system's WebKit?
I think you quote individual components in CSS, not the whole value, so it would have to be `"Liberation Sans", "Helvetica Neue", sans-serif;`.
HTH, Martin
On Aug 20, 2010, at 4:18 PM, Martin Kühl wrote:
On Fri, Aug 20, 2010 at 22:08, Rob McBroom mailinglist0@skurfer.com wrote:
The fancy “new” web preview, not the built-in boring one. :)
I'm not sure what you mean by that, for all I know the features you're talking about are available in the built-in web preview…
OK, so they're both bundled with TextMate, but there's the one that's on the application's Window menu (which is what I meant by “built-in”) and then there's the one that uses stuff in the support folder.
I forgot the reason, but you need to add classes to your selectors like `.Liberation body`.
I'll look into that. Thanks.
I think you quote individual components in CSS, not the whole value, so it would have to be `"Liberation Sans", "Helvetica Neue", sans-serif;`.
Wow. I was a web developer once. I've apparently been doing sysadmin work for too long. I've smacked myself in the head for you.
On Aug 20, 2010, at 4:18 PM, Martin Kühl wrote:
I forgot the reason, but you need to add classes to your selectors like `.Liberation body`.
A note for anyone else messing with themes…
For child elements, like pre, you would do something like `.Liberation pre`. The body tag will get `class="Liberation"`, so to style the body itself, just define `.Liberation`.
hello all - I'm pretty sure I asked this a few months ago but I just can't seem to find the email or the answer!
anyway, I'm just wondering about the small tool-tip type notification of 'Errors" and "Warnings" that I get when I save an HTML page where something might not be totally kosher. is there some way to see these errors & warnings? some kind of log file? I'd love to know.
thanks.
bennett
On Aug 25, 2010, at 5:14 AM, plastichairdoo wrote:
anyway, I'm just wondering about the small tool-tip type notification of 'Errors" and "Warnings" that I get when I save an HTML page where something might not be totally kosher. is there some way to see these errors & warnings? some kind of log file? I'd love to know.
Every command is different, so there's no telling, but probably not. You'll have to look at the command that generates the message to see what it does.
You could either change the output from Tool Tip to something more permanent, or you could modify the command so it logs messages to a file before displaying the Tool Tip.
thanks Rob, any idea which command this might be? can't seem to find the culprit. b
On Aug 25, 2010, at 6:26 AM, Rob McBroom wrote:
On Aug 25, 2010, at 5:14 AM, plastichairdoo wrote:
anyway, I'm just wondering about the small tool-tip type notification of 'Errors" and "Warnings" that I get when I save an HTML page where something might not be totally kosher. is there some way to see these errors & warnings? some kind of log file? I'd love to know.
Every command is different, so there's no telling, but probably not. You'll have to look at the command that generates the message to see what it does.
You could either change the output from Tool Tip to something more permanent, or you could modify the command so it logs messages to a file before displaying the Tool Tip.
-- Rob McBroom http://www.skurfer.com/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Aug 25, 2010, at 10:48 AM, plastichairdoo wrote:
thanks Rob, any idea which command this might be? can't seem to find the culprit.
Whichever command you run before you see the Tool Tip, I guess. If you don't know it's name, you can find it like this:
1. Hit ⌃⌘T 2. Click the magnifying glass and change it to Key Equivalent 3. Hit whatever keystroke you normally hit before you see the Tool Tip
That should show you the name of the command and which bundle it's in. You can go to the Bundle Editor and find it once you have that info.
thank Rob - that was it! I have CMD-S set to run "Validate w/JS Lint" before I save - running the full 'Validate' command shows the errors and the warnings.
much appreciated!!
b
On Aug 25, 2010, at 7:58 AM, Rob McBroom wrote:
On Aug 25, 2010, at 10:48 AM, plastichairdoo wrote:
thanks Rob, any idea which command this might be? can't seem to find the culprit.
Whichever command you run before you see the Tool Tip, I guess. If you don't know it's name, you can find it like this:
- Hit ⌃⌘T
- Click the magnifying glass and change it to Key Equivalent
- Hit whatever keystroke you normally hit before you see the Tool Tip
That should show you the name of the command and which bundle it's in. You can go to the Bundle Editor and find it once you have that info.
-- Rob McBroom http://www.skurfer.com/
Don't try to tell me something is important to you if the whole of your “support” entails getting Congress to force *others* to spend time and money on it.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate