Skip to content

Instantly share code, notes, and snippets.

@alecperkins
Last active December 16, 2015 09:39
Show Gist options
  • Save alecperkins/5414611 to your computer and use it in GitHub Desktop.
Save alecperkins/5414611 to your computer and use it in GitHub Desktop.
Custom theme styles for Fargo (http://fargo.io). Adds some usability tweaks like hover states and a border indicating dropping a child vs a sibling. (Some of the rules are webkit specific since I primary use Chrome.) Feel free to use them, or fork and make them your own.
/* Hand cursor indicating the "wedge" is clickable. */
.node-icon {
cursor: pointer !important;
}
/* Keep the line-length of individual nodes from getting too wide. */
.concord-text {
max-width: 48em;
}
/* Move cursor indicating the node can be moved. */
.concord-node.selected > .concord-wrapper > .node-icon:hover {
cursor: move !important;
}
/* Better differentiate collapsed wedges from expanded wedges. */
.concord-node.collapsed > .concord-wrapper.type-icon .node-icon.icon-caret-right {
color: #BE202E !important;
}
.concord-node:not(.collapsed) > .concord-wrapper.type-icon > .node-icon.icon-caret-right {
-webkit-transform: rotateZ(90deg);
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 0.25s;
}
/* Hover state for individual node */
.concord-node:not(.selected) > .concord-wrapper:hover {
background-color: rgba(0,0,222,0.1) !important;
}
/* Show focused nodes in a darker blue (since the plain cursor isn't
always so noticable). */
.concord-node:not(.selected) > .concord-wrapper > .concord-text:focus {
background-color: rgba(0,0,222,0.2) !important;
}
.concord-node {
border-left: 1px dotted transparent;
}
.concord-node:hover {
border-left-color: rgba(85,85,85,0.4);
}
/* Show a border to better indicate where the node being dragged will end up.
(transparent border to avoid a jumping effect when the border shows.) */
.concord-node > .concord-wrapper {
border-bottom: 2px dotted transparent !important;
}
.concord-node.drop-sibling > .concord-wrapper {
border-bottom: 2px dotted blue !important;
}
.concord-node > .concord-wrapper > .concord-text {
border-bottom: 2px dotted transparent !important;
}
.concord-node.drop-child > .concord-wrapper > .concord-text {
border-bottom: 2px dotted blue !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment