Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update GitHub theme css to match GitHub's current styling #1616

Closed
RoseEnd opened this issue Oct 19, 2017 · 7 comments · Fixed by #2798
Closed

Chore: Update GitHub theme css to match GitHub's current styling #1616

RoseEnd opened this issue Oct 19, 2017 · 7 comments · Fixed by #2798
Labels
enhancement An enhancement or new feature good first issue Should be easier for first time contributors help welcome Could use help from community theme

Comments

@RoseEnd
Copy link

RoseEnd commented Oct 19, 2017

No description provided.

@joshgoebel
Copy link
Member

There is both gist and Github which are different, are you taking that into account? Can you provide screen snaps to show the current differences?

@pd4d10
Copy link
Contributor

pd4d10 commented Oct 5, 2019

Hi, is there any progress on this?

Seems the latest commit related to github.css was at 2015. Probably GitHub updated their syntax highlighting theme since then.

Screenshots

highlight.js with github.css:

GitHub

@joshgoebel
Copy link
Member

joshgoebel commented Oct 5, 2019

To me that looks a LOT like the Gist style... Do we want two styles that are almost exactly the same? I agree long-term the naming might be a problem though, but that seems a legacy concern at this point... Though I guess we could just have a list and call it Github 2009 or something LOL without changing the file.

A note on some of the highlighting Github is doing:

  • factory() - function calls
  • &&, ===, || operators

It's long been Highlight.js's policy (I've seen it mentioned on here) to not highlight at this level IIRC. IE, we don't highlight punctuation. I'm not 100% sure about function calls, but most of the syntaxes (all?) don't highlight them. We only highlight the function definitions.

So these two things alone mean our highlighting isn't ever going to match Github. A lot of other places are using far more complex highlighting rulesets so they are going to be able to highlight things we can't easily because our rules are simpler. I think that's intentional (from a maintenance perspective).

Not say you can't do these things in Highlight.js lightly... I've been playing around with a Javascript ruleset for myself that highlights MUCH, MUCH more - and it's not that much more complex... but AFAIK that isn't the direction that core wants to take.

Someone else can jump in here and correct me if I'm mistaken.

@joshgoebel
Copy link
Member

joshgoebel commented Oct 5, 2019

@marcoscaceres Any thoughts on the visual angle here? Should "Github" be kept up-to-date to match Github as closely as possible (not counting the things we have no intention to try matching, assuming I'm correct on that) - or should it be "static" and recognizable to people over time? Or both... but I'm not sure we want "Github 2015", "Github 2020", etc... some of these things smell like "policy" decisions to me. :-)

Perhaps @RoseEnd or @pd4d10 have thoughts on those concerns?

Personally I think if a site CARES about theming or really wants a match it's not hard to just write a custom style (esp if you're borrowing one)... and that the Gist theme here seems close enough to just "call it a day"... but I have no objection to a PR if we'd welcome it. I just wonder about people who "like" the existing Github theme and it breaking for them, etc...

@marcoscaceres
Copy link
Contributor

IMO, it should be kept up to date. Only if it was to change radically should we spin off a new version of it.

@joshgoebel
Copy link
Member

Well ok then, sounds like we just need a PR and maybe some before and after snaps just for prettiness. :-)

@joshgoebel joshgoebel added the enhancement An enhancement or new feature label Oct 7, 2019
@joshgoebel joshgoebel changed the title The style of github.css is quite different from the one on the GitHub website, and I hope to update it Update GitHub theme css to match GitHub's current styling Oct 7, 2019
@joshgoebel joshgoebel added good first issue Should be easier for first time contributors theme labels Oct 7, 2019
@joshgoebel joshgoebel added the help welcome Could use help from community label Dec 15, 2019
@joshgoebel joshgoebel changed the title Update GitHub theme css to match GitHub's current styling Chore: Update GitHub theme css to match GitHub's current styling Apr 30, 2020
@joshgoebel
Copy link
Member

@pd4d10 You don't want to make a PR for this, do you? :)

@Hirse Hirse mentioned this issue Oct 29, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature good first issue Should be easier for first time contributors help welcome Could use help from community theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants