aboutsummaryrefslogtreecommitdiffstats
path: root/demo/src/sass/lib/mixins.scss
diff options
context:
space:
mode:
Diffstat (limited to 'demo/src/sass/lib/mixins.scss')
-rw-r--r--demo/src/sass/lib/mixins.scss51
1 files changed, 51 insertions, 0 deletions
diff --git a/demo/src/sass/lib/mixins.scss b/demo/src/sass/lib/mixins.scss
new file mode 100644
index 00000000..ef155b46
--- /dev/null
+++ b/demo/src/sass/lib/mixins.scss
@@ -0,0 +1,51 @@
+// ==========================================================================
+// Mixins
+// ==========================================================================
+
+// Convert a <button> into an <a>
+// ---------------------------------------
+@mixin cancel-button-styles() {
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ cursor: pointer;
+ font: inherit;
+ line-height: $line-height-base;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ text-align: inherit;
+ text-shadow: inherit;
+ -moz-user-select: text; // stylelint-disable-line
+ vertical-align: baseline;
+ width: auto;
+}
+
+// Nicer focus styles
+// ---------------------------------------
+@mixin tab-focus($color: $tab-focus-default-color) {
+ box-shadow: 0 0 0 3px rgba($color, 0.35);
+ outline: 0;
+}
+
+// Use rems for font sizing
+// Leave <body> at 100%/16px
+// ---------------------------------------
+@mixin font-size($font-size: 16) {
+ $rem: decimal-round(($font-size / 16), 3);
+
+ font-size: ($font-size * 1px);
+ font-size: '#{$rem}rem';
+}
+
+// Font smoothing
+// ---------------------------------------
+@mixin font-smoothing($enabled: true) {
+ @if $enabled {
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-font-smoothing: antialiased;
+ } @else {
+ -moz-osx-font-smoothing: auto;
+ -webkit-font-smoothing: subpixel-antialiased;
+ }
+}