All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
postcss-container-query
- Allowing for one
@define-container;
declaration to override the container selector detected automatically in singleContainer mode
- Allowing for one
- readme updates
- Tests now check if custom props are properly set.
- Change sets are tested with hyphenated prop names instead of camel cased ones.
container-query
- Value precision is now consistent across browsers. (Instead of chrome applying 1px and firefox 1.00px for example.)
- Testing in Node 10
- Integration tests, supported by SauceLabs
postcss-container-query
- Parcel bundler support. Re-running the plugin on the same file is now safe. (The Parcel bundler reruns the same plugins over the same css file multiple times.)
- "test" script is now only in the root, instead of in every package.
- [BREAKING] No longer testing for Node 7 and 6 (dom-testing-library needs 8 and up, and the real targets are the browsers anyway.)
- [BREAKING] Removed test running from Node 6
react-container-query
- [BREAKING] Removed the "render" prop from ContainerQuery in favour of using children. (The former was not documented anyway.)
- [BREAKING] Removed the
ResizeObserver
component in favour of the react-resize-observer and use-resize-observer packages. - [BREAKING] Removed the default export. (Both ContainerQuery and withContainerQuery is still available as named exports.)
- [BREAKING] Removed the
stats
prop from ContainerQuery. (Always usemeta
instead.)
- Removed unnecessary files from the packages.
container-query-meta-builder
- Removed the engines field package.json field.
- [BREAKING] Removed the UMD build.
postcss-container-query
- [BREAKING] Minimum tested version lifted to v8. (The engines field still allows for v6.)
- [BREAKING] Dropped the
getJSON
option, and no json is saved by default. The new behaviour is to use the ICSS:export
syntax, which then can be imported through css-loader. (The meta object is still passed down in the postcss plugin messages in case it's needed.) - [BREAKING] Removed
saveMeta
. - [BREAKING] Moved
getMetadataFromMessages
from root to the lib/ folder.
react-container-query
ContainerQuery
no longer returns with a "null" size object when a function is passed in as the children prop. Instead it returns with{width: 0, height: 0}
initially, then updates with the observed container element.- [BREAKING]
ContainerQuery
now renders a div root node by default, inside of which it renders all children. (Also accepts anas
prop to change the tag type.) - [BREAKING] ContainerQuery no longer returns an object for size, but width and height as the first parameter of the child function
- [BREAKING] ContainerQuery now returns 1x1 dimensions before the ResizeObserver kicks in
container-query
- [BREAKING] Set the pixel precision to be 0, so that whole numbers are applied by default.
- Integration tests, supported by SauceLabs
postcss-container-query
- Parcel bundler support. Re-running the plugin on the same file is now safe. (The Parcel bundler reruns the same plugins over the same css file multiple times.)
- Removed unnecessary files from the packages
react-container-query
- [BREAKING] ContainerQuery no longer returns an object for size, but width and height as the first parameter of the child function
- [BREAKING] ContainerQuery now returns 1x1 dimensions before the ResizeObserver kicks in
container-query
- [BREAKING] Set the pixel precision to be 0, so that whole numbers are applied by default.
- [BREAKING] Removed test running from Node 6
container-query
- Value precision is now consistent across browsers. (Instead of chrome applying 1px and firefox 1.00px for example.)
react-container-query
- [BREAKING] Removed the "render" prop from ContainerQuery in favour of using children. (The former was not even documented.)
- [BREAKING] Removed the
ResizeObserver
component in favour of the react-resize-observer and use-resize-observer packages. - [BREAKING] Removed the default export. (Both ContainerQuery and withContainerQuery is still available as named exports.)
- [BREAKING] Removed the
stats
prop from ContainerQuery. (Usemeta
instead.)
react-container-query
ContainerQuery
no longer returns with a "null" size object when a function is passed in as the children prop. Instead it returns with{width: 0, height: 0}
initially, then updates with the observed container element.- [BREAKING]
ContainerQuery
now renders a div root node by default, inside of which it renders all children. (Also accepts anas
prop to change the tag type.)
- Tests now check if custom props are properly set
- Change sets are tested with hyphenated prop names instead of camel cased ones
- Testing in Node 10
- "test" script is now only in the root, instead of in every package.
- [BREAKING] No longer testing for Node 7
-
container-query-meta-builder
- Removed the engines field package.json field
- [BREAKING] Removed the UMD build
-
postcss-container-query
- [BREAKING] Minimum Node version lifted to v8
- [BREAKING] Dropped the
getJSON
option, and no json is saved by default. The new behaviour is to use the ICSS:export
syntax, which then can be imported through css-loader. (The meta object is still passed down in the postcss plugin messages in case it's needed.) - [BREAKING]
saveMeta
is removed
container-query-meta-builder
- Removed a forgotten import
container-query-meta-builder
- Removed lodash
postcss-container-query
- Made
saveMeta
andgetMetadataFromMessages
available for imports
- Made
-
Exluded some irrelevant paths from test coverage
-
postcss-container-query
watch:build
package script to help development- testing build files
- Fixed exports (#90)
postcss-container-query
- Now uses messages to provide the metadata.
getMetadataFromMessages
to help extracting metadata from an array of messagessaveMeta
function to save the extracted metadata alongside the CSS file
postcss-container-query
getJSON
will be removed, in favour ofgetMetadataFromMessages
andsaveMeta
postcss-container-query
- made the metadata file much smaller
container-query
- accepts the new meta object
react-container-query
ContainerQuery
acceptsmeta
alongsidestats
.
react-container-query
ContainerQuery
won't acceptstats
in the future, onlymeta
.
react-container-query
ContainerQuery
now accepts the render function through thechildren
propResizeObserver
does the same
react-container-query
- dependency updates
- rollup build update
container-query
- dependency updates
- rollup build update
postcss-container-query
- dependency updates
- rollup build update
react-container-query
ContainerQuery
no longer tries to set state for an unmounting component
postcss-container-query
- Build is now transpiled down to es5
react-container-query
- New
ContainerQuery
andResizeObserver
components
- New
container-query
Node.forEach
is no longer globally polyfilled. (using a simple for loop instead internally)
- Containers can now be safely nested. (Container Boundaries)
- postcss-container-query default
getJSON
function now only overwrites a previous file if there's an actual change.
- react-container-query module
- doc updates
- various refactorings
- size-limit for limiting bundle sizes
- Dependency updates
- Missing
NodeList.forEach
#72
- New diffing algorithm, which keeps track of the container's status (which query was applied already) and applies / removes the least amount of new styles possible.
- r-units produce a value with limited precision. This is 2 by default, which
can be changed in the Container options as
valuePrecision
. singleContainer
option (true by default), which makes the use of@define-container
unnecessary for single-file containers. (Works well with Component-based architecture.)- Support for using r-units with css custom props. ie:
--rw: 1rw;
- Published the runtime and the postcss plugin separately, both of which reside in the same monorepo. (Thanks to Lerna)
- Container instances are auto-adjusting themselves on size change by default.
(
adjustOnResize
option.) - Bundling with Rollup instead of just transpiling the source. This gives better control over what is exposed, makes it easy to support other module formats in the future, and integrates Babel seemlessly.
- Removed support for the container and css unit combinations - like chpx - in favour of rw/rh/rmin/rmax units.
- Removed
initialiseAllContainers
. It'll be turned to a demo instead in the future. - Removed some of the limitation on r-units. Paddings, for example can now use them.
- Resize Observer can be enabled (will be the default behaviour in 2.0.0)
- Resize observation can be switched on / off.
- First adjustment on Container instantiation can be switched off
- Dependency upgrades
- Fixed exports for non es-6 environments
- Fixed a bug where the postcss plugin processed nodes it shouldn't have
- Fixed a bug where initialiseAllContainers didn't trigger adjust calls on dom load
- Made the runtime work with an invalid config
- Improved browser support:
- Object.assign replacement
- Removed forEach calls on NodeList objects
- Started working on a new demo
- README update
- Made "or" queries work as they do for @media queries
- Attempt to make the readme appear on npm
- cmin / cmax unit support
- Fixed the aspect-ratio query
- improved the isEmptyObject tests
- Made Jest a dev-only dependency
- BUGFIX (#6): Fixed unitless @container queries
- Upgraded Jest from v18 to v19
- Removed coverage/ and .babelrc from the installed package, hence making it a bit lighter.