lbry.tech/app/sass/init/_mixins.scss
ポール ウェッブ b1a5c11ddf Refactor in progress
2018-08-28 18:57:18 -05:00

91 lines
2 KiB
SCSS

@mixin center {
align-items: center;
display: inline-flex;
justify-content: center;
}
@mixin font-sans {
font-family: Karla, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
@mixin font-serif {
font-family: Georgia, serif;
}
@mixin font-mono {
font-family: "Courier New", monospace;
}
@mixin clearfix {
clear: both;
content: "";
display: block;
}
@mixin hide-text {
border: 0;
color: transparent;
font: 0/0 a;
text-shadow: none;
}
@mixin ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@mixin selection($backgroundColor, $textColor) {
&::selection {
background-color: $backgroundColor;
color: $textColor;
text-shadow: none;
}
&::-moz-selection {
background-color: $backgroundColor;
color: $textColor;
text-shadow: none;
}
}
@mixin underline($textColor: #000, $whitespaceColor: #fff) {
@include selection($textColor, $whitespaceColor);
background-image: linear-gradient($whitespaceColor, $whitespaceColor), linear-gradient($whitespaceColor, $whitespaceColor), linear-gradient($textColor, $textColor);
background-position: 0 88%, 100% 88%, 0 88%;
background-repeat: no-repeat, no-repeat, repeat-x;
background-size: 0.05rem 1px, 0.05rem 1px, 1px 1px;
box-decoration-break: clone;
display: inline;
text-decoration: none;
text-shadow: 0.03rem 0 $whitespaceColor, -0.03rem 0 $whitespaceColor, 0 0.03rem $whitespaceColor, 0 -0.03rem $whitespaceColor, 0.06rem 0 $whitespaceColor, -0.06rem 0 $whitespaceColor, 0.09rem 0 $whitespaceColor, -0.09rem 0 $whitespaceColor, 0.12rem 0 $whitespaceColor, -0.12rem 0 $whitespaceColor, 0.15rem 0 $whitespaceColor, -0.15rem 0 $whitespaceColor;
@-moz-document url-prefix() {
background-position: 0 90%, 100% 90%, 0 90%;
}
}
@mixin no-user-select {
user-select: none;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.clear {
@include clearfix;
}
.hide-text {
@include hide-text;
}