From 7d2db1c39bf89e632ad657cf8ba4ccb87dffc7a2 Mon Sep 17 00:00:00 2001 From: Sebastian Langer Date: Fri, 17 Jun 2016 14:19:10 +0200 Subject: [PATCH] push v0.1.2 - add property-value mixins for selection and playceholder --- README.md | 5 ++++- _mixins/placeholder.less | 4 ++++ _mixins/selection.less | 4 ++++ _mixins/triangle.less | 5 +++++ package.json | 2 +- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a996f1b..df97c62 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ less-mixins to help you with your shopware-frontend -### how to use +### how to use? 1. include all.less 2. adjust variables in your theme to your liking 3. ??? @@ -106,3 +106,6 @@ resulting in css like this: ``` read more about the magical powers of less' detached rulesets in [the less docs](http://lesscss.org/features/#detached-rulesets-feature). + +### what's new? +* 0.1.2 - add property-value mixins for placeholder & selection diff --git a/_mixins/placeholder.less b/_mixins/placeholder.less index b741fe6..a1f9796 100644 --- a/_mixins/placeholder.less +++ b/_mixins/placeholder.less @@ -4,3 +4,7 @@ &:-ms-input-placeholder { @lambda(); } &:-moz-placeholder { opacity: 1; @lambda(); } } + +.placeholder(@property, @value) { + .placeholder({ @{property}: @value; }); +} diff --git a/_mixins/selection.less b/_mixins/selection.less index e195f56..93386bb 100644 --- a/_mixins/selection.less +++ b/_mixins/selection.less @@ -2,3 +2,7 @@ &::selection { @lambda(); } &::-moz-selection { @lambda(); } } + +.selection(@property, @value) { + .selection({ @{property}: @selection; }); +} diff --git a/_mixins/triangle.less b/_mixins/triangle.less index 61ae437..b27310b 100644 --- a/_mixins/triangle.less +++ b/_mixins/triangle.less @@ -5,27 +5,32 @@ height: 0; -moz-transform: scale(.9999); } + .triangle(@direction, @color, @size) { .triangle(@direction, @size * 2, @size, @color); } + .triangle(@direction, @color: @color-white, @width: @base-triangle-width, @height: @base-triangle-height) when (@direction = up) { .triangle-base(); border-left: (@width / 2) solid transparent; border-right: (@width / 2) solid transparent; border-bottom: @height solid @color; } + .triangle(@direction, @color: @color-white, @width: @base-triangle-width, @height: @base-triangle-height) when (@direction = down) { .triangle-base(); border-left: (@width / 2) solid transparent; border-right: (@width / 2) solid transparent; border-top: @height solid @color; } + .triangle(@direction, @color: @color-white, @width: @base-triangle-width, @height: @base-triangle-height) when (@direction = left) { .triangle-base(); border-top: (@width / 2) solid transparent; border-bottom: (@width / 2) solid transparent; border-right: @height solid @color; } + .triangle(@direction, @color: @color-white, @width: @base-triangle-width, @height: @base-triangle-height) when (@direction = right) { .triangle-base(); border-top: (@width / 2) solid transparent; diff --git a/package.json b/package.json index 4d9a858..5218aba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shopware-missing-mixins", - "version": "0.1.1", + "version": "0.1.2", "description": "missing basic less-mixins for Shopware 5", "main": "all.less", "license": "MIT",