Skip to content

Commit

Permalink
push v0.1.2 - add property-value mixins for selection and playceholder
Browse files Browse the repository at this point in the history
  • Loading branch information
screeny05 committed Jun 17, 2016
1 parent 2f37f24 commit 7d2db1c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. ???
Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions _mixins/placeholder.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
&:-ms-input-placeholder { @lambda(); }
&:-moz-placeholder { opacity: 1; @lambda(); }
}

.placeholder(@property, @value) {
.placeholder({ @{property}: @value; });
}
4 changes: 4 additions & 0 deletions _mixins/selection.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
&::selection { @lambda(); }
&::-moz-selection { @lambda(); }
}

.selection(@property, @value) {
.selection({ @{property}: @selection; });
}
5 changes: 5 additions & 0 deletions _mixins/triangle.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 7d2db1c

Please sign in to comment.