2013-02-05 14:16:51 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
// Mixins used throughout the theme
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Media queries
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2018-07-12 16:38:51 -04:00
|
|
|
$breakpoints: (
|
|
|
|
mobile-small: 320px,
|
|
|
|
mobile: 550px,
|
|
|
|
tablet: 768px,
|
|
|
|
medium: 850px,
|
|
|
|
large: 1000px,
|
|
|
|
extra-large: 1140px
|
|
|
|
);
|
|
|
|
|
|
|
|
@mixin breakpoint($bp, $rule: max-width, $type: screen) {
|
|
|
|
@media #{$type} and (#{$rule}: map-get($breakpoints, $bp)) {
|
2018-07-12 16:41:44 -04:00
|
|
|
@content;
|
2018-06-08 05:49:31 -04:00
|
|
|
}
|
|
|
|
}
|
2013-12-18 11:50:51 -05:00
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
// CSS3 properties
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2015-03-23 10:23:42 -04:00
|
|
|
// Clearfix
|
|
|
|
|
|
|
|
@mixin clearfix() {
|
2018-06-08 05:49:31 -04:00
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
display: table;
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
clear: both;
|
|
|
|
}
|
2015-03-23 10:23:42 -04:00
|
|
|
}
|
|
|
|
|
2015-08-19 01:02:01 -04:00
|
|
|
//noinspection CssOptimizeSimilarProperties
|
2013-02-05 14:16:51 -05:00
|
|
|
@mixin linear-gradient($start-color, $end-color) {
|
|
|
|
background-color: $start-color;
|
|
|
|
background-image: linear-gradient(to bottom, $start-color, $end-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Visibility
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
@mixin hover {
|
|
|
|
.discourse-no-touch & {
|
|
|
|
&:hover {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-08 17:43:52 -04:00
|
|
|
//
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-12-23 05:52:20 -05:00
|
|
|
// Unselectable (avoids unwanted selections with iPad, touch laptops, etc)
|
2013-04-08 17:43:52 -04:00
|
|
|
|
2017-10-19 15:54:05 -04:00
|
|
|
@mixin user-select($mode) {
|
|
|
|
-webkit-user-select: $mode;
|
2018-06-08 05:49:31 -04:00
|
|
|
-moz-user-select: $mode;
|
|
|
|
-ms-user-select: $mode;
|
2017-10-19 15:54:05 -04:00
|
|
|
}
|
|
|
|
|
2013-04-08 17:43:52 -04:00
|
|
|
@mixin unselectable {
|
2017-10-19 15:54:05 -04:00
|
|
|
@include user-select(none);
|
2013-04-08 17:43:52 -04:00
|
|
|
}
|
2015-08-19 13:27:17 -04:00
|
|
|
|
|
|
|
// Stuff we repeat
|
|
|
|
@mixin post-aside {
|
2017-06-11 22:20:14 -04:00
|
|
|
border-left: 5px solid $primary-low;
|
2015-08-20 19:47:34 -04:00
|
|
|
background-color: blend-primary-secondary(5%);
|
2015-08-19 13:27:17 -04:00
|
|
|
}
|
2015-08-25 19:58:37 -04:00
|
|
|
|
2016-01-03 02:49:52 -05:00
|
|
|
// We still need -webkit for latest iPhone and Safari
|
2015-08-25 19:58:37 -04:00
|
|
|
@mixin transform($transforms) {
|
2018-06-08 05:49:31 -04:00
|
|
|
-webkit-transform: $transforms;
|
|
|
|
transform: $transforms;
|
2015-08-25 19:58:37 -04:00
|
|
|
}
|
2017-11-27 15:23:18 -05:00
|
|
|
|
2018-06-08 05:49:31 -04:00
|
|
|
@mixin appearance-none() {
|
|
|
|
// resets default browser styles
|
2017-11-27 15:23:18 -05:00
|
|
|
-webkit-appearance: none;
|
2018-06-08 05:49:31 -04:00
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
}
|