mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
89 lines
1.9 KiB
Plaintext
89 lines
1.9 KiB
Plaintext
@import "ui-variables";
|
|
|
|
// Core mixins
|
|
// ----------------------------------------
|
|
|
|
// Focus
|
|
//
|
|
.tab-focus() {
|
|
outline: 2px auto @text-color-info;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
|
|
// Border-radius
|
|
//
|
|
.border-top-radius(@radius) {
|
|
border-top-right-radius: @radius;
|
|
border-top-left-radius: @radius;
|
|
}
|
|
.border-right-radius(@radius) {
|
|
border-bottom-right-radius: @radius;
|
|
border-top-right-radius: @radius;
|
|
}
|
|
.border-bottom-radius(@radius) {
|
|
border-bottom-right-radius: @radius;
|
|
border-bottom-left-radius: @radius;
|
|
}
|
|
.border-left-radius(@radius) {
|
|
border-bottom-left-radius: @radius;
|
|
border-top-left-radius: @radius;
|
|
}
|
|
|
|
|
|
// Clearfix
|
|
//
|
|
// For modern browsers
|
|
// 1. The space content is one way to avoid an Opera bug when the
|
|
// contenteditable attribute is included anywhere else in the document.
|
|
// Otherwise it causes space to appear at the top and bottom of elements
|
|
// that are clearfixed.
|
|
// 2. The use of `table` rather than `block` is only necessary if using
|
|
// `:before` to contain the top-margins of child elements.
|
|
//
|
|
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
|
|
|
.clearfix() {
|
|
&:before,
|
|
&:after {
|
|
content: " "; // 1
|
|
display: table; // 2
|
|
}
|
|
&:after {
|
|
clear: both;
|
|
}
|
|
}
|
|
|
|
|
|
// CSS image replacement
|
|
//
|
|
// Heads up! v3 launched with only `.hide-text()`, but per our pattern for
|
|
// mixins being reused as classes with the same name, this doesn't hold up. As
|
|
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
|
|
//
|
|
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
|
|
|
// Deprecated as of v3.0.1 (has been removed in v4)
|
|
.hide-text() {
|
|
font: ~"0/0" a;
|
|
color: transparent;
|
|
text-shadow: none;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
// New mixin to use as of v3.0.1
|
|
.text-hide() {
|
|
.hide-text();
|
|
}
|
|
|
|
|
|
// Text overflow
|
|
// Requires inline-block or block for proper styling
|
|
|
|
.text-overflow() {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|