Comments (5)
It's probably not worth disabling all properties though, like the ability to change the background for instance is nice.
And also, just that wouldn't solve the circular issues anyway.
from container-query.
More food for thought: sometimes even setting width / height can be harmless.
For example - assuming a "Resize Sensor" of some sort - setting height to: 5cwpx
would react to width size change -> where the height's change would trigger the sensor yet again, but this time nothing would change since width didn't change.
For this reason even prohibiting the usage of container units for width / height properties would be unnecessary.
It doesn't solve the problem it's meant to solve, but limits the developer.
from container-query.
Now however, using cw / ch for the property it relates to must be forbidden.
height: 110chpx
would infinitely grow in height for example.
from container-query.
For now I think restrictions should be lifted, and only obvious cases - like the one above - should be checked, where circular issues would surely arise.
To "properly" address circular issues would be a bigger undertaking:
- Try to detect issues on PostCSS parsing first,
- Maybe a clever algorithm could be written which would detect issues runtime too.
from container-query.
Use-case: Setting font-size on a button component could result in weird behaviour, if the text can wrap.
- Font-size changes
- text grows big, and breaks to multiple lines
- The container gets bigger
- Which then sets the font size bigger again
Then back to 1)
from container-query.
Related Issues (20)
- Switch from findDOMNode() to refs HOT 7
- An in-range update of prettier is breaking the build 🚨 HOT 1
- Refactor to Typescript
- Implement useContainerQuery
- New container declaration syntax
- Do you support for Preact ? HOT 1
- Vue Example HOT 1
- Support for `x < width < y` queries
- The react component should optionally pass in the container size HOT 3
- Use a single Mutation Observer observation on body
- Handle a subset of cyclic issues with statically analyzing the CSS HOT 2
- Transpile the postcss plugin down to es5 properly HOT 1
- React component mounting / unmounting issue HOT 1
- Make the ContainerQuery component accept `children` HOT 1
- Remove the need for a root container class HOT 1
- postcss-container-query with require() HOT 1
- Add information for developers HOT 4
- Version 10 of node.js has been released
- Random classes picked up by json. HOT 9
- React 16 warnings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container-query.