Krister Kari

Results 441 comments of Krister Kari

Hey @xsanda. So let me explain a bit about calc and the viewport units. Both of them need to be calculated at runtime. The viewport units work because they run...

> If you only use exact and viewport values (as opposed to percentages), then why would calculating `calc(50vw + 5 px)` be any harder than calculating `50vw`? The output is...

So calc with viewport units is easy, but calc with width/height + percentages is difficult to implement.

Also, I have made a proof of concept of using percentages and calc. I would just need to finish writing a babel plugin for it. Here's an example: https://github.com/kristerkari/css-calc-proof-of-concept/blob/master/App.js#L47-L61

I have also created a library that turns calc values to pixels based on the viewport/element size: https://github.com/kristerkari/css-calc-transform/blob/master/__tests__/index.spec.js

@NE-SmallTown @iambool Look at my comment above. It can not just be added, `calc()` needs values that can only be known at runtime.

Sorry @cray0000 , I have totally not noticed this one. What is the use case for the `::part()` selectors? This parser is meant for React Native, not Web.

@cray0000 Thank you for the detailed explanation! i’m not home at the moment, but I’m happy to add the change if you have libraries that are using the parser. It...

Thanks for the explanation, it's very helpful. > Note that we don’t fully parse the animation and transition properties here — they could contain css variables. In React Native CSS...

> Do you support inheriting variables? Nope. I don't think that it would make much sense in the context of CSS modules.