aboutsummaryrefslogtreecommitdiffstats
path: root/demo/src/less/lib/mixins.less
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2016-08-20 17:46:05 +1000
committerSam Potts <me@sampotts.me>2016-08-20 17:46:05 +1000
commitfc45ab48c932c6ecb810ed6456ff824ef43be73c (patch)
tree557e7520a47f00c89410f124d418722627e0e86e /demo/src/less/lib/mixins.less
parent6425a33ccd015a4e21545669c0774e2f12d1c47f (diff)
parent58e9b02405ccd3c3502bbf221097aa0604796769 (diff)
downloadplyr-fc45ab48c932c6ecb810ed6456ff824ef43be73c.tar.lz
plyr-fc45ab48c932c6ecb810ed6456ff824ef43be73c.tar.xz
plyr-fc45ab48c932c6ecb810ed6456ff824ef43be73c.zip
Merge branch 'master' into develop
# Conflicts: # src/js/plyr.js
Diffstat (limited to 'demo/src/less/lib/mixins.less')
-rw-r--r--demo/src/less/lib/mixins.less41
1 files changed, 41 insertions, 0 deletions
diff --git a/demo/src/less/lib/mixins.less b/demo/src/less/lib/mixins.less
new file mode 100644
index 00000000..923df1ea
--- /dev/null
+++ b/demo/src/less/lib/mixins.less
@@ -0,0 +1,41 @@
+// ==========================================================================
+// Mixins
+// ==========================================================================
+
+// Contain floats: nicolasgallagher.com/micro-clearfix-hack/
+// ---------------------------------------
+.clearfix() {
+ zoom: 1;
+ &:before,
+ &:after { content: ""; display: table; }
+ &:after { clear: both; }
+}
+
+// Webkit-style focus
+// ---------------------------------------
+.tab-focus() {
+ // Default
+ outline: thin dotted @gray-dark;
+ // Webkit
+ outline-offset: 1px;
+}
+
+// Use rems for font sizing
+// Leave <body> at 100%/16px
+// ---------------------------------------
+.font-size(@font-size: 16){
+ @rem: round((@font-size / 16), 3);
+ font-size: (@font-size * 1px);
+ font-size: ~"@{rem}rem";
+}
+
+// Font smoothing
+// ---------------------------------------
+.font-smoothing(@mode: on) when (@mode = on) {
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-font-smoothing: antialiased;
+}
+.font-smoothing(@mode: on) when (@mode = off) {
+ -moz-osx-font-smoothing: auto;
+ -webkit-font-smoothing: subpixel-antialiased;
+} \ No newline at end of file