1
1
mirror of https://github.com/primer/css.git synced 2024-11-27 09:45:45 +03:00
css/scss/_utility.scss
2015-06-23 20:57:59 -04:00

87 lines
1.3 KiB
SCSS

// Clear floats
.clearfix {
@include clearfix;
}
// Floats
.right { float: right; }
.left { float: left; }
// Layout
// Centers content horizontally. Can be used inside or outside the grid.
.centered {
display: block;
float: none;
margin-left: auto;
margin-right: auto;
}
// Text alignment
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }
// Text states
.danger { color: #c00; }
.mute { color: #000; }
.text-diff-added { color: darken($brand-green, 10%); }
.text-diff-deleted { color: $brand-red; }
.text-open,
.text-success { color: $status-open; }
.text-closed { color: $status-closed; }
.text-reverted { color: $status-reverted; }
.text-merged { color: $status-merged; }
.text-renamed { color: $status-renamed; }
.text-pending { color: $status-pending; }
.text-error,
.text-failure { color: $brand-red; }
// Muted link
//
// Have a link you need to be gray to start, and blue on hover? Use this.
.muted-link {
color: $brand-gray;
&:hover {
color: $brand-blue;
text-decoration: none;
}
}
// Misc
.hidden {
display: none;
}
.warning {
padding: 0.5em;
margin-bottom: 0.8em;
font-weight: bold;
background-color: #fffccc;
}
.error_box {
padding: 1em;
font-weight: bold;
background-color: #ffebe8;
border: 1px solid #dd3c10;
}