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

Add more language support #2

Merged
merged 51 commits into from Apr 15, 2015
Merged

Add more language support #2

merged 51 commits into from Apr 15, 2015

Conversation

@braver
Copy link
Contributor

braver commented Mar 26, 2015

This is going to take some work. I might even abandon this and try again later. I'll run back through my commits and do some before and after screenshots, but for some language features it's hard to do it right without changing the base a bit. Or as I said I'm seeing it wrong and I need to try again.

For now though, the checklist in no particular order:

  • SCSS
  • SASS
  • Stylus
  • Twig (works a treat as is, really highlights the structure of the code)
  • Smarty (no changes needed, mostly limited by the limited grammar)
  • PHP
  • Perl
  • Python
  • Java
  • Javascript
  • C
  • JSON
  • YAML
  • XML
  • HAML
  • Go
  • Haskell
  • Shell
  • LaTex
  • MediaWiki
  • ...



// Comments -----------------------------------

This comment has been minimized.

Copy link
@braver

braver Mar 26, 2015

Author Contributor

comments were being overruled in some cases so I moved this down

@braver
Copy link
Contributor Author

braver commented Mar 26, 2015

Also, about the separate small files, I'm not seeing a performance hit. The themes files are compiled and cached and those caches probably aren't refreshed very often. So I think it's fine to split them up in really small files.

@simurai
Copy link
Owner

simurai commented Mar 31, 2015

  1. Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.
  2. Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find. Not sure what color though.. currently there are just 4 levels of purple. "white" being just a very bright purple. So it might could be an "almost white"?

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

@braver
Copy link
Contributor Author

braver commented Mar 31, 2015

Hmm.. I also like its simplicity and not sure if having a different color between tags vs classes is necessarily better.

Agreed

Yeah, that might be a good idea. Mostly because in Less the mixins look like selectors and makes it confusing and harder to find.

I've definitely had to look twice a few times because of that. I'll look into it and try to pick a color that makes sense.

btw. the duo-3 color isn't used anywhere.. I just added it to have 4 colors for each. Maybe we can remove it for now and just add it if we really need a 4th duo color.

Yeah, I noticed. If I haven't found a use for it by the end of the week it's going out 😉

simurai and others added 2 commits Mar 31, 2015
Have property vs values similar to less/css
@braver
Copy link
Contributor Author

braver commented Mar 31, 2015

uno-2 seems like the subtle option. Gets a bit lots in a sea of variables depending on what your stylesheet looks like. Not sure if that's a problem, at least it doesn't look like a selector.
screen shot 2015-03-31 at 23 35 50

I like it with duo-2 too though. This is otherwise only used for units, so mixins really stand out. And I like that because usually a mixin is actually kinda special.
screen shot 2015-03-31 at 23 36 14

What do you think?

@simurai
Copy link
Owner

simurai commented Mar 31, 2015

I agree on using duo-2 for mixins. yeah, uno-2 get's lost a bit.. and adding a 5th uno color (uno-1.5) might be too hard to tell them apart.

@braver
Copy link
Contributor Author

braver commented Apr 4, 2015

Done deal

@simurai
Copy link
Owner

simurai commented Apr 5, 2015

Ok, duo-3 has to go.. 😬 I played around with a logo and 7 shades work perfectly:

duotone-dark 1x

@simurai
Copy link
Owner

simurai commented Apr 5, 2015

Ooops.. I guess updating the README broke the auto-merge.

@braver
Copy link
Contributor Author

braver commented Apr 5, 2015

That logo is so cool!

@braver
Copy link
Contributor Author

braver commented Apr 13, 2015

I'm actually pretty happy with this in its current state, for the language I have to live with daily. What's still a "problem" though is that we default to uno-4 for source. That means that for very limited language packages like that for javascript or shell scripts, a lot of text is very subdued. I now resolve that per language by going to uno-2. Which is a bit inelegant. Other syntax themes don't tend to deal with lacking grammars any more gracefully though.

@braver
Copy link
Contributor Author

braver commented Apr 13, 2015

@simurai I checked everything off, checking mostly if it looks ok without adding too much detail/complexity. Would love to get your feedback on this and see if there's anything left to tweak before merging this.

@simurai
Copy link
Owner

simurai commented Apr 15, 2015

Awesome! Yeah, let's merge it. Looks good for the languages that I use too.

Right, uno-4 for source is a bit unfortunate. There is no way around it unless updating the grammars to add extra selectors, right?

Maybe an option would be to do:

@syntax-text: @uno-2; // colors.less

// _base.less
.meta {
  .uno-4();
}

So the default text color (for any unknown language) is uno-2 and then for the languages that we support/control add the uno-4 back.

.css {
  &.source {
    .uno-4();
  }
}

Would have higher specificity which might messes up some stuff. Would have to try.

simurai added a commit that referenced this pull request Apr 15, 2015
Add more language support
@simurai simurai merged commit baff211 into simurai:master Apr 15, 2015
@simurai
Copy link
Owner

simurai commented Apr 15, 2015

I still have this atom/atom#5903 issue pinned in my browser. Would be so cool to easily change the uno/duo colors without forking the whole theme.

"Salmon On Ice":
screen shot 2015-04-15 at 3 50 18 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.