debian-mirror-gitlab/app/assets/stylesheets/base/mixins.scss

160 lines
2.9 KiB
SCSS
Raw Normal View History

2014-09-02 18:07:02 +05:30
/**
* Generic mixins
*/
@mixin box-shadow($shadow) {
-webkit-box-shadow: $shadow;
-moz-box-shadow: $shadow;
-ms-box-shadow: $shadow;
-o-box-shadow: $shadow;
box-shadow: $shadow;
}
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
@mixin border-radius-left($radius) {
@include border-radius($radius 0 0 $radius)
}
2015-09-11 14:41:01 +05:30
@mixin border-radius-right($radius) {
@include border-radius(0 0 $radius $radius)
}
2014-09-02 18:07:02 +05:30
@mixin linear-gradient($from, $to) {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
background-image: -webkit-linear-gradient($from, $to);
background-image: -moz-linear-gradient($from, $to);
background-image: -ms-linear-gradient($from, $to);
background-image: -o-linear-gradient($from, $to);
}
@mixin transition($transition) {
-webkit-transition: $transition;
-moz-transition: $transition;
-ms-transition: $transition;
-o-transition: $transition;
transition: $transition;
}
/**
* Prefilled mixins
* Mixins with fixed values
*/
@mixin shade {
@include box-shadow(0 0 3px #ddd);
}
@mixin solid-shade {
@include box-shadow(0 0 0 3px #f1f1f1);
}
@mixin md-typography {
2015-04-26 12:48:37 +05:30
font-size: 15px;
line-height: 1.5;
2014-09-02 18:07:02 +05:30
img {
max-width: 100%;
}
*:first-child {
margin-top: 0;
}
2015-04-26 12:48:37 +05:30
code {
font-family: $monospace_font;
white-space: pre;
word-wrap: normal;
2015-09-11 14:41:01 +05:30
padding: 1px 2px;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #FCFCFC;
border-width: 1px;
border-style: solid;
border-color: #CCC #CCC #BBB;
border-image: none;
border-radius: 3px;
box-shadow: 0px -1px 0px #BBB inset;
2015-04-26 12:48:37 +05:30
}
2014-09-02 18:07:02 +05:30
h1 {
margin-top: 45px;
font-size: 2.5em;
}
h2 {
margin-top: 40px;
font-size: 2em;
}
h3 {
margin-top: 35px;
font-size: 1.5em;
}
h4 {
margin-top: 30px;
font-size: 1.2em;
}
2015-09-11 14:41:01 +05:30
blockquote {
2014-09-02 18:07:02 +05:30
color: #888;
2015-04-26 12:48:37 +05:30
font-size: 15px;
2014-09-02 18:07:02 +05:30
line-height: 1.5;
}
table {
@extend .table;
@extend .table-bordered;
th {
background: #EEE;
}
}
p > code {
font-size: inherit;
font-weight: inherit;
}
li {
line-height: 1.5;
}
2015-04-26 12:48:37 +05:30
a[href*="/uploads/"], a[href*="storage.googleapis.com/google-code-attachments/"] {
&:before {
margin-right: 4px;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
content: "\f0c6";
}
&:hover:before {
text-decoration: none;
}
}
2014-09-02 18:07:02 +05:30
}
@mixin str-truncated($max_width: 82%) {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
max-width: $max_width;
}