Skip to content

Instantly share code, notes, and snippets.

@subesokun
Created October 16, 2016 16:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subesokun/04909f8ff45fbc28faad016559adc267 to your computer and use it in GitHub Desktop.
Save subesokun/04909f8ff45fbc28faad016559adc267 to your computer and use it in GitHub Desktop.
Atom tree-view-git-status branch styling
.tree-view-git-status.git-branch-production {
color: red;
text-shadow: -1px 0px 8px rgba(255, 12, 12, 1);
}
.tree-view-git-status.git-branch-master .branch-label {
color: gold;
text-shadow: -1px 0px 8px rgba(255, 215, 0, 1);
}
@a7madgamal
Copy link

awesome :)
Any idea how can I select ALL branches starting with feature/xxx or hotfix/xxx etc. ?

@adrienv1520
Copy link

To select all "feature-xxx" branches :

[class^="tree-view-git-status git-branch-feature-"] {
  color: rgb(42, 154, 189);
  text-shadow: -1px 0px 8px rgb(42, 154, 189, 1);
}

Did not work for me with "/".

@subesokun
Copy link
Author

Mh right, "/" might cause some issues with the CSS selectors. Maybe some special handling needs to be implemented to strip away those characters.

@PatrickJS
Copy link

PatrickJS commented Aug 9, 2018

you can update the code to normalize the branch name to something that works for css. for example transform / -> -
https://github.com/subesokun/atom-tree-view-git-status/blob/b6f9c3ae576c8d3016126cdeb0a195572cf35c8d/lib/treeviewui.coffee#L250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment