Codebox theme

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Codebox theme

Re: Codebox theme

Post by joedf » 12 Jun 2019, 12:00

I took the bold style from the docs... it looks like user-defined funcs are bold. I have removed the linking for user-funcs.
What else do you think should change? :think:

Re: Codebox theme

Post by guest3456 » 10 Jun 2019, 08:58

lexikos wrote:
25 May 2019, 01:48

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...
Some functions are blue and bold, like that user-defined func quoted from lex above, and the redirect link fails naturally

Re: Codebox theme

Post by joedf » 05 Jun 2019, 18:44

darn... this is all from the prism code... and they update often.. especially for ahk .. :/

Re: Codebox theme

Post by gregster » 05 Jun 2019, 15:32

Fyi, there seems to be some problem with multi-line comments, if a single-line comment with ; is part of it, prematurely ending the grey syntax colouring.

Code: Select all

/*
function(){
	msgbox
}

function2(){
	; msgbox
}
msgbox
*/

Re: Codebox theme

Post by swagfag » 05 Jun 2019, 14:26

joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up?
idk, probably not. are you responsible for how tokens are identified or is that something prism.js's team has to fix?

there are also some discrepancies regarding instance methods, look at some of the snippets in this thread
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=65049

Re: Codebox theme

Post by joedf » 05 Jun 2019, 08:51

Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...

Re: Codebox theme

Post by swagfag » 05 Jun 2019, 03:26

how come some functions show up bold? is it so u can distinguish between built in and user defined functions?

format() shows up bold

Re: Codebox theme

Post by joedf » 03 Jun 2019, 15:41

Alright, thanks lexikos. looking into in later today. :+1:

EDIT:Added SendLevel and updated colours.

Re: Codebox theme

Post by lexikos » 02 Jun 2019, 00:15

In the documentation, built-in functions and commands seem to be the same blue as links. Since they are links, and the most useful part of the code to auto-link, that makes sense. Strings there are dark red (including unquoted strings for commands), but I don't care what colour they are as long as they're not the same as functions or other common keywords or identifiers.

token.keywords seem to be keywords used in unquoted command or directive args, like Loop Read, if between/is/not, maybe #Warn All, or sub-commands. The links wouldn't work too well since they aren't "primary" keywords like command names (i.e. they aren't in the documentation index). In the documentation, I think they are either not specifically highlighted, or are highlighted as part of the command name (with the "control flow" colour).

Re: Codebox theme

Post by joedf » 01 Jun 2019, 18:11

I had done an update for prism.js, but it seems like they broke the regex selectors again. What colours should strings or functions be? I can add in some manually changes; to include the SendLevel, and tweak the colours a little bit.
blueish for functions and green for strings (that's what this "Coy" theme seems to do) or the other way around? something like that?

I am not sure what token.keywords are supposed to be either, so I've disable the linking for those for now...

Re: Codebox theme

Post by lexikos » 25 May 2019, 01:48

Not that I don't like green, but I still think there's not enough differentiation between strings and not strings.

I'm not sure what .token.selector means exactly, but some commands and control flow statements use it:

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
There are a bunch of keywords that get replaced with highlighted links to documentation in the wrong context, and common context-sensitive keywords that don't get highlighted. I think it's better to not highlight than to highlight incorrectly. The irrelevant links are probably worse (more misleading).

Code: Select all

MsgBox All is not right, if read between lines.

Re: Codebox theme

Post by lexikos » 24 Apr 2019, 17:44

Not a theme issue as such, but SendLevel is not highlighted as a builtin.

Code: Select all

SendLevel 1
SendInput stuff

Re: Codebox theme

Post by joedf » 21 Apr 2019, 22:23

Okay updated.
https://autohotkey.com/boards/assets/prism/light/prism.css

Code: Select all

.token.builtin {
	color: #290e90;
}

Re: Codebox theme

Post by joedf » 21 Apr 2019, 22:07

Oouu... True. I just checked, the css classes are still correctly to builtin, string, etc.
But the prism.css stylesheet is wrong...

Re: Codebox theme

Post by lexikos » 21 Apr 2019, 18:44

Why are builtins and strings highlighted in the same (green) colour? Weren't builtins blue before?

They should be distinct. At the moment there are some lines of code that are almost entirely bright green (and they aren't comments, which used to be green...).

Re: Codebox theme

Post by TAC109 » 20 Nov 2018, 03:51

Looks good! Thanks.

Re: Codebox theme

Post by joedf » 20 Nov 2018, 01:05

updated prosilver.

Re: Codebox theme

Post by joedf » 18 Nov 2018, 21:22

Expand/Collapse should be fixed now.
Also, whenever cloudflare refreshes for you, the blue border should be removed now.

Re: Codebox theme

Post by joedf » 17 Nov 2018, 18:00

:|

The dark theme is on digi. the light theme is on simplicity.
I don't ill be making a switcher, we have other priority fixes... Really hoping tank replies back soon... :(

for the blue border, I will have to apply the following CSS when I get home (no proper access right now):

Code: Select all

pre[class*="language-"] > code {
    border: 0 !important;
    box-shadow: none !important;
}

Re: Codebox theme

Post by iseahound » 17 Nov 2018, 14:05

I liked the dark theme, how do I get it back?

Top