@zeecoder/container-query
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -8,2 +8,6 @@ 'use strict'; | ||
var _objectAssign = require('object-assign'); | ||
var _objectAssign2 = _interopRequireDefault(_objectAssign); | ||
var _getContainerDimensions = require('./getContainerDimensions'); | ||
@@ -49,3 +53,3 @@ | ||
Object.assign(changeSets[elementData.selector].change, (0, _adjustValueObjectByContainerDimensions2.default)(containerDimensions, elementData.styles)); | ||
(0, _objectAssign2.default)(changeSets[elementData.selector].change, (0, _adjustValueObjectByContainerDimensions2.default)(containerDimensions, elementData.styles)); | ||
}); | ||
@@ -52,0 +56,0 @@ }; |
@@ -8,2 +8,6 @@ 'use strict'; | ||
var _objectAssign = require('object-assign'); | ||
var _objectAssign2 = _interopRequireDefault(_objectAssign); | ||
var _convertCompositValue = require('./convertCompositValue'); | ||
@@ -32,3 +36,3 @@ | ||
function adjustValueObjectByContainerDimensions(containerDimensions, valueDefinition) { | ||
var values = Object.assign({}, valueDefinition); | ||
var values = (0, _objectAssign2.default)({}, valueDefinition); | ||
@@ -35,0 +39,0 @@ for (var cssRule in values) { |
@@ -9,10 +9,12 @@ "use strict"; | ||
* @param {Object} styles | ||
* @param {HTMLElement[]} elements | ||
* @param {NodeList<HTMLElement>} elements | ||
*/ | ||
function applyStylesToElements(styles, elements) { | ||
elements.forEach(function (element) { | ||
var elementsLength = elements.length; | ||
for (var i = 0; i < elementsLength; i++) { | ||
for (var prop in styles) { | ||
element.style[prop] = styles[prop]; | ||
elements[i].style[prop] = styles[prop]; | ||
} | ||
}); | ||
} | ||
} |
@@ -8,2 +8,6 @@ 'use strict'; | ||
var _objectAssign = require('object-assign'); | ||
var _objectAssign2 = _interopRequireDefault(_objectAssign); | ||
var _getConditionFunction = require('./getConditionFunction'); | ||
@@ -25,3 +29,3 @@ | ||
function processConfig(origConfig) { | ||
var config = Object.assign({}, origConfig); | ||
var config = (0, _objectAssign2.default)({}, origConfig); | ||
@@ -28,0 +32,0 @@ config.queries.forEach(function (queryData) { |
# CHANGELOG | ||
## 1.2.2 (2017-03-02) | ||
- Improved browser support: | ||
- Object.assign replacement | ||
- Removed forEach calls on NodeList objects | ||
- Started works on a new demo | ||
## 1.2.1 (2017-03-01) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@zeecoder/container-query", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A PostCSS plugin and Javascript runtime combination, which allows you to write @container queries in your CSS the same way you would write @media queries.", | ||
@@ -30,2 +30,3 @@ "main": "index.js", | ||
"lodash.trim": "^4.5.1", | ||
"object-assign": "^4.1.1", | ||
"postcss": "^5.2.13" | ||
@@ -32,0 +33,0 @@ }, |
# Container Query | ||
[](https://greenkeeper.io/) | ||
[](https://npmjs.com/package/@zeecoder/container-query) | ||
@@ -9,2 +7,3 @@ [](https://travis-ci.org/ZeeCoder/container-query) | ||
[](https://coveralls.io/github/ZeeCoder/container-query?branch=master) | ||
[](https://greenkeeper.io/) | ||
@@ -31,11 +30,7 @@ A PostCSS plugin and Javascript runtime combination, which allows you to write | ||
## Limitations | ||
- No "or" for @container queries right now, so this is not possible: | ||
`@container ( ... ) or ( ... ) { ... }` | ||
- `@container` queries cannot be nested | ||
- LESS doesn't compile with the current syntax | ||
## Supported Browsers | ||
- Works with all modern browsers and IE9+ | ||
- Works with all modern browsers | ||
## Notes | ||
@@ -60,7 +55,5 @@ - Lead with ## WHAT (image) followed by ## WHY | ||
avoid them. | ||
- To avoid circular deps, use overflow: hidden and avoid using container units on defined containers | ||
- Use native CSS techniques to achieve your goal whenever possible (css grid, flexbox) | ||
## Thoughts on design | ||
@@ -67,0 +60,0 @@ |
35899
744
4
71
+ Addedobject-assign@^4.1.1
+ Addedobject-assign@4.1.1(transitive)