Giter Club home page Giter Club logo

Comments (5)

ZeeCoder avatar ZeeCoder commented on June 14, 2024

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.

ZeeCoder avatar ZeeCoder commented on June 14, 2024

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.

ZeeCoder avatar ZeeCoder commented on June 14, 2024

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.

ZeeCoder avatar ZeeCoder commented on June 14, 2024

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.

ZeeCoder avatar ZeeCoder commented on June 14, 2024

Use-case: Setting font-size on a button component could result in weird behaviour, if the text can wrap.

  1. Font-size changes
  2. text grows big, and breaks to multiple lines
  3. The container gets bigger
  4. Which then sets the font size bigger again
    Then back to 1)

from container-query.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.