Can I use @import to import Kod's default style sheet into my own?

2

I understand that Kod is being actively developed and is prone to drastic changes in any area. I would like to modify some small things (like font face and size or certain colors) while still being able to benefit from any changes or updates to the default Kod stylesheet.

I thought that I would be able to @import the default stylesheet into my own to achieve this. This is what ~/.kod/custom.css would look like,

@import url("file:///Applications/Kod.app/Contents/Resources/style/default.css");

/* Change the default font face and color. */
body {
    font-family: Menlo, monospace;
    color: #efefef;
}

This stylesheet was set with the following defaults command, per the comments at the top of Kod's default CSS file:

defaults write se.hunch.kod style/url ~/.kod/custom.css

Unfortunately, this didn't work. When I first tried to reload the style, Kod crashed. It opened fine again, but

  • the @import statement wasn't working, and
  • Kod crashed every time I saved the custom.css file.

Am I doing something wrong? Did I write my @import statement wrong? Is that not how @import is supposed to work? Did I miss some sort of documentation or Kod Google Groups post that mentions that Kod explicitly disallows this?

Thomas Upton

Posted 2011-02-01T21:54:18.440

Reputation: 248

Answers

1

It seems Kod does not support @import statements in the CSS.

As a workaround, you can use version control software. I have no experience with git, which this Kod folks use, but you can probably set up a local copy of https://github.com/rsms/kod/tree/master/resources/style somewhere, and keep this updated whenever you update Kod itself. Keep your own changes, and they'll be merged with any updates to these files.

Daniel Beck

Posted 2011-02-01T21:54:18.440

Reputation: 98 421

Do you have a reference or link to some source that definitively says that Kod doesn't support @import statements? – Thomas Upton – 2011-02-01T22:12:27.427

@Thomas Besides it also not working for me, no. – Daniel Beck – 2011-02-02T07:20:58.557

For some reason, it's now crashing all the time, so I cannot continue to investigate. Sorry. – Daniel Beck – 2011-02-02T07:48:03.297